3 pdf = GFX::PDF.new('segfault.pdf')
5 class TestRender < GFX::Device
6 def startpage(width,height)
7 puts "startpage(#{width},#{height})"
12 def setparameter(key,value)
13 puts "setparameter(#{key},#{value})"
16 puts "startclip(#{line.inspect})"
21 def stroke(line, width, color, cap_style, joint_style, miterLimit)
22 puts "stroke(#{line.inspect}, #{width}, #{color.inspect}, #{cap_style}, #{joint_style}, #{miterLimit})"
25 puts "fill(#{line.inspect}, #{color.inspect})"
27 def fillbitmap(line, img, imgcoord2devcoord, cxform)
28 puts "fillbitmap(#{line.inspect}, #{img}, #{imgcoord2devcoord}, #{cxform})"
30 def fillgradient(dev, line, gradient, type, gradcoord2devcoord)
31 puts "fillgradient(#{line.inspect}, #{gradient}, #{type}, #{gradcoord2devcoord})"
34 puts "addfont(#{font.name})"
36 def drawchar(font, glyph, color, matrix)
37 puts "drawchar(#{font.name}, #{glyph}, #{color.inspect}, #{matrix.inspect})"
39 def drawlink(line, action)
40 puts "drawchar(#{line.inspect}, #{action})"
45 pdf.each_page do |page|
46 puts "#{page.nr} #{page.width}x#{page.height}"