Class | Magick::RVG::Utility::TextAttributes |
In: |
lib/rvg/misc.rb
|
Parent: | Object |
WRITING_MODE | = | %w{lr-tb lr rl-tb rl tb-rl tb} |
# File lib/rvg/misc.rb, line 344 344: def initialize() 345: @affine = Array.new 346: @affine << Magick::AffineMatrix.new(1, 0, 0, 1, 0, 0) 347: @baseline_shift = Array.new 348: @baseline_shift << :baseline 349: @glyph_orientation_horizontal = Array.new 350: @glyph_orientation_horizontal << 0 351: @glyph_orientation_vertical = Array.new 352: @glyph_orientation_vertical << 90 353: @letter_spacing = Array.new 354: @letter_spacing << 0 355: @text_anchor = Array.new 356: @text_anchor << :start 357: @word_spacing = Array.new 358: @word_spacing << 0 359: @writing_mode = Array.new 360: @writing_mode << 'lr-tb' 361: end
# File lib/rvg/misc.rb, line 402 402: def baseline_shift=(value) 403: @baseline_shift[-1] = value 404: end
# File lib/rvg/misc.rb, line 422 422: def glyph_orientation_horizontal() 423: @glyph_orientation_horizontal[-1] 424: end
# File lib/rvg/misc.rb, line 426 426: def glyph_orientation_horizontal=(angle) 427: @glyph_orientation_horizontal[-1] = angle 428: end
# File lib/rvg/misc.rb, line 414 414: def glyph_orientation_vertical() 415: @glyph_orientation_vertical[-1] 416: end
# File lib/rvg/misc.rb, line 418 418: def glyph_orientation_vertical=(angle) 419: @glyph_orientation_vertical[-1] = angle 420: end
# File lib/rvg/misc.rb, line 434 434: def letter_spacing=(value) 435: @letter_spacing[-1] = value 436: end
# File lib/rvg/misc.rb, line 438 438: def non_default? 439: @baseline_shift[-1] != :baseline || @letter_spacing[-1] != 0 || 440: @word_spacing[-1] != 0 || @writing_mode[-1][/\Alr/].nil? || 441: @glyph_orientation_horizontal[-1] != 0 442: end
# File lib/rvg/misc.rb, line 374 374: def pop() 375: @affine.pop 376: @baseline_shift.pop 377: @text_anchor.pop 378: @writing_mode.pop 379: @glyph_orientation_vertical.pop 380: @glyph_orientation_horizontal.pop 381: @letter_spacing.pop 382: @word_spacing.pop 383: end
# File lib/rvg/misc.rb, line 363 363: def push() 364: @affine.push(@affine.last.dup) 365: @baseline_shift.push(@baseline_shift.last) 366: @text_anchor.push(@text_anchor.last) 367: @writing_mode.push(@writing_mode.last.dup) 368: @glyph_orientation_vertical.push(@glyph_orientation_vertical.last) 369: @glyph_orientation_horizontal.push(@glyph_orientation_horizontal.last) 370: @letter_spacing.push(@letter_spacing.last) 371: @word_spacing.push(@word_spacing.last) 372: end
# File lib/rvg/misc.rb, line 385 385: def set_affine(sx, rx, ry, sy, tx, ty) 386: @affine[-1].sx = sx 387: @affine[-1].rx = rx 388: @affine[-1].ry = ry 389: @affine[-1].sy = sy 390: @affine[-1].tx = tx 391: @affine[-1].ty = ty 392: end
# File lib/rvg/misc.rb, line 410 410: def text_anchor=(anchor) 411: @text_anchor[-1] = anchor 412: end
# File lib/rvg/misc.rb, line 448 448: def word_spacing=(value) 449: @word_spacing[-1] = value 450: end