Unicode Controls & Classes for VB6 - Version 4

clsGpGraphics.FillPolygon2I Function

Uses a brush to fill the interior of a polygon created by a pointer to an array of POINTL structs (a struct where x and y are long)

Syntax
Public Function FillPolygon2I (ByRef oBr As clsGpBrush, _
ByVal lpPointsL As Long, _
ByVal Count As Long) As GpStatus
Parameters
Parameter Description
ByRef oBr As clsGpBrush The brush to use
ByVal lpPointsL As Long The pointer of the array of POINTL to use for drawing the polygon (use 'ByVal VarPtr YourArray(0)') as parameter
ByVal Count As Long The number of points passed
Remarks
Dim oPn As New clsGpPen
Dim oBr As New clsGpBrush
Dim oGr As clsGpGraphics

oGr.CreateFromHDC lHdc

If bFilled Then
oBr.CreateSolidFill_RawColor moGPSes.ColorFromRGB(lColor, lColorAlpha)
oGr.FillPolygon2I oBr, ByVal VarPtr(aPoli(0)), UBound(aPoli) + 1 'Our array is defined 0 to 4 (so 5 items)
Else
oPn.Create1_RawColor moGPSes.ColorFromRGB(lColor, lColorAlpha), 1, UnitPixel
oGr.DrawPolygonI oPn, ByVal VarPtr(aPoli(0)), UBound(aPoli) + 1 'Our array is defined 0 to 4 (so 5 items)
End If

oPn.Dispose
oBr.Dispose
oGr.Dispose