Page 1 of 1

Draw(primitive=>'text', ...)

Posted: 2006-12-28T10:10:58-07:00
by rmabry
Simple question, surely I'm overlooking the obvious: Can Draw( ) be used to add text?

The PerlMagick doc lists the 'text' primitive as being available to Draw, but I do not see what to use to set the text string.

primitive=>{point, line, rectangle, arc, ellipse, circle, path, polyline, polygon, bezier, color, matte, text, @filename}

Should the 'text' primitive be deleted from that list? I see that Annotate gives an alternate method.

Rick

Posted: 2006-12-28T10:22:42-07:00
by magick
Use Annotate() for rendering text. You can specify text as a drawing primitive in Draw(), however, there is currently no way to specify the content to render.

Posted: 2006-12-28T11:53:11-07:00
by rmabry
magick wrote: You can specify text as a drawing primitive in Draw(), however, there is currently no way to specify the content to render.


Does "currently no way" imply a future way? Should the doc mention the "no way" part? (It would have saved me a bunch of time, maybe others.)

The doc (at Draw) could drop the 'text' primitive and the note simply changed from

"Note: 'fill' fills strokes with color, while 'tile' fills strokes with an image, meaning these options are mutually exclusive"

to

"Note: 'fill' fills strokes with color, while 'tile' fills strokes with an image, meaning these options are mutually exclusive. No 'text' primitive is currently available, so use the Annotate method to add text."

Not a high-priority issue, of course.

Rick

Posted: 2006-12-28T12:48:03-07:00
by magick
Yes we were implying the problem would be fixed in the future. The future is here. The problem is fixed in ImageMagick 6.3.1-5 Beta which will be available by tommorrow. We added a text parameter to Draw().

Posted: 2006-12-28T16:33:31-07:00
by rmabry
magick wrote: Yes we were implying the problem would be fixed in the future. The future is here.


Mr. Wizard! Are you now fixing things before we can even ask? Okay, Karnack, I'm thinking of a problem. I'll expect a fix in the 6.3.1-6 Beta.

Thanks for your prompt attention.

Rick

Posted: 2006-12-28T21:15:02-07:00
by magick
We understand your problem but unfortunately we need to take a break and attend to other matters. In the mean-time, ImageMagick 6.3.1-5 has been released with your Draw() method fix (i.e. text parameter).