Re: Large canvas text position issues



On May 11, 6:09 am, Donald Arseneau <a...@xxxxxxxxx> wrote:
On May 7, 2:06 pm, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:

make an image out of any text and use that to detect where the "ink"
is.

I'm interested; how do you do that ?

I know about the 'window' image format from the Img package, but
unfortunately it works only by grabbing the really displayed

I had thought either the Img or BLT facility did the trick, but
it seems not.

Even the canvas postscript route produced high-level postscript
that does not exactly match the canvas rendering.  It could be
used, with a constricted pipeling through ghostscript or some
other renderer to make an approximate bitmap that could then
be used by Tcl.

Yes. It looks like Roger's suggestion of tkPath is the only method
satisfying all the conditions:

- works with vanilla canvas items, not new commands like pixane
- really offscreen, not screen snapshot like Img

Side note: maybe it would make sense to integrate at least some parts
of TkPath in Tk. In addition to this offscreen rendering issue, it
exposes the advanced Cairo-like graphical primitives that are now
becoming popular through HTML5's <canvas> tag. Just a matter of
keeping up with the Javascript competition...

-Alex
.