a simple graphic library
polux
polux2001 at wanadoo.fr
Wed Aug 28 09:15:15 EDT 2002
Chris Barker wrote:
> polux wrote:
>
>>I'd like commands like point(10,10) or something like this to trace a
>>point on the scree like with old langages like BASIC
>
>
> I"ve put together a package that does that kind of thing. It's probably
> overkill for what you need, but has a lot of nifty features:
>
> Arbitrary Floating Point Coordinates
> Double Buffered
> Zoomable and Scrollable
> etc....
>
> It requires wxPython and Numeric
>
> The FloatCanvas module provides a wxPython control that can be imbedded
> in a wxPython application. I've also written a small wrapper application
> that provides a really easy way to just draw stuff to the screen. All
> you need to do is create a draw function that draws what you want, and
> overwrite the App's draw function before starting it.
>
> You can get it from:
> ftp://home.orr.noaa.gov/FTP_ORR/from_orr/ChrisBarker/DrawApp.zip
>
> Feel free to pepper me with questions...
> -Chris
>
> Here's a simple example, there is a longer one in the DrawApp module.
>
> def draw(self):
> Canvas = self.Canvas
> Canvas.AddRectangle(50,35,100,65,FillColor = "Red")
>
> import DrawApp
>
> ## DrawApp.Draw is replaced by the one you just defined above:
> DrawApp.DrawApp.Draw = draw
> ## DrawApp is started:
> DrawApp.DrawApp(0).MainLoop()
>
>
ok
(i'm a newbie)
what's wxpython??
More information about the Python-list
mailing list