- ctrl
- The Control, where the image will be displayed.
- src
- Rectangle which determines the portion of the image to paint.
- srcClip
- Rectangle which further clips the source image.
- dest
- Rectangle which determines where the image is placed, and how it is scaled.
- destClip
- Rectangle which clips the image display.
- paintProperties
- Options for the display.
Visual Basic (Declaration) | |
---|---|
Overloads Public Overridable Sub Paint( _ ByVal ctrl As Control, _ ByVal src As Rectangle, _ ByVal srcClip As Rectangle, _ ByVal dest As Rectangle, _ ByVal destClip As Rectangle, _ ByVal paintProperties As RasterPaintProperties _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public virtual void Paint( Control ctrl, Rectangle src, Rectangle srcClip, Rectangle dest, Rectangle destClip, RasterPaintProperties paintProperties ) |
C++/CLI | |
---|---|
public: virtual void Paint( Control^ ctrl, Rectangle src, Rectangle srcClip, Rectangle dest, Rectangle destClip, RasterPaintProperties paintProperties ) |
Parameters
- ctrl
- The Control, where the image will be displayed.
- src
- Rectangle which determines the portion of the image to paint.
- srcClip
- Rectangle which further clips the source image.
- dest
- Rectangle which determines where the image is placed, and how it is scaled.
- destClip
- Rectangle which clips the image display.
- paintProperties
- Options for the display.
If the control surface has fewer colors than the image, this function dithers the output to that display surface without affecting the actual image data.
This method lets you specify a clipping area within either rectangle to limit the area to be painted. For the destination rectangle, a clipping area is commonly specified to repaint part of the image that was temporarily covered up. For a source rectangle, you can use a clipping area to update the display when only part of the image in the source rectangle has changed.
The following illustration shows how specifying a source clipping area affects the display. Text has been added to the source image (using the image as a display surface), and the source clipping area specifies the area to be repainted.
Target Platforms: Microsoft .NET CF Framework 2.0, Windows Mobile 5 PocketPC, Windows Mobile 5 Smartphone, Windows Mobile 6