Re: XOR, was : Drawing text into a drawing area with Pango



On Wed, 18 Feb 2004, Owen Taylor wrote:

[snip]

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.

Hmmmm, well, ummmmm, then maybe I'll switch to drawing a box the size of
the text string instead of the text itself.  That way I can use the XOR
with the outlining box to preserve the underlying drawing, and only
actually commit the text once the user has released the mouse button.

Yes, that would probably work.

So, now I have to figure out how to get the size of the outlining box (in
pixels) from the length of the text string and the font.

Thanks,

Bryan


*---------------------------------------------------------------
* Bryan Brown      <*>              bbrown radix net
* http://www.radix.net/~bbrown
*---------------------------------------------------------------




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]