1. how calculate where should be positioned points and control points in bezier curve (windows implementation), so the curve would go trouught specified list of points?
2. How to anti-alias that curve, so it would look smooth?
BeginPath(Canvas.Handle);
PolyBezier(Canvas.Handle, points, 4);
EndPath(Canvas.Handle);
FlattenPath(Canvas.Handle);
NumLine := getpath(Canvas.Handle, lpPoints, lpTypes, 0);
setlength(lppoints, NumLine);
setlength(lptypes, NumLine);
GetPath(Canvas.Handle, lppoints[0], lptypes[0], NumLine);
for i := 0 to NumLine-1 do begin
case lpTypes[i] of
PT_MOVETO: Canvas.MoveTo(lppoints[i].x, lppoints[i].y);
PT_LINETO: Canvas.LineTo(lppoints[i].x, lppoints[i].y);
end;
end;
Users browsing this forum: No registered users and 15 guests