Sha256: 71723b36fa2c547dc20e59f964982deb1b27a9488217574356451d35056a96b5

Contents?: true

Size: 391 Bytes

Versions: 5

Compression:

Stored size: 391 Bytes

Contents

require File.join(File.dirname(__FILE__), 'new_image.rb')

include Magick

draw = Draw.new

draw.stroke = 'red'
draw.stroke_linecap 'round'
draw.stroke_width 10.0

draw.line(50, 50, 50, 200)
draw.stroke('blue')
draw.line(50, 200, 200, 200)
draw.stroke('green')
draw.line(200, 200, 50, 50)

b = Image.new(300, 300, HatchFill.new('white', 'black'))

draw.draw b

b.write('draw_line_basic.jpg')

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rmagick4j-0.4.0-java test/eyetests/tests/draw_line_basic.rb
rmagick4j-0.3.9-java test/eyetests/tests/draw_line_basic.rb
rmagick4j-0.3.8 test/eyetests/tests/draw_line_basic.rb
rmagick4j-0.3.7 test/eyetests/tests/draw_line_basic.rb
rmagick4j-0.3.6 test/eyetests/tests/draw_line_basic.rb