Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
RasterImagePaintCallbackFunction Enumeration
See Also  
Leadtools Namespace : RasterImagePaintCallbackFunction Enumeration



Used to identify the callbacks in a RasterPaintCallbacks class.

Syntax

Visual Basic (Declaration) 
Public Enum RasterImagePaintCallbackFunction 
   Inherits Enum
Visual Basic (Usage)Copy Code
Dim instance As RasterImagePaintCallbackFunction
C# 
public enum RasterImagePaintCallbackFunction : Enum 
C++/CLI 
public enum class RasterImagePaintCallbackFunction : public Enum 

Members

MemberDescription
ConvertLineCallback This callback converts a line of data.
ExtSelectClipRgnCallback This callback replaces the ExtSelectClipRgn GDI function.
GetDeviceCapsCallback This callback replaces the GetDeviceCaps GDI function.
GetDibInfoCallback This callback provides information on the data expected by the device. See RasterPaintDibInfo for more details.
GetGraphicsModeCallback This callback replaces the GetGraphicsMode GDI function.
GetMapModeCallback This callback replaces the GetMapMode GDI function.
GetViewportOrgExCallback This callback replaces the GetViewportOrgEx GDI function.
GetWorldTransformCallback This callback replaces the GetWorldTransform GDI function.
IntersectClipRectCallback This callback replaces the IntersectClipRect GDI function.
IsCompatibleDCCallback This callback checks whether the DC is compatible with a particular RasterPaintDibInfo class.
PrePaintCallback This 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.
PostPaintCallback This callback gets called after painting is finished. Use it to free any memory allocated in PrePaintCallback.
RealizePaletteCallback This callback replaces the RealizePalette GDI function.
RestoreDCCallback This callback replaces the RestoreDC GDI function.
SaveDCCallback This callback replaces the SaveDC GDI function.
SelectPaletteCallback This callback replaces the SelectPalette GDI function.
SetStretchBltModeCallback This callback replaces the SetStretchBltMode GDI function.
SetViewportOrgExCallback This callback replaces the SetViewportOrgEx GDI function.
StretchDIBitsCallback This callback replaces the StretchDIBits GDI function. Use it to perform the actual painting.

Example

For an example, refer to RasterImage.PaintCallbacks.

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

ParameterDescription
IntPtr pOutScanThe output buffer (pointer to an unmanaged array of bytes).
IntPtr pInScanThe input buffer (pointer to an unmanaged array of bytes).
int nLeftLeft offset of the first pixel in the input buffer to be used in conversion. (The pixels before this offset should be discarded).
int nRightRight 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 pDibInfoPointer 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

ParameterDescription
IntPtr hdcThe Windows HDC
IntPtr hRgnThe region handle
int nModeThe selection mode

GetDeviceCapsCallback

ParameterDescription
IntPtr hdcThe Windows HDC
int nIndexIdentifies which capability to return.

GetDibInfoCallback

ParameterDescription
IntPtr hdcThe Windows HDC
int nWidthThe 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

ParameterDescription
IntPtr hdcThe Windows HDC

GetMapModeCallback

ParameterDescription
IntPtr hdcThe Windows HDC

GetViewportOrgExCallback

ParameterDescription
IntPtr hdcThe Windows HDC
The return value is a System.Drawing.Point structure.

GetWorldTransformCallback

ParameterDescription
IntPtr hdcThe Windows HDC
The return value is a RasterRegionXForm structure. This structure will be converted to the standard GDI XFORM structure by assigning each field from XFORM the corresponding field from RasterRegionXForm. The correspondence is as follows: XFORM fieldRasterRegionXForm fieldeM11XScalarNumeratoreM12XScalarDenominatoreM21YScalarNumeratoreM22YScalarDenominatoreDxXOffseteDyYOffset

IntersectClipRectCallback

ParameterDescription
IntPtr hdcThe Windows HDC
int nLeftThe left offset
int nTopThe top offset
int nRight The right offset
int nBottomThe bottom offset

IsCompatibleDCCallback

ParameterDescription
IntPtr hdcThe Windows HDC

PrePaintCallback

ParameterDescription
IntPtr hdcThe Windows HDC
IntPtr prcDestClipUnmanaged pointer to the destination clipping rectangle. It points to an RECT GDI structure.

PostPaintCallback

ParameterDescription
IntPtr hdcThe Windows HDC

RealizePaletteCallback

ParameterDescription
IntPtr hdcThe Windows HDC

RestoreDCCallback

ParameterDescription
IntPtr hdcThe Windows HDC
int nSaveDCIndex of the DC to be restored.

SaveDCCallback

ParameterDescription
IntPtr hdcThe Windows HDC

SelectPaletteCallback

ParameterDescription
IntPtr hdcThe Windows HDC
IntPtr hPalThe palette handle. This is a native GDI HPALETTE handle.
int bForceBackgroundSet 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

ParameterDescription
IntPtr hdcThe Windows HDC
int nStretchModeThe stretch mode.

SetViewportOrgExCallback

ParameterDescription
IntPtr hdcThe Windows HDC
int nXThe left offset of the new viewport origin.
int nYThe top offset of the new viewport origin.
IntPtr lpPointPointer to an unmanaged GDI POINT structure.

StretchDIBitsCallback

ParameterDescription
IntPtr hdcThe Windows HDC
int nXDestThe left offset of the destination.
int nYDestThe top offset of the destination.
int nDestWidthThe width of the destination.
int nDestHeightThe height of the destination
int nXSrcThe left offset in the source buffer
int nYSrcThe top offset in the source buffer.
int nSrcWidthThe width of the source buffer.
int nSrcHeightThe height of the source buffer.
IntPtr lpvBitsPoint to data (unmanaged pointer to an array of bytes).
IntPtr lpbmiUNmanaged pointer to a native GDI BITMAPINFO structure describing the image data.
int fuColorUseIndicates how the palette colors are to be used.
unsigned int ulROP3CodeThe ROP code

Inheritance Hierarchy

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

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also