Sha256: f53522e14d8710ecec3454547e2cb5b150a1583e42401043a697ae4bb86be93d

Contents?: true

Size: 785 Bytes

Versions: 59

Compression:

Stored size: 785 Bytes

Contents

require 'rvg/rvg'

Magick::RVG.dpi = 90

TEXT_STYLES = {:writing_mode=>'lr',
               :glyph_orientation_horizontal=>0,
               :fill=>'red4',
               :font_weight=>'bold',
               :font_size=>16}

TEXT_STYLES2 = {:writing_mode=>'lr',
               :glyph_orientation_horizontal=>180,
               :fill=>'green',
               :font_weight=>'bold',
               :font_size=>16}

rvg = Magick::RVG.new(3.in, 1.in).viewbox(0,0,300,100) do |canvas|
    canvas.background_fill = 'white'

    canvas.text(15, 40, ":glyph_orientation_horizontal=0").styles(TEXT_STYLES)
    canvas.text(15, 80, ":glyph_orientation_horizontal=180").styles(TEXT_STYLES2)

    canvas.rect(299, 99).styles(:fill=>'none',:stroke=>'blue')
end

rvg.draw.write('writing_mode02.gif')

Version data entries

59 entries across 59 versions & 2 rubygems

Version Path
rmagick-2.13.4 doc/ex/writing_mode02.rb
rmagick-2.13.3 doc/ex/writing_mode02.rb
rmagick-2.13.3.rc1 doc/ex/writing_mode02.rb
rmagick-2.13.2 doc/ex/writing_mode02.rb
rdp-rmagick-0.0.0 doc/ex/writing_mode02.rb
rmagick-2.13.1 doc/ex/writing_mode02.rb
rmagick-2.12.2 doc/ex/writing_mode02.rb
rmagick-2.12.1 doc/ex/writing_mode02.rb
rmagick-2.12.0 doc/ex/writing_mode02.rb
rmagick-2.11.1 doc/ex/writing_mode02.rb
rmagick-2.10.0 doc/ex/writing_mode02.rb
rmagick-2.11.0 doc/ex/writing_mode02.rb
rmagick-1.10.0 doc/ex/writing_mode02.rb
rmagick-1.10.1 doc/ex/writing_mode02.rb
rmagick-1.12.0 doc/ex/writing_mode02.rb
rmagick-1.11.1 doc/ex/writing_mode02.rb
rmagick-1.13.0 doc/ex/writing_mode02.rb
rmagick-1.11.0 doc/ex/writing_mode02.rb
rmagick-1.15.1 doc/ex/writing_mode02.rb
rmagick-1.15.10 doc/ex/writing_mode02.rb