lundi 26 mai 2014

Non-conforming drawing primitive definition `line' in Rails MiniMagick. Draw text works but line doesn't


Vote count:

0




Hello I have the following code:



front_piece = MiniMagick::Image.open("public/#{@asset.file_name.url}")
front_piece.crop("450x441+50+0")
front_piece.combine_options do |c|
c.alpha "set"
c.virtual_pixel "transparent"
c.distort :Perspective, '0,0,100,0,500,0,350,50,500,441,350,341,0,441,100,441'
c.fill "white"
c.draw "text 25,100 'My Text'"
c.draw "line '10,10 20,20'"
end


the draw text line works fine but the draw line throws an error: Non-conforming drawing primitive definition `line'


I've tried it in the following other syntax and still none of them work..



c.draw "line '10,10,20,20'"
c.draw "line,10,10,20,20"
c.draw "line 10,10 20,20"


I can't get other draws to work either like rectangle etc.. but I only care about line



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire