Pierre fixed it nicely. Was a mistake I did. The class TRSVGPath makes direct call to Athens. So Athens does all the job.
Cheers, Alexandre
On May 9, 2015, at 8:59 AM, stepharo stepharo@free.fr wrote:
Le 28/4/15 17:32, Alexandre Bergel a écrit :
Hi Peter!
This is a problem we have had for a while. I did not think about comparing it with the path. We will rewrite RTBezierLine to use TRSVGPath
How the bezier is computed for TRSVGPath?
We will let you know
Cheers, Alexandre
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Apr 27, 2015, at 6:34 PM, Peter Uhnák i.uhnak@gmail.com wrote:
Hi,
it seems that last control point of a bezier line is off. Here is a comparative view of RTBezierLine (black line) and bezier line done with SVG (red line). Notice how the bottom half is flatlined and doesn't match up.
<2015-04-28_00:29:16.png> And the code (based on RTRoassalExample>>exampleBezierCurve):
| v e1 e2 l s p1 p2 path svg| v := RTView new. e1 := (RTEllipse new size: 15; color: (Color blue alpha: 0.4)) element. e2 := (RTEllipse new size: 15; color: (Color blue alpha: 0.4)) element. e2 translateBy: -150 @ 150. p1 := RTBox element. p2 := RTBox element. p1 translateTo: (e2 position x + e1 position x / 2) @ e1 position y. p2 translateTo: (e2 position x + e1 position x / 2) @ e2 position y. v add: p1. v add: p2. s := RTBezierLine new. s color: Color black. s controllingElements: (Array with: p1 with: p2). l := s edgeFrom: e1 to: e2. v add: e1. v add: e2. v add: l. path := 'M -150 150 Q -75 150 -75 75 Q -75 0 0 0'. svg := RTSVGPath new borderColor: Color red; path: path; element. v add: svg. ^ v
Peter
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list
Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev