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
.



Relevant Pages

  • Re: "Neon" effect for canvas objects?
    ... might run into problems with rendering speed. ... And I'd love it if we could switch the canvas to using some better ... NaTcl is Tcl ported to Google's NaCl, ... NaTk layers atop, talking the browser into doing the cool ...
    (comp.lang.tcl)
  • Re: OpenGL rendering into bitmap
    ... target window's canvas, but I'm interested in doing it directly. ... Rendering to bitmap uses a very basic software renderer, ... This extension is available on all graphics cards and gives ...
    (comp.graphics.api.opengl)
  • Re: Tkinter slowes down
    ... > It seems to me that in my "again and again repainting canvas" script the ... > rendering is slowing down as the time goes. ...
    (comp.lang.python)
  • Re: GUIs - A Modest Proposal
    ... As far as I know, tkpath is either not part of the tk that comes with python, or not accessible via tkinter, or not documented. ... Tkpath 0.3 is a standalone replecement for tk canvas. ... the svg 1.1 specification and the ... It looks interesting but not quite what I need, which is to export a tk canvas that I draw on with Python in a form I can import into OpenOffice. ...
    (comp.lang.python)
  • Re: New Canvas
    ... Tkpath 0.3.0 provides a new canvas widget that is supposed to be 100% ... Enjoy, Mats ... was there anything in particular that you found that you were able to improve that could be put into the standard Tk canvas and that still has a good chance of being implemented and successfully voted on as a TIP? ...
    (comp.lang.tcl)