Help with CurveFitter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Help with CurveFitter

Alexandre Bergel
Dear List,

For Mondrian, I encounter a problem with CurveFitter.
I tried to isolate the problem in the following code. You just need to  
doIt in a workspace:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| myMorph window pane morphCls |
morphCls := Morph subclass: #MyTestMorph.
morphCls compile: 'drawOn: aCanvas
        | curve |
        super drawOn: aCanvas.
        aCanvas fillOval: (10@30 corner: 150@290) color: Color lightRed  
borderWidth: 4 borderColor: Color black.
        curve := CurveFitter new.
        curve form: ((Form extent: 4@4 depth: Display depth) fillWithColor:  
Color lightBlue; yourself).
        curve firstPoint: 10@30.
        curve secondPoint: 40@150.
        curve thirdPoint: 140@290.
        curve displayOn: aCanvas form.
'.
myMorph := morphCls new.
myMorph extent: 3000 @ 2000.
window := SystemWindow labelled: 'My Example'.
window extent: 640 @ 480.
pane := ScrollPane new.
pane scroller addMorph: myMorph.
window
        addMorph: pane
        fullFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
window openInWorld.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

What I would like to have, is the curve to go with the oval when I use  
the scrollbar. Any idea how to fix this?

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project