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

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

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

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post 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.
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post 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().
User avatar
rmabry
Posts: 148
Joined: 2004-04-13T11:25:27-07:00

Post 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
Last edited by rmabry on 2006-12-28T21:41:23-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post 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).
Post Reply