Re: recommend a graphics library for plotting by the pixel?
- From: Ian Kelly <ian.g.kelly@xxxxxxxxx>
- Date: Tue, 4 Oct 2011 09:49:58 -0600
On Tue, Oct 4, 2011 at 3:56 AM, Adam Funk <a24061@xxxxxxxxxxxxx> wrote:
I'd like to create a window with a "pause" button and a large plotting
area, in which I'd like to draw a polygon, detect the pixel
coördinates of a mouse click, and then start setting the colors of
pixels by (x,y) coördinates. (This is just for my own amusement, to
play with some formulas for generating fractals using random numbers.)
There seems to be a large number of different python GUI libraries,
and I wonder if someone can recommend the easiests one to learn for
this purpose? (The only python graphics library I've used is PyGame,
which I don't think is the way to go here.)
You could use wxPython. You'll need to create a custom control and
have it paint itself by blitting from a wx.Bitmap, which you'll draw
on by using a wx.MemoryDC and then refreshing the control.
I would probably just use pygame myself. I guess you're avoiding it
because of the requirement for a button, but there are GUI libraries
available for it, or if all you need are a couple of buttons you could
easily roll your own.
Stay away from the Tkinter Canvas widget. It does vector graphics,
and it will be inefficient if you try to use it as a raster.
Cheers,
Ian
.
- Follow-Ups:
- Re: recommend a graphics library for plotting by the pixel?
- From: Adam Funk
- Re: recommend a graphics library for plotting by the pixel?
- References:
- recommend a graphics library for plotting by the pixel?
- From: Adam Funk
- recommend a graphics library for plotting by the pixel?
- Prev by Date: Re: Question: How to Prevent Tkinter Menu from Taking Keyboard Focus
- Next by Date: Re: Is it possible to create C-style "main" function in Python? (for teaching purposes)
- Previous by thread: Re: recommend a graphics library for plotting by the pixel?
- Next by thread: Re: recommend a graphics library for plotting by the pixel?
- Index(es):
Relevant Pages
|