Recent

Author Topic: Canvas.PolyBezier  (Read 691 times)

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 392
Canvas.PolyBezier
« on: July 07, 2025, 02:56:28 pm »
Do tell why left data draws something, right draws nothing ?
Code: Pascal  [Select][+][-]
  1. PaintBox1.Canvas.PolyBezier(Points_Polybezier);  
  2.  
« Last Edit: July 07, 2025, 02:58:15 pm by BubikolRamios »
lazarus 3.2-fpc-3.2.2-win32/win64

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 392
Re: Canvas.PolyBezier
« Reply #1 on: July 07, 2025, 03:18:02 pm »
Hmm, it appears that first and last point must be approx the same ?

Edit: Ignore that, seems so just in this case.
lazarus 3.2-fpc-3.2.2-win32/win64

wp

  • Hero Member
  • *****
  • Posts: 13504
Re: Canvas.PolyBezier
« Reply #2 on: July 08, 2025, 12:16:24 am »
The PolyBezier function is very nitpicking about the number of points. When the "Continuous" argument is true (it is optional and true by default), there must not be any extra points, i.e. for N spline segments there must be 3*N + 1 points - otherwise nothing is painted at all!

There is a bug report about it: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41747

Delphi, BTW, has the same behaviour. So, the big question then is: Is it a bug then or not?

 

TinyPortal © 2005-2018