<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 6, 2016 at 11:20 AM, Vojtěch Čihák <span dir="ltr"><<a href="mailto:vojtech.cihak@atlas.cz" target="_blank">vojtech.cihak@atlas.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p style="padding:0px;margin:0px"></p>

<p style="padding:0px;margin:0px"><span style="color:rgb(37,37,37);font-family:sans-serif;line-height:21px;font-size:10pt"></span></p>

<p style="padding:0px;margin:0px"><span style="color:rgb(37,37,37);font-family:sans-serif;line-height:21px;font-size:10pt">I vote for keeping procedure but there should be added boolean parameter + patch for painting anti-clockwise swastika (which is </span><span style="color:rgb(37,37,37);font-family:sans-serif;line-height:21px;font-size:10pt">religious symbol only).</span></p></blockquote><div><br>Fair enough.<br></div><div>Here's the patch. (Anyone,) please create a bug report, so it could be applied.<br><br></div><div>thanks,<br></div><div>Dmitry<br></div><div><br><br>Index: extgraphics.pas<br>===================================================================<br>--- extgraphics.pas    (revision 51191)<br>+++ extgraphics.pas    (working copy)<br>@@ -56,7 +56,7 @@<br> procedure PaintRightTriangle(Canvas: TCanvas; const PaintRect: TRect;<br>   RadAngle :Extended=0.0);<br> procedure PaintSwastika(Canvas: TCanvas; const PaintRect: TRect;<br>-  RadAngle :Extended=0.0);<br>+  RadAngle :Extended=0.0; ClockWise: Boolean = true);<br> procedure PaintTriangle(Canvas: TCanvas; const PaintRect: TRect;<br>   RadAngle :Extended=0.0);<br> procedure PaintTriangular(Canvas: TCanvas; const PaintRect: TRect;<br>@@ -583,8 +583,10 @@<br> end;<br> <br> <br>-procedure InitSwastika(var P:array of TPoint;const R: TRect;var NumPts:Integer);<br>+procedure InitSwastika(var P:array of TPoint;const R: TRect;var NumPts:Integer; CW: Boolean = true);<br> var x1,x2,y1,y2:Integer;<br>+  t: TPoint;<br>+  i: integer;<br> begin<br>   x1:=(R.Right-R.Left) div 5;<br>   y1:=(R.Bottom-R.Top) div 5;<br>@@ -601,8 +603,21 @@<br>   P[16].x:=P[15].x;P[16].y:=R.Bottom-y1;P[17].x:=R.Left+x2;P[17].y:=P[16].y;<br>   P[18].x:=P[17].x;P[18].y:=R.Bottom-y2;P[19].x:=R.Left;P[19].y:=P[18].y;<br>   NumPts:=20;<br>+  if not CW then<br>+    for i:=0 to NumPts -1 do<br>+      p[i].x:=R.Right - (p[i].x - R.left);<br> end;<br> <br>+procedure InitSwastikaCW(var P:array of TPoint;const R: TRect;var NumPts:Integer);<br>+begin<br>+  InitSwastika(P, R, NumPts, true);<br>+end;<br>+<br>+procedure InitSwastikaCCW(var P:array of TPoint;const R: TRect;var NumPts:Integer);<br>+begin<br>+  InitSwastika(P, R, NumPts, false);<br>+end;<br>+<br> procedure InitTriangle(var P:array of TPoint; const R: TRect;<br>   var NumPts:Integer);<br> begin<br>@@ -719,9 +734,12 @@<br>   InitPolygon(Canvas,PaintRect,RadAngle,@InitRightTriangle);<br> end;<br> <br>-procedure PaintSwastika(Canvas: TCanvas; const PaintRect: TRect;RadAngle :Extended=0.0);<br>+procedure PaintSwastika(Canvas: TCanvas; const PaintRect: TRect;RadAngle :Extended=0.0; ClockWise: Boolean = true);<br> begin<br>-  InitPolygon(Canvas,PaintRect,RadAngle,@InitSwastika);<br>+  if ClockWise then<br>+    InitPolygon(Canvas,PaintRect,RadAngle,@InitSwastikaCW)<br>+  else<br>+    InitPolygon(Canvas,PaintRect,RadAngle,@InitSwastikaCCW);<br> end;<br> <br> procedure PaintTriangle(Canvas: TCanvas; const PaintRect: TRect;RadAngle :Extended=0.0);<br> <br></div></div></div></div>