Lazarus

Programming => Graphics => Graphics and Multimedia => BGRABitmap and LazPaint => Topic started by: winni on January 22, 2020, 11:21:35 pm

Title: Compute [Opened | Closed] Spline does not respect EmptyPointF
Post by: winni on January 22, 2020, 11:21:35 pm
@circular

Hi!

I don't know if it is by intention and design or if it is just forgotten.

This fails:
Code: Pascal  [Select][+][-]
  1.  
  2. BGRABitmap.ComputeOpenedSpline(PolyLineWithEmptyPointF, ssSomeOption);

That would be nice to have it, because now I have to do:

separate the arrayOfTPointF into an array of arrayOfTPointF
and then apply the ComputeOpenedSpline on every single  partial polyline.
And finaly I have to concat alle the splines together to one polyline with EmptyPointF inbetween.

Not a must - but nice to have.

Winni

Title: Re: Compute [Opened | Closed] Spline does not respect EmptyPointF
Post by: circular on January 23, 2020, 03:43:41 pm
That's a good point.

Pun intended.  :D

I may in fact split the array in a similar way to implement that.
Title: Re: Compute [Opened | Closed] Spline does not respect EmptyPointF
Post by: winni on January 23, 2020, 10:55:53 pm
Hi!

Just for fun: ComputeOpendSpline is a fine tool to make the font Arial look good ( see attachment).

I wrote "HELLO" on a temp bitmap and vectorized it with BGRA.
Then converted the multi-polygon in an array of polygons.
Applied the spline routine with ssCrossing.
And at last put the splines together to a multi-polygon.

And here is the result!

Winni
Title: Re: Compute [Opened | Closed] Spline does not respect EmptyPointF
Post by: circular on January 23, 2020, 11:03:44 pm
That's fun indeed.  :)
Title: Re: Compute [Opened | Closed] Spline does not respect EmptyPointF
Post by: circular on January 26, 2020, 05:52:30 pm
Hi winni,

On dev branch, I have added support for EmptyPointF in compute spline functions.

You can also specify the index range of the sub spline using compute spline functions in BGRAPath.

I've added as well a parameter to insert empty points in between when concatenating with ConcatPointsF.

Regards
Title: Re: Compute [Opened | Closed] Spline does not respect EmptyPointF
Post by: winni on January 27, 2020, 10:33:59 pm
Hi!

Should I call you Lucky Luke: Fastest gun in the west ......?

Thanx a very lot!

Winni
Title: Re: Compute [Opened | Closed] Spline does not respect EmptyPointF
Post by: circular on January 28, 2020, 02:48:24 pm
 :D
You're very welcome.

Well sometimes it is not too much work.

I missed something with Easy Bezier curves in doing so, I've just fixed it. So you might need to update if you use them.

Regards
TinyPortal © 2005-2018