← Back to team overview

kicad-developers team mailing list archive

Re: Graphics Abstraction Layer for KiCad

 

Hi Dick,

> And we would simply use a redraw technique, but my assumption could be
> wrong.  And I have wondered about how we could do the interactive
> rubber-banding box drawing without XOR, same way Torsten?

XOR drawing is one of the simplest ways for erasing the old drawing; but artifacts are the problem (this is rather a bug than a feature). In theory OpenGL for instance supports the XOR operator; but only in color index mode.
I'd prefer not to use XOR, instead I'd first try the redrawing of the scene (a double buffer is already used) - if that's too slow I'd save the old frame buffer to an aux buffer, overdraw the screen with the moved object and then restore the old contents via blitting. Blitting is already done for the cursor.
  
> Again, I do think the feature you Lorenzo highlight would be slick, and
> would actually be a little more intentional than some of the artifacts
> we have now.  Those current artifacts are more like litter left behind
> after a picnic :), but seem to have been found useful.

The application should handle that - the old shape would be drawn grey before moving.
 
> > My newest machine is a dual core with a radeon 200 mobility (about 3yo)
> > and the only driver available is the open source one! And it's renowned
> > for sucking at opengl :P

AFAIK the Radeon 200 is based on the X300 Mobility; which is older than 5 years. It's true that there could be a better support for Linux, but the newer products have a good OpenGL support - both ATI and NVIDIA offer drivers, which have the same code base like their Windows variants.

--

I think the wxGCDC (backend is Cairo on Linux) variant is slow, because for every graphics primitive a new path for the pen is created. This is very ineffective - ideally when you're drawing something with Cairo the paths should be as long as possible. One good example is text drawing, there one path could be used.

Bye ..
Torsten

(Sorry Dick for double posting have used the wrong address)
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01



Follow ups