class Magick::RVG::Utility::TextAttributes
def affine
def affine @affine[-1] end
def baseline_shift
def baseline_shift @baseline_shift[-1] end
def baseline_shift=(value)
def baseline_shift=(value) @baseline_shift[-1] = value end
def glyph_orientation_horizontal
def glyph_orientation_horizontal @glyph_orientation_horizontal[-1] end
def glyph_orientation_horizontal=(angle)
def glyph_orientation_horizontal=(angle) @glyph_orientation_horizontal[-1] = angle end
def glyph_orientation_vertical
def glyph_orientation_vertical @glyph_orientation_vertical[-1] end
def glyph_orientation_vertical=(angle)
def glyph_orientation_vertical=(angle) @glyph_orientation_vertical[-1] = angle end
def initialize
def initialize @affine = [] @affine << Magick::AffineMatrix.new(1, 0, 0, 1, 0, 0) @baseline_shift = [] @baseline_shift << :baseline @glyph_orientation_horizontal = [] @glyph_orientation_horizontal << 0 @glyph_orientation_vertical = [] @glyph_orientation_vertical << 90 @letter_spacing = [] @letter_spacing << 0 @text_anchor = [] @text_anchor << :start @word_spacing = [] @word_spacing << 0 @writing_mode = [] @writing_mode << 'lr-tb' end
def letter_spacing
def letter_spacing @letter_spacing[-1] end
def letter_spacing=(value)
def letter_spacing=(value) @letter_spacing[-1] = value end
def non_default?
def non_default? @baseline_shift[-1] != :baseline || @letter_spacing[-1] != 0 || @word_spacing[-1] != 0 || @writing_mode[-1][/\Alr/].nil? || @glyph_orientation_horizontal[-1] != 0 end
def pop
def pop @affine.pop @baseline_shift.pop @text_anchor.pop @writing_mode.pop @glyph_orientation_vertical.pop @glyph_orientation_horizontal.pop @letter_spacing.pop @word_spacing.pop end
def push
def push @affine.push(@affine.last.dup) @baseline_shift.push(@baseline_shift.last) @text_anchor.push(@text_anchor.last) @writing_mode.push(@writing_mode.last.dup) @glyph_orientation_vertical.push(@glyph_orientation_vertical.last) @glyph_orientation_horizontal.push(@glyph_orientation_horizontal.last) @letter_spacing.push(@letter_spacing.last) @word_spacing.push(@word_spacing.last) end
def set_affine(sx, rx, ry, sy, tx, ty)
def set_affine(sx, rx, ry, sy, tx, ty) @affine[-1].sx = sx @affine[-1].rx = rx @affine[-1].ry = ry @affine[-1].sy = sy @affine[-1].tx = tx @affine[-1].ty = ty end
def text_anchor
def text_anchor @text_anchor[-1] end
def text_anchor=(anchor)
def text_anchor=(anchor) @text_anchor[-1] = anchor end
def word_spacing
def word_spacing @word_spacing[-1] end
def word_spacing=(value)
def word_spacing=(value) @word_spacing[-1] = value end
def writing_mode
def writing_mode @writing_mode[-1] end
def writing_mode=(mode)
def writing_mode=(mode) @writing_mode[-1] = WRITING_MODE.include?(mode) ? mode : 'lr-tb' end