←Select platform

RasterPaintCallbacks Class

Summary

The RasterPaintCallbacks class is used to implement custom painting. The RasterPaintProperties.PaintCallbacks property contains a list of such classes.

Syntax
C#
VB
C++
public class RasterPaintCallbacks 
Public Class RasterPaintCallbacks  
public ref class RasterPaintCallbacks  

Remarks

The RasterPaintCallbacks class can contain one or more custom paint callbacks.

The callbacks are used to

  • Check whether the display adapter is compatible
  • Get information about the data expected by the display adapter
  • Do the actual painting
  • Initialize before and cleanup after the paint

Typically, you would create a class for each display adapter you want to support and add them all to the RasterPaintProperties.PaintCallbacks list. The reason for needing a list is this: the computer running the application might have more than one monitor and more than one display adapter. The user can drag the window from one monitor to another so you should populate the RasterPaintProperties.PaintCallbacks list with all the custom paint objects compatible with the display adapters in the system. Or you can just add all the display adapters you can support since the overhead for having unnecessary callbacks in the list is low.

Whenever the Leadtools.RasterImage object needs to paint, it searches through the RasterPaintProperties.PaintCallbacks list until it finds a compatible RasterPaintCallbacks object. If the list is empty or there is no compatible RasterPaintCallbacks object, the default paint functions are used.

Example

For an example please see RasterPaintCallbacks Example.

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Drawing Assembly