Hi Folks Firstly, here a sample of what I'm aiming for - Text along a polyline: http://savage.net.au/ImageMagick/polytext/target.jpg This image was kindly created for me by Francisco Ferreiro using Corel Draw. I'm going to release my version as the Perl module ImageMagick::PolyText.
Now for the problems: Here's an image http://savage.net.au/ImageMagick/polytext/polytext.png of text drawn along a line, both with the letter E as 'normal' and as rotated text, with the degree of rotation matching the tangent of the curve at the marked points. The program to generate this is here: http://savage.net.au/ImageMagick/polytext/polytext.pl and the log of my run, using IM 6.3.6 Q 16, is here: http://savage.net.au/ImageMagick/polytext/polytext.log 1) From the log you'll see the values returned by QueryFontMetrics() are meaningless when the text is rotated. I was hoping the values would be adjusted appropriately according to the rotation, or even unchanged. The problem with the current values is that they are unusable in fine-tuning the location of the text. Would it be possible to patch IM to leave them unchanged, or fix them? 2) Regarding the values returned by QueryFontMetrics(), I could not find on the IM web site, nor on Anthony's examples, nor in my 3 books on IM, a definition of all of the terms (copied from the program): 0 => 'character width', 1 => 'character height', 2 => 'ascender', 3 => 'descender', 4 => 'text width', 5 => 'text height', 6 => 'maximum horizontal advance', 7 => 'bounds.x1', 8 => 'bounds.y1', 9 => 'bounds.x2', 10 => 'bounds.y2', 11 => 'origin.x', 12 => 'origin.y', Apologies if I missed it! I assume char width/height are the bounds on the letter E including space within the glyph (as per the pointsize value), and text width/height exclude that space. Ascender and descender I can see at: http://en.wikipedia.org/wiki/Ascender OK so far. But can someone define the other terms? TIA. 3) How come the bounds, drawn in blue, don't surround the E? Or, what value is or could be provided by these 4 values? 4) It looks like the convention for rotation is that zero degrees is along the x-axis, and positive values are clockwise from there. Is this interpretation correct? 5) Around what point does the rotation take place? I assume it's the (x, y) point in the call to Annotate. Or, is it offset by any of the values in the (unrotated) call to Annotate()? 6) Going from the first rotated E at 53 degrees to the last at -51 degrees, the E itself creeps away from the (x, y) point, as seen by its distance from the blue box. Is this indicative of a bug? -- Ron Savage [EMAIL PROTECTED] http://savage.net.au/index.html _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
