class CTioga2::Graphics::Styles::LineStyle
This class represents a plain line style.
Public Instance Methods
draw_line(t, x1, y1, x2, y2)
click to toggle source
Draws a line according with this style
# File lib/ctioga2/graphics/styles/drawable.rb, line 40 def draw_line(t, x1, y1, x2, y2) t.context do set_stroke_style(t) t.stroke_line(x1, y1, x2, y2) end end
set_stroke_style(t)
click to toggle source
Sets
the stroke style to a FigureMaker object, t.
# File lib/ctioga2/graphics/styles/drawable.rb, line 34 def set_stroke_style(t) t.line_type = @style if @style t.line_width = @width if @width end