Once the package is installed, you need to specify package dependency in the project inspector. Then you can move your project whereever you want.
Once the package is installed, you need to specify package dependency in the project inspector. Then you can move your project whereever you want.
I have a little problem. I want to draw a closed polygon, but it doesn't work:
The last parameter is called Closed, so I presume that when I pass true, I will get a closed spline, but It's still open.Code:var image: TBGRABitmap; storedSpline: array of TPointF; c: TBGRAPixel; begin image := TBGRABitmap.Create(ClientWidth,ClientHeight,ColorToBGRA(ColorToRGB(clBtnFace))); c := ColorToBGRA(ColorToRGB(clWindowText)); setLength(storedSpline, 3); storedSpline[0].x := 50; storedSpline[0].y := 50; storedSpline[1].x := 100; storedSpline[1].y := 100; storedSpline[2].x := 0; storedSpline[2].y := 100; image.DrawPolylineAntialias(storedSpline,c,1, true); //This call should draw a closed spline image.Draw(Canvas,0,0,True); image.free; end;
Anybody?
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
It's normal. A polyline is not a closed figure. The closed parameter means that the end of the segment is closed. See here :
http://wiki.lazarus.freepascal.org/B...map_tutorial_6
If you want to draw a closed path, then use DrawPolygonAntialias.
By the way, naming a variable storedSpline does not automatically create a spline. You need to call ComputeClosedSpline. See here :
http://wiki.lazarus.freepascal.org/B...map_tutorial_7
If you feel the tutorial is ambiguous somewhere, please tell me what you suggest to add or change.
Last edited by circular; 09-04-2011 at 10:22 PM. Reason: spline
Thanks! It works great now.
Don't pay attention to that name. I was reusing that name from another piece of code that did use a spline.By the way, naming a variable storedSpline does not automatically create a spline. You need to call ComputeClosedSpline. See here :
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
Hello,
I've added a new tutorial about texture mapping :
http://wiki.lazarus.freepascal.org/B...ap_tutorial_10
Enjoy
Hello people,
I've added comments to BGRABitmap source code, so it's easy to browse and hopefully to understand it.
You can have a look in the last zip file (3.7) :
https://sourceforge.net/projects/lazpaint/files/src/
If something is hard to understand, tell me so I'll add more comments.
By the way, LazPaint textures look better, and blur filter is faster (the fast blur is very fast indeed).
Thanks for the update! My Spline Editor project makes good use of the BGRABitmap library. I wouldn't have had such a good looking interface if you hadn't written those tutorials.
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
Bookmarks