RE: Fun with arrows



Lars,

Are you able to integrate this with the code that Richard Rowell proposed
(see 1 Feb 2002, subject: Dynamic Arrows)?? Or, Richard, if you are out
there, can you integrate with Lars' code??

All looks very nice from where I sit.

Regards,
Rob.

-----Original Message-----
From: Lars Clausen [mailto:lrclause cs uiuc edu]
Sent: Friday, 5 April 2002 9:34 AM
To: dia-list gnome org
Subject: Fun with arrows



Following Cyrille's suggestion, I tried making a better arrow 
selection
menu.  What I came up with can be seen at
<URL:http://shasta.cs.uiuc.edu/~lrclause/Dia/newarrows.png>.  
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:)

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.

Any objections to this?

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.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| Hårdgrim 
of Numenor
"I do not agree with a word that you say, but I   
|----------------------------
will defend to the death your right to say it."   | Where are 
we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's 
with the handbasket?
_______________________________________________
Dia-list mailing list
Dia-list gnome org
http://mail.gnome.org/mailman/listinfo/dia-list




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