LEADTOOLS GDI/GDI+ (Leadtools.Drawing assembly)
LEAD Technologies, Inc

RasterImagePaintCallbackFunction Enumeration






Used to identify the callbacks in a RasterPaintCallbacks class.
Syntax
public enum RasterImagePaintCallbackFunction : System.Enum, System.IComparableSystem.IConvertibleSystem.IFormattable  
'Declaration
 
Public Enum RasterImagePaintCallbackFunction 
   Inherits System.Enum
   Implements System.IComparableSystem.IConvertibleSystem.IFormattable 
'Usage
 
Dim instance As RasterImagePaintCallbackFunction
public enum RasterImagePaintCallbackFunction : System.IComparableSystem.IConvertibleSystem.IFormattable  
Leadtools.Drawing.RasterImagePaintCallbackFunction = function() { };
Leadtools.Drawing.RasterImagePaintCallbackFunction.prototype = {
LeadtoolsMemberMarker(replace me) };
public enum class RasterImagePaintCallbackFunction : public System.Enum, System.IComparableSystem.IConvertibleSystem.IFormattable  
Members
MemberDescription
ConvertLineCallbackThis callback converts a line of data.
ExtSelectClipRgnCallbackThis callback replaces the ExtSelectClipRgn GDI function.
FillRectCallbackThis callback replaces the FillRect GDI function.
GetDeviceCapsCallbackThis callback replaces the GetDeviceCaps GDI function.
GetDibInfoCallbackThis callback provides information on the data expected by the device. See RasterPaintDibInfo for more details.
GetGraphicsModeCallbackThis callback replaces the GetGraphicsMode GDI function.
GetMapModeCallbackThis callback replaces the GetMapMode GDI function.
GetViewportOrgExCallbackThis callback replaces the GetViewportOrgEx GDI function.
GetWorldTransformCallbackThis callback replaces the GetWorldTransform GDI function.
IntersectClipRectCallbackThis callback replaces the IntersectClipRect GDI function.
IsCompatibleDCCallbackThis callback checks whether the DC is compatible with a particular RasterPaintDibInfo class.
PostPaintCallbackThis callback gets called after painting is finished. Use it to free any memory allocated in PrePaintCallback.
PrePaintCallbackThis callback informs your RasterPaintCallbacks class that it has been selected for painting. It is called before painting starts. Use it to allocate any memory needed for painting.
RealizePaletteCallbackThis callback replaces the RealizePalette GDI function.
RestoreDCCallbackThis callback replaces the RestoreDC GDI function.
SaveDCCallbackThis callback replaces the SaveDC GDI function.
SelectPaletteCallbackThis callback replaces the SelectPalette GDI function.
SetStretchBltModeCallbackThis callback replaces the SetStretchBltMode GDI function.
SetViewportOrgExCallbackThis callback replaces the SetViewportOrgEx GDI function.
StretchDIBitsCallbackThis callback replaces the StretchDIBits GDI function. Use it to perform the actual painting.
Remarks

The RasterPaintCallbacks class can contain a number of callbacks used for custom painting.

The number and parameter types for each callback is determined by the callback type using the values in this enumeration.

The number and parameter types for each callback are indicated below.

ConvertLineCallback

Parameter Description
IntPtr pOutScan The output buffer (pointer to an unmanaged array of bytes).
IntPtr pInScan The input buffer (pointer to an unmanaged array of bytes).
int nLeft Left offset of the first pixel in the input buffer to be used in conversion. (The pixels before this offset should be discarded).
int nRight Right offset of the first pixel after the last pixel in the input buffer to be used in conversion. (Pixels nLeft..nRight-1 should be used in conversion).
RasterPaintDibInfo pDibInfo Pointer to a RasterPaintDibInfo class returned by the GetDibInfoCallback callback. Contains information on the format of the output data. This is a read-only class, any changes made to it will be discarded.

ExtSelectClipRgnCallback

Parameter Description
IntPtr hdc The Windows HDC
IntPtr hRgn The region handle
int nMode The selection mode

GetDeviceCapsCallback

Parameter Description
IntPtr hdc The Windows HDC
int nIndex Identifies which capability to return.

GetDibInfoCallback

Parameter Description
IntPtr hdc The Windows HDC
int nWidth The width of the image data to be painted. (Might be less than the image width).
The return value is a RasterPaintDibInfo class. It contains information about how the image data expected by the device looks like.

GetGraphicsModeCallback

Parameter Description
IntPtr hdc The Windows HDC

GetMapModeCallback

Parameter Description
IntPtr hdc The Windows HDC

GetViewportOrgExCallback

Parameter Description
IntPtr hdc The Windows HDC
The return value is a System.Drawing.Point structure.

GetWorldTransformCallback

Parameter Description
IntPtr hdc The Windows HDC
The return value is a Leadtools.RasterRegionXForm structure. This structure will be converted to the standard GDI XFORM structure by assigning each field from XFORM the corresponding field from Leadtools.RasterRegionXForm. The correspondence is as follows:

IntersectClipRectCallback

Parameter Description
IntPtr hdc The Windows HDC
int nLeft The left offset
int nTop The top offset
int nRight The right offset
int nBottom The bottom offset

IsCompatibleDCCallback

Parameter Description
IntPtr hdc The Windows HDC

PrePaintCallback

Parameter Description
IntPtr hdc The Windows HDC
IntPtr prcDestClip Unmanaged pointer to the destination clipping rectangle. It points to an RECT GDI structure.

PostPaintCallback

Parameter Description
IntPtr hdc The Windows HDC

RealizePaletteCallback

Parameter Description
IntPtr hdc The Windows HDC

RestoreDCCallback

Parameter Description
IntPtr hdc The Windows HDC
int nSaveDC Index of the DC to be restored.

SaveDCCallback

Parameter Description
IntPtr hdc The Windows HDC

SelectPaletteCallback

Parameter Description
IntPtr hdc The Windows HDC
IntPtr hPal The palette handle. This is a native GDI HPALETTE handle.
int bForceBackground Set to 1 to force the palette to be a background palette and match the existing colors. Set to 0 reset the DC colors to the colors in the palette.

SetStretchBltModeCallback

Parameter Description
IntPtr hdc The Windows HDC
int nStretchMode The stretch mode.

SetViewportOrgExCallback

Parameter Description
IntPtr hdc The Windows HDC
int nX The left offset of the new viewport origin.
int nY The top offset of the new viewport origin.
IntPtr lpPoint Pointer to an unmanaged GDI POINT structure.

StretchDIBitsCallback

Parameter Description
IntPtr hdc The Windows HDC
int nXDest The left offset of the destination.
int nYDest The top offset of the destination.
int nDestWidth The width of the destination.
int nDestHeight The height of the destination
int nXSrc The left offset in the source buffer
int nYSrc The top offset in the source buffer.
int nSrcWidth The width of the source buffer.
int nSrcHeight The height of the source buffer.
IntPtr lpvBits Pointer to data (unmanaged pointer to an array of bytes).
IntPtr lpbmi Unmanaged pointer to a native GDI BITMAPINFO structure describing the image data.
int fuColorUse Indicates how the palette colors are to be used.
unsigned int ulROP3Code The ROP code

FillRectCallback

Parameter Description
IntPtr hdc The Windows HDC
LPRECT lprc The rectangle coordinates to fill.
COLORREF color The color to use. You must create a solid brush for this color.

Example
For an example, refer to RasterPaintProperties.PaintCallbacks.
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Leadtools.Drawing.RasterImagePaintCallbackFunction

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Leadtools.Drawing Namespace
RasterPaintProperties.PaintCallbacks
RasterPaintCallbacks Class
Implementing custom paint

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.