diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-03-27 17:32:26 +0000 |
---|---|---|
committer | David Laurence Emerson <dle3ab@angelbase.com> | 2013-05-28 00:42:50 -0700 |
commit | 27080df98c700f8ef9ff58d2608d031f9907e30d (patch) | |
tree | 11624fb91c0ffdbe730d76f61f66ae9236432487 /src | |
parent | c5aa9b1adbbe6194a2ab269656bf5abdc0aff95f (diff) | |
download | fpGUI-27080df98c700f8ef9ff58d2608d031f9907e30d.tar.xz |
aggpas backend: finally implemented DoDrawPolygon()
Rather late than never. ;-)
Diffstat (limited to 'src')
-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; |