Re: Fast 2D Raster Rendering with GUI



On Mar 18, 4:36 am, dave <man...@xxxxxxxxx> wrote:
Hi All. I've been formulating in my head a simple image editor. I
actually started prototyping is some time ago in Java, but am liking
Python more and more. My editor will be nowhere near the level of Gimp/
Photoshop, but I do need fast pixel level control and display. For
instance, that means no automatic anti-aliasing and that I will be
implementing my own line drawing algorithms.

I've got the high level architectual aspects of my program down, but
am stuck on what graphics API to use. I want a canvas area of
adjustable size which users can draw on with as little lag as
possible. The canvas area will be composed of layers (i.e. I require
an alpha channel) and I need to be able to zoom in and out of it (zoom
levels will be at fixed intervals, so this can be simulated if need
be.)

I started looking at PyGame but realize that I need to integrate a GUI
into the whole thing (or integrate the image into the GUI rather) and
I didn't see a straightforward way to do that. Of course, I don't even
know if PyGame is the right API for the job anyways :P

Any thoughts or ideas that could help me get started? Thanks!

Look at the PIL source code for reference and implement your own C
extensions for drawing and image manipulation. Or write your app on
top of PIL. Any GUI toolkit will work if you find the low-level access
to their image memory buffers. PyGame is for multimedia applications,
you probably need Tkinter, Qt, wx or GTK.

And as long as you need such low-level things as custom drawing and
anti-aliasing your API is plain old C malloc's, free's and raw memory
addresses.

--
Ivan
.



Relevant Pages

  • Re: Draw pixel
    ... whether Autoredraw is True or not. ... As far as drawing individual pixels ... difference the API is up ...
    (comp.lang.basic.visual.misc)
  • Re: Ruby GUI recommendations?
    ... >> Which GUI lib is the best and which is the most widely used? ... >> I would prefer a good minimal OO API, ... > The most complete and stable toolkit you'll find with the better ruby bindings ... > works if you want to use just the basic widgets ...
    (comp.lang.ruby)
  • Re: GUI without resource files
    ... the legacy application used the IBM Mainframe GDDM ... GUI API to use, especially if you're familiar with GDDM which has some ... It allows but does not require resource files, and the callback ...
    (comp.lang.fortran)
  • Re: Positioning ouput on printed pages
    ... > appropriate values from GetDeviceCaps and then setting the Printer Object's ... > when using native VB printer object drawing methods, because the API ... > Private Const PHYSICALOFFSETX As Long = 112 ...
    (microsoft.public.vb.general.discussion)
  • Re: Mac OS X and Linux
    ... Between Quartz and any linux GUI API, ... > any old Apple product and it will think it's talking to it's old system. ...
    (comp.os.linux.misc)