Share via


DrawingContext.DrawPolygon Method

Draws a polygon on the drawing surface.

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

Syntax

public void DrawPolygon (
         Brushbrush,
         Penpen,
         int[] pts
)

Parameters

  • brush
    The brush with which the polygon is to be filled. This parameter is optional, and it can be a null value. If the value of brush is null, the polygon is not filled.
  • pen
    The pen with which the outline of the polygon is to be drawn. This parameter is optional, and it can be a null value. If the value of pen is null, no outline is drawn.
  • pts
    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.

Version Information

Available in .NET Micro Framework version 2.0, 2.5

See Also

Reference

DrawingContext Class
DrawingContext Members
Microsoft.SPOT.Presentation.Media Namespace