diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-27 17:32:26 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-27 17:32:26 +0000 |
commit | 51f318480fb8e5fef8314186a882a49bc93009af (patch) | |
tree | d97e4628b0ab4d33965e774dd3f3e4c50a0cdf37 /src/corelib/render/software | |
parent | 255e943caa0d000f43f98442297f55413fa816ed (diff) | |
download | fpGUI-51f318480fb8e5fef8314186a882a49bc93009af.tar.xz |
aggpas backend: finally implemented DoDrawPolygon()
Rather late than never. ;-)
Diffstat (limited to 'src/corelib/render/software')
-rw-r--r-- | src/corelib/render/software/Agg2D.pas | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/corelib/render/software/Agg2D.pas b/src/corelib/render/software/Agg2D.pas index 36737c2b..280736af 100644 --- a/src/corelib/render/software/Agg2D.pas +++ b/src/corelib/render/software/Agg2D.pas @@ -3749,8 +3749,21 @@ begin end; procedure TAgg2D.DoDrawPolygon(Points: PPoint; NumPts: Integer; Winding: boolean); +var + i: integer; + poly: array of double; begin - + SetLength(poly, (NumPts*2)+1); // dynamic arrays start at 0, but we want to use 1..NumPts + for i := 1 to NumPts do + begin + poly[i * 2 - 1] := Points[i-1].X + 0.5; + poly[i * 2] := Points[i-1].Y + 0.5; + end; + // Draw Polygon + LineWidth(1); + LineColor(LineColor); + FillColor($00, $00, $00); // clBlack for now + Polygon(@poly[1], NumPts); end; |