Hi Vasilis!

You can try using tkpath extension as an example of such drawing. But there
is a simpler way. You can use regular Frame configured with empty background
value:

frame['background']=''

Such frame option stops Tk frame refresh so your drawing will not be cleared
after different window events. To start drawing you just need to get window
ID or XID+Display
(for XWin system) from Tcl interpreter. Also you can using multiplatform
built-in Tk C-functions for drawing to simplifity your code base. But
unfortunately this functionality doesn't
provide antialiased graphics.

Regards,

Igor Novikov
sK1 Project
http://sk1project.org

On Fri, Mar 5, 2010 at 10:14 AM, Vasilis Vlachoudis <
vasilis.vlachou...@cern.ch> wrote:

> Hi all,
>
> I have an application that it requires to plot the result from some heavy
> calculation. Python is slow, so I am writing the calculation part as a C++
> extension for python. Is it possible to draw directly to a Canvas opened
> from Tkinter from the C++ extension, in order to avoid useless transfer of
> data from C++ to python to tkinter?
>
> vasilis
>
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss@python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to