Share via


DrawEllipse Method (Color, Int32, Int32, Int32, Int32, Int32, Color, Int32, Int32, Color, Int32, Int32, UInt16)

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

Draws an ellipse filled with a specified color gradient.

Namespace:  Microsoft.SPOT
Assembly:  Microsoft.SPOT.Graphics (in Microsoft.SPOT.Graphics.dll)

Syntax

'Declaration
Public Sub DrawEllipse ( _
    colorOutline As Color, _
    thicknessOutline As Integer, _
    x As Integer, _
    y As Integer, _
    xRadius As Integer, _
    yRadius As Integer, _
    colorGradientStart As Color, _
    xGradientStart As Integer, _
    yGradientStart As Integer, _
    colorGradientEnd As Color, _
    xGradientEnd As Integer, _
    yGradientEnd As Integer, _
    opacity As UShort _
)
public void DrawEllipse(
    Color colorOutline,
    int thicknessOutline,
    int x,
    int y,
    int xRadius,
    int yRadius,
    Color colorGradientStart,
    int xGradientStart,
    int yGradientStart,
    Color colorGradientEnd,
    int xGradientEnd,
    int yGradientEnd,
    ushort opacity
)
public:
void DrawEllipse(
    Color colorOutline, 
    int thicknessOutline, 
    int x, 
    int y, 
    int xRadius, 
    int yRadius, 
    Color colorGradientStart, 
    int xGradientStart, 
    int yGradientStart, 
    Color colorGradientEnd, 
    int xGradientEnd, 
    int yGradientEnd, 
    unsigned short opacity
)
member DrawEllipse : 
        colorOutline:Color * 
        thicknessOutline:int * 
        x:int * 
        y:int * 
        xRadius:int * 
        yRadius:int * 
        colorGradientStart:Color * 
        xGradientStart:int * 
        yGradientStart:int * 
        colorGradientEnd:Color * 
        xGradientEnd:int * 
        yGradientEnd:int * 
        opacity:uint16 -> unit 
public function DrawEllipse(
    colorOutline : Color, 
    thicknessOutline : int, 
    x : int, 
    y : int, 
    xRadius : int, 
    yRadius : int, 
    colorGradientStart : Color, 
    xGradientStart : int, 
    yGradientStart : int, 
    colorGradientEnd : Color, 
    xGradientEnd : int, 
    yGradientEnd : int, 
    opacity : ushort
)

Parameters

  • xGradientStart
    Type: System. . :: . .Int32
    The x-coordinate location of the starting point of the color gradient.
  • yGradientStart
    Type: System. . :: . .Int32
    The y-coordinate location of the starting point of the color gradient.
  • xGradientEnd
    Type: System. . :: . .Int32
    The x-coordinate location of the ending point of the color gradient.
  • yGradientEnd
    Type: System. . :: . .Int32
    The y-coordinate location of the ending point of the color gradient.

Remarks

If a bitmap is embedded as a resource, and its BitmapImageType is Bmp, then the Bitmap object is read-only, and attempts to modify it will throw an exception. You must make a copy of it using Bitmap.DrawImage, and modify the copy, as shown in the following code:

Bitmap bmpMyBitmap = Resources.GetBitmap(Resources.BitmapResources.MyBitmap);
        Bitmap bmpCopy = new Bitmap(bmpMyBitmap.Width, bmpMyBitmap.Height);
        // copy the bitmap
        bmpCopy.DrawImage(0, 0, bmpMyBitmap, 0, 0, bmpMyBitmap.Width, bmpMyBitmap.Height);
        // now you may modify the copy using any Bitmap method
        bmpCopy.MakeTransparent(Microsoft.SPOT.Presentation.Media.Color.White);

The .NET Micro Framework provides the Microsoft.SPOT.Bitmap class for lower-level access, such as animation. For displaying static bitmaps and hyperlinked bitmaps, use the Image control.

.NET Framework Security

See Also

Reference

Bitmap Class

DrawEllipse Overload

Microsoft.SPOT Namespace