Class: CTioga2::Graphics::Styles::BaseTextStyle
- Inherits:
-
BasicStyle
- Object
- BasicStyle
- CTioga2::Graphics::Styles::BaseTextStyle
- Defined in:
- lib/ctioga2/graphics/styles/texts.rb
Overview
TODO:
alignement and justification are poor names. halign
The style of a text object. This class is suitable for inclusion as a Hash to FigureMaker#show_axis, for the tick labels.
and/or valign would be better.
Direct Known Subclasses
Constant Summary
Constants inherited from BasicStyle
CTioga2::Graphics::Styles::BasicStyle::OldAttrAccessor
Instance Method Summary collapse
-
#draw_text(t, text, x_or_loc, y = nil, measure = nil) ⇒ Object
Draw the text at the given location with the given style.
Methods inherited from BasicStyle
attr_accessor, attributes, from_hash, #instance_variable_defined?, options_hash, #set_from_hash, sub_style, sub_styles, #to_hash, typed_attribute, #update_from_other
Instance Method Details
#draw_text(t, text, x_or_loc, y = nil, measure = nil) ⇒ Object
Draw the text at the given location with the given style. If y is nil, then x_or_loc is taken to be a location (see FigureMaker#show_text).
54 55 56 57 58 59 |
# File 'lib/ctioga2/graphics/styles/texts.rb', line 54 def draw_text(t, text, x_or_loc, y = nil, measure = nil) t.context do dict = prepare_show_text_dict(text, x_or_loc, y, measure) t.show_text(dict) end end |