class CTioga2::Graphics::Styles::MarkerStringStyle

The style for a string marker. Hmmm, this is somewhat redundant with MarkerStyle and I don't like that.

Worse than that, it's not the same options !

Attributes

mode[RW]

The rendering mode.

Public Class Methods

new() click to toggle source
# File lib/ctioga2/graphics/styles/texts.rb, line 285
def initialize
  # It make sense to use both by default, as it would be
  # confusing to provide both fill_ and stroke_color that
  # don't have effects by default...
  @mode = Tioga::FigureConstants::FILL_AND_STROKE
end

Public Instance Methods

draw_marker(t, marker, x, y) click to toggle source

Draws the string marker at the given location

# File lib/ctioga2/graphics/styles/texts.rb, line 302
def draw_marker(t, marker, x, y)
  dict = self.to_hash
  dict['marker'] = marker
  dict['at'] = [x, y]
  t.show_marker(dict)
end
draw_string_marker(t, text, x, y) click to toggle source

Draws the string marker at the given location

# File lib/ctioga2/graphics/styles/texts.rb, line 294
def draw_string_marker(t, text, x, y)
  dict = self.to_hash
  dict['text'] = text
  dict['at'] = [x, y]
  t.show_marker(dict)
end
real_vertical_scale() click to toggle source

Returns the true vertical scale of the marker

# File lib/ctioga2/graphics/styles/texts.rb, line 310
def real_vertical_scale
  return (@vertical_scale || 1.0) * (@scale || 1.0)
end