Exception with DrawRoundRectangle(10, 10, 5, 5, 5);

AGraphics.DrawRoundRectangle(10, 10, 5, 5, 5) raise a Exception.

We couldn't reproduce this here, please provide more information:

  • VCL, FMX, WEB?
  • post a code snippet reproducing the issue.

VCL just put in a onDraw Function from TMSFNCPlanner.

The Exceptions raises beause the Rectangle X1,Y1 > X2,>Y2

Then it's a matter of checking if the coordinates you pass along are falling within the boundaries of an acceptable rectangle.

a range error exception is wanted?

at vcl raises no exception.

Canvas.RoundRect(TRect.Create(10, 10, 5, 5), 5, 5);