New arrows for ConnectorMorph

Noury Bouraqadi bouraqadi at ensm-douai.fr
Thu Sep 7 05:53:09 UTC 2006


Hi,

I'd like to have connectors with new arrow shapes (circles, arcs,  
rhombus...)
How can do that? Together with Serge, we had a look on class methods  
such as NCAAConnectorMorph class>>#basicArrow (see code below).
But, we could not figure-out how to easily and cleanly change the  
points to have the expected shape.

Thanks,
Noury
------------
NCAAConnectorMorph class>>#basicArrow
	"glyph 54 from Arrows1"
^(NCLineArrowGlyph withContours: (
(Array new: 1)
	at: 1 put: {
	0.0 at 0.0 . 0.0 at 0.0 . -0.5 at 0.3298 .
	-0.5 at 0.3298 . -0.5 at 0.3298 . 0.0 at -0.666 .
	0.0 at -0.666 . 0.0 at -0.666 . 0.5 at 0.3298 .
	0.5 at 0.3298 . 0.5 at 0.3298 . 0.0 at 0.0 };
	yourself
"clicks 0.0 at 0.0"
)) offset: 0 at 0.666;
defaultScale: 3.0;
yourself

------------------------------------------------------------------
Dr. Noury Bouraqadi - Enseignant/Chercheur
ARMINES - Ecole des Mines de Douai - Dept. I.A.
http://csl.ensm-douai.fr/noury

European Smalltalk Users Group Board
http://www.esug.org

Squeak: a Free Smalltalk
http://www.squeak.org
------------------------------------------------------------------






More information about the Squeak-dev mailing list