DrawingContext Class

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

Provides constructors, methods, and properties you can use to generate a drawing surface and create images on that surface.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT. . :: . .DispatcherObject
    Microsoft.SPOT.Presentation.Media..::..DrawingContext

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

Syntax

'Declaration
Public Class DrawingContext _
    Inherits DispatcherObject _
    Implements IDisposable
public class DrawingContext : DispatcherObject, 
    IDisposable
public ref class DrawingContext : public DispatcherObject, 
    IDisposable
type DrawingContext =  
    class
        inherit DispatcherObject
        interface IDisposable
    end
public class DrawingContext extends DispatcherObject implements IDisposable

The DrawingContext type exposes the following members.

Constructors

  Name Description
Public method DrawingContext(Bitmap) Initializes a new instance of the DrawingContext class that uses a specified bitmapped image as the background on its drawing surface.
Public method DrawingContext(Int32, Int32) Initializes a new instance of the DrawingContext class with a drawing surface of a specified size.

Top

Properties

  Name Description
Public property Bitmap Gets the bitmapped image that the current DrawingContext object uses as its drawing surface.
Public property Height Gets the height of the current DrawingContext object's drawing surface.
Public property Width Gets the width of the current DrawingContext object's drawing surface.

Top

Methods

  Name Description
Public method BlendImage Overlays a specified bitmapped image on an image that already exists on the drawing surface, and displays the resulting overlayed image at a specified location (position) on the drawing surface.
Public method CheckAccess Determines whether the calling thread has access to the current DispatcherObject object. (Inherited from DispatcherObject.)
Public method Clear Clears the drawing surface.
Public method Dispose() () () () Releases all resources used by the DrawingContext.
Protected method Dispose(Boolean) Releases the unmanaged resources used by the DrawingContext and optionally releases the managed resources.
Public method DrawEllipse Draws an ellipse on the drawing surface.
Public method DrawImage(Bitmap, Int32, Int32) Displays an uncropped, bitmapped image on the drawing surface.
Public method DrawImage(Bitmap, Int32, Int32, Int32, Int32, Int32, Int32) Displays a cropped, bitmapped image on the drawing surface.
Public method DrawLine Draws a line on the drawing surface.
Public method DrawPolygon Draws a polygon on the drawing surface.
Public method DrawRectangle Draws a rectangle on the drawing surface.
Public method DrawText(String, Font, Color, Int32, Int32) Draws specified text on the drawing surface, beginning at a specified location (position).
Public method DrawText(String%, Font, Color, Int32, Int32, Int32, Int32, TextAlignment, TextTrimming) Draws specified text within a bounding rectangular region on the drawing surface.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetClippingRectangle Retrieves the clipping rectangle of the current drawing context.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetTranslation Retrieves the translation of the current drawing context.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method PopClippingRectangle Pops the clipping rectangle that was most recently pushed onto the current drawing context.
Public method PushClippingRectangle Pushes the specified clipping rectangle onto the current drawing context.
Public method RotateImage Rotates the image.
Public method Scale9Image Scales an image.
Public method SetPixel Sets a single pixel to a color.
Public method StretchImage Draws a rectangular block of pixels on the display device, stretching or shrinking the rectangular area as necessary.
Public method TileImage Tiles an image.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Translate Translates (moves) the most recently drawn image by the specified amount on the drawing surface.
Public method VerifyAccess Determines whether the calling thread has access to the current DispatcherObject object. (Inherited from DispatcherObject.)

Top

Fields

  Name Description
Public field Dispatcher Contains the Dispatcher object that the current DispatcherObject object is associated with. (Inherited from DispatcherObject.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SPOT.Presentation.Media Namespace