Class: ImgToScript::AbstractToken::DrawPixelByAbsCoords

Inherits:
AbstractToken
  • Object
show all
Defined in:
lib/img_to_script/abstract_token/draw_pixel_by_abs_coords.rb

Overview

Draw a pixel by absolute coordinates.

Instance Attribute Summary collapse

Attributes inherited from AbstractToken

#require_nl, #type

Instance Method Summary collapse

Constructor Details

#initialize(x:, y:) ⇒ DrawPixelByAbsCoords

Returns a new instance of DrawPixelByAbsCoords.



11
12
13
14
15
16
17
# File 'lib/img_to_script/abstract_token/draw_pixel_by_abs_coords.rb', line 11

def initialize(x:, y:, **)
  @type = AbsTokenType::DRAW_PIXEL_BY_ABS_COORDS
  @x = x
  @y = y

  super
end

Instance Attribute Details

#xObject (readonly)

Returns the value of attribute x.



9
10
11
# File 'lib/img_to_script/abstract_token/draw_pixel_by_abs_coords.rb', line 9

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



9
10
11
# File 'lib/img_to_script/abstract_token/draw_pixel_by_abs_coords.rb', line 9

def y
  @y
end