> Hello, > i want to paint a graph from numerical data using CurveTo. > CurveTo expects 3 points (p1,p2,p3) where p1 == (x1,y1) > If i want to advance in curve plotting i have to add a p4,p5,...pn. > Do i need always to provide the additional point by repeating the > recently added 2 points or is there a smarter not redundant way ? > Paint.CurveTo(p1,p2,p3) > Paint.CurveTo(p2,p3,p4) > PAit.CurveTo(p3,p4,p5) > ..... a.s.o. > Wjere can i find some cairo example code ? > > Cheers wally >
The cairo doc says: « Adds a cubic Bézier spline to the path from the current point to position (X3, Y3) in user-space coordinates, using (X1, Y1) and (X2, Y2) as the control points. After this call the current point will be (X3, Y3). If there is no current point before the call to Cairo.CurveTo this function will behave as if preceded by a call to Cairo.MoveTo(X1, Y1). » That means that you are drawing a curve between the current point and p3, and then p3 becomes the current point. p1 and p2 are used as control points for the bezier spline. If there is no current point (i.e. it's your first drawing instruction), then the spline starts at p1. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user