Re: Fun with arrows

Le Thu, Apr 04, 2002, à 06:03:39PM -0600, Lars Clausen a écrit:

Following Cyrille's suggestion, I tried making a better arrow selection
menu.  What I came up with can be seen at
<URL:>.  The reason
I'm using 1-pixel lines is that with 2-pixel lines, the stem is off-center,
and with 3-pixel lines, you can't tell the three circle-with-slash arrows
from each other.  You'll notice that any defects in the arrow drawing is
highly visible here (for instance the integral line obviously has a
blanked-out area).  Hopefully that will force us to improve the arrows:)

Who hoooo !!  This looks excellent !

(yes, the integral arrow clearly needs to use you new end-point adjustement 

Details: I made this by adding a new renderer, RenderPixmap.  It allows
rendering directly onto a pixmap, with a 1-1 translation of sizes.  Thus I
can use the arrow drawing code directly to draw these.  This shrinks the
dia_arrow_preview_expose function from 404 lines to about 30.  I should be
able to do the same for the arrowhead property widget, though that won't
save code.  I shall also be adding tooltips, I think.

... won't save code, but will replace a textual representation with a
graphical one the user will instantly understand. Globally more consistent.

This is really cool.

And finally, a debugging hint:  I got in the situation where I need to
debug the drawing of a menu.  Now X (or Gtk or someone) doesn't allow you
to change window while a menu window is open, so when gdb stopped while the
arrow menu was up, I couldn't do anything... except change to the console.
So, I run gdb in 'screen' instead, when I am stuck in a menu, I change to
the console and go 'screen -d -r'.  Voila, gdb session in console.

Aaah, if only screen was actually compatible with azerty keyboards...
        -- Cyrille


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