New arrows for ConnectorMorph
Noury Bouraqadi
bouraqadi at ensm-douai.fr
Thu Sep 7 22:46:02 UTC 2006
Thanks Andreas for your help.
Do you know if there any constraints/dependencies on/between points
belonging to two different segments defined for the same arrow ?
Though we know about bezier curves, still we don't fully understand
the implementation. We'd like to draw an open symbol, something like
a "lower than" (<) symbol.
Noury
Le 7 sept. 06 à 08:30, Andreas Raab a écrit :
> Noury Bouraqadi wrote:
>> 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.
>
> This is a quadratic bezier curve. Each segment is made up by three
> consecutive points where the first and the third point are start
> and end and the intermediate is a control point that describes how
> the curve is shaped. To draw straight lines, have the intermediate
> point coincide with either start or end. See also (but for cubic
> beziers) the description at wikipedia:
>
> http://en.wikipedia.org/wiki/Bezier_curve
>
> On a related note, be advised that non-rational bezier curves
> cannot truthfully approximate circles and other conic sections. To
> approximate ellipses see Bezier2Segment class>>makeEllipseSegments:
> in the 3.9 graphics package. The points you see in Ned's spec are
> the control points of such segments (this may be helpful with
> exploring the exact shape you are trying to construct).
>
> Hope this helps,
> - Andreas
>
------------------------------------------------------------------
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
|