Class: ImgToScript::AbstractToken::DrawLineByAbsCoords

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

Overview

Draw a line by absolute coordinates.

Instance Attribute Summary collapse

Attributes inherited from AbstractToken

#require_nl, #type

Instance Method Summary collapse

Constructor Details

#initialize(x0:, y0:, x1:, y1:) ⇒ DrawLineByAbsCoords

Returns a new instance of DrawLineByAbsCoords.



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

def initialize(x0:, y0:, x1:, y1:, **)
  @type = AbsTokenType::DRAW_LINE_BY_ABS_COORDS
  @x0 = x0
  @y0 = y0
  @x1 = x1
  @y1 = y1

  super
end

Instance Attribute Details

#x0Object (readonly)

Returns the value of attribute x0.



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

def x0
  @x0
end

#x1Object (readonly)

Returns the value of attribute x1.



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

def x1
  @x1
end

#y0Object (readonly)

Returns the value of attribute y0.



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

def y0
  @y0
end

#y1Object (readonly)

Returns the value of attribute y1.



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

def y1
  @y1
end