Class: CTioga2::Graphics::Styles::StrokeStyle

Inherits:
BasicStyle
  • Object
show all
Defined in:
lib/ctioga2/graphics/styles/drawable.rb

Overview

This class represents all the stylistic information to stroke a Tioga path.

Direct Known Subclasses

ErrorBarStyle

Constant Summary

Constants inherited from BasicStyle

BasicStyle::OldAttrAccessor

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BasicStyle

attr_accessor, attributes, from_hash, #instance_variable_defined?, #set_from_hash, #to_hash, #update_from_other

Instance Attribute Details

#colorObject

The color



31
32
33
# File 'lib/ctioga2/graphics/styles/drawable.rb', line 31

def color
  @color
end

#styleObject

The line style



34
35
36
# File 'lib/ctioga2/graphics/styles/drawable.rb', line 34

def style
  @style
end

#widthObject

The line width



37
38
39
# File 'lib/ctioga2/graphics/styles/drawable.rb', line 37

def width
  @width
end

Instance Method Details

#set_stroke_style(t) ⇒ Object

Sets the stroke style to a FigureMaker object, t.



40
41
42
43
44
# File 'lib/ctioga2/graphics/styles/drawable.rb', line 40

def set_stroke_style(t)
  t.stroke_color = @color if @color
  t.line_type = @style if @style
  t.line_width = @width if @width
end