Class: MotionPlot::Title

Inherits:
Object
  • Object
show all
Defined in:
lib/motion-plot/utilities/title.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Title

Returns a new instance of Title.



6
7
8
9
10
# File 'lib/motion-plot/utilities/title.rb', line 6

def initialize(options={})
  @text     = options[:text]
  @position = options[:position] || AnchorPosition.default
  @style    = Style.new(options)
end

Instance Attribute Details

#positionObject

Returns the value of attribute position.



4
5
6
# File 'lib/motion-plot/utilities/title.rb', line 4

def position
  @position
end

#styleObject

Returns the value of attribute style.



4
5
6
# File 'lib/motion-plot/utilities/title.rb', line 4

def style
  @style
end

#textObject

Returns the value of attribute text.



4
5
6
# File 'lib/motion-plot/utilities/title.rb', line 4

def text
  @text
end

Instance Method Details

#text_styleObject



12
13
14
# File 'lib/motion-plot/utilities/title.rb', line 12

def text_style
  TextStyle.cpt_text_style(@style)
end