[LAMW] Bug: jCanvasES2.DrawCircle lazarus / 43-Android ---------------------------------------------------------------------- Handoko · 2019-03-26 11:35 jCanvasES2.DrawCircle in Laz_And_GLESv2_Canvas.pas causes an out of range error: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Procedure jCanvasES2.DrawCircle  (XY : TXY; Z, L : Single; Color : TRGBA; Width : Single = 0.3);var  i : Integer;begin  if not FInitialized then Exit;  For i := 0 to 71 do   DrawLine ( _XYZ(cCircle[(i+0)*2+0]*L+XY.X, cCircle[(i+0)*2+1]*L+XY.Y, Z),            _XYZ(cCircle[(i+0)*2+2]*L+XY.X, cCircle[(i+0)*2+3]*L+XY.Y, Z),            Color,Width);end; My suggestion for fixing the bug: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Procedure jCanvasES2.DrawCircle(XY: TXY; Z, L: Single; AColor: TRGBA; AWidth: Single = 0.3);var  i: Integer;begin  if not FInitialized then Exit;  For i := 0 to 70 do    DrawLine(      _XYZ(cCircle[i*2]  *L+XY.X, cCircle[i*2+1]*L+XY.Y, Z),      _XYZ(cCircle[i*2+2]*L+XY.X, cCircle[i*2+3]*L+XY.Y, Z),      AColor, AWidth      );  DrawLine(    _XYZ(cCircle[0]  *L+XY.X, cCircle[1]  *L+XY.Y, Z),    _XYZ(cCircle[142]*L+XY.X, cCircle[143]*L+XY.Y, Z),    AColor, AWidth  );end; I personally prefer AColor and AWidth as the names for the parameters but that is not necessary. This bug report is related with this post: https://forum.lazarus.freepascal.org/index.php/topic,44811