Method: Lignite::Ev3Ops#ui_draw_rect

Defined in:
lib/lignite/ev3_ops.rb

#ui_draw_rect(color, x0, y0, x1, y1) ⇒ Object

Parameters:

  • color (PAR8)

    (in) Color [BG_COLOR..FG_COLOR]

  • x0 (PAR16)

    (in) X start cord [0..LCD_WIDTH]

  • y0 (PAR16)

    (in) Y start cord [0..LCD_HEIGHT]

  • x1 (PAR16)

    (in) X size [0..LCD_WIDTH - X0]

  • y1 (PAR16)

    (in) Y size [0..LCD_HEIGHT - Y0]



4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
# File 'lib/lignite/ev3_ops.rb', line 4103

def ui_draw_rect(color, x0, y0, x1, y1 )
  logger.debug do
    args = [color, x0, y0, x1, y1 ]
    "called ui_draw_rect with #{args.inspect}"
  end

  bytes = u8(0x84)
  bytes += param_simple(10)
  bytes += param_simple(color)
  bytes += param_simple(x0)
  bytes += param_simple(y0)
  bytes += param_simple(x1)
  bytes += param_simple(y1 )
  logger.debug "returning bytecode: #{bytes.inspect}"
  bytes
end