DrawPolygon Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Draws a polygon on the drawing surface.

Namespace:  Microsoft.SPOT.Presentation.Media
Assembly:  Microsoft.SPOT.TinyCore (in Microsoft.SPOT.TinyCore.dll)

Syntax

'Declaration
Public Sub DrawPolygon ( _
    brush As Brush, _
    pen As Pen, _
    pts As Integer() _
)
public void DrawPolygon(
    Brush brush,
    Pen pen,
    int[] pts
)
public:
void DrawPolygon(
    Brush^ brush, 
    Pen^ pen, 
    array<int>^ pts
)
member DrawPolygon : 
        brush:Brush * 
        pen:Pen * 
        pts:int[] -> unit 
public function DrawPolygon(
    brush : Brush, 
    pen : Pen, 
    pts : int[]
)

Parameters

  • brush
    Type: Microsoft.SPOT.Presentation.Media. . :: . .Brush
    The brush with which the polygon is to be filled. This parameter is optional, and it can be nullNothingnullptrunita null reference (Nothing in Visual Basic). If the value of brush is nullNothingnullptrunita null reference (Nothing in Visual Basic), the polygon is not filled.
  • pen
    Type: Microsoft.SPOT.Presentation.Media. . :: . .Pen
    The pen with which the outline of the polygon is to be drawn. This parameter is optional, and it can be nullNothingnullptrunita null reference (Nothing in Visual Basic). If the value of pen is nullNothingnullptrunita null reference (Nothing in Visual Basic), no outline is drawn.
  • pts
    Type: array<System. . :: . .Int32> [] () [] []
    An array of points that specify the vertices of the polygon.

Remarks

If the first and last points in the array are not identical, a line is drawn between them to close the polygon.

The pts array contains pairs of x,y values, where pts[0] is the first x value and pts[1] is the first y value. If there is an odd number of values in the pts array, this method ignores the last value.

The drawing is not visible if the values of both the pen and brush parameters are null Nothing nullptr unit a null reference (Nothing in Visual Basic) .

.NET Framework Security

See Also

Reference

DrawingContext Class

Microsoft.SPOT.Presentation.Media Namespace