gEDA-dev: libstroke testing
Peter Clifton
pcjc2 at cam.ac.uk
Fri Aug 24 18:41:10 EDT 2007
On Fri, 2007-08-24 at 15:32 -0700, Steve Meier wrote:
> Doesn't the math of xor drawing take care of the issue of damage as you
> drag an object around?
>
> Doesn't gschem xor to position the object and then xor to remove it?
>
> Steve Meier
It does when moving stuff about, however objects actually placed on the
page are drawn with a normal stroking operation.
Quoting:
http://mail.gnome.org/archives/gtk-app-devel-list/2004-February/msg00332.html
"
GTK+-2.x typically is using anti-aliasing to draw text, and XOR simply
isn't a meaningful operation for anti-aliased text. So you'll probably
have to switch to actually redrawing to clear the previous text
position.
"
I'm not sure I agree _entirely_ - just that the colours your painting
would have to be drawn anti-aliased onto the background colour we're
working with, and the whole buffer XOR'd with the background colour
again.
We'd then have to XOR blit this buffer onto where we wanted to drag text
across. A first XOR blit with an area filled with the background colour
would give us the anti-aliased image drawn on the background as we
originally rendered the text. (Apart from any painted areas, where the
XOR changes the colours). A second XOR blit reverts it.
I know XOR was previously _the_ hardware accelerated graphics method
(avoiding repaints and such), however it seems that its utility is
becoming less - for reasons such as this above.
Peter
More information about the geda-dev
mailing list