←Select platform

PaintRegionBuffer(RasterImage,Graphics,LeadRect,LeadRect,LeadRect,LeadRect,IntPtr,int,int,RasterPaintProperties) Method

Summary

Paints image region data from an unmanaged memory buffer into a System.Drawing.Graphics object.

Syntax
C#
VB
C++
Public Overloads Shared Sub PaintRegionBuffer( _ 
   ByVal image As RasterImage, _ 
   ByVal graphics As Graphics, _ 
   ByVal srcRect As LeadRect, _ 
   ByVal srcClipRect As LeadRect, _ 
   ByVal destRect As LeadRect, _ 
   ByVal destClipRect As LeadRect, _ 
   ByVal buffer As IntPtr, _ 
   ByVal row As Integer, _ 
   ByVal count As Integer, _ 
   ByVal properties As RasterPaintProperties _ 
)  

Parameters

image
The source image.

graphics
The destination System.Drawing.Graphics object where the image data will be displayed.

srcRect
A Leadtools.LeadRect object that specifies the part of the image to use as the display source.

The coordinates in the srcRect rectangle are relative to the image. You can pass Rectangle.Empty to use the default, which matches the image.

srcClipRect
A Leadtools.LeadRect object specifies the portion of the display source to paint. Generally, this is used for updating the display when part of the source image has changed.

The coordinates in the srcClipRect rectangle are relative to the image. You can pass Rectangle.Empty to use the default, which matches the image

destRect
A Leadtools.LeadRect object that determines how the source rectangle is scaled and how the image is positioned in the destination graphics object.

The coordinates in the destRect object are relative to the graphics object. There is no default for this parameter. You must specify the Leadtools.LeadRect object.

destClipRect
A Leadtools.LeadRect object that specifies the portion of the display rectangle to paint. Generally, this is used for updating changes in the display surface, such as when a user moves another window, uncovering a part of the image that had been covered up.

The coordinates in the destClipRect are relative to the System.Drawing.Graphics object. You can pass Rectangle.Empty to use the default, which matches the System.Drawing.Graphics object. In most cases, however, you should use the rectangle returned by the .NET PaintEventArgs.ClipRectangle or Windows WM_PAINT message.

buffer
Pointer to the unmanaged memory buffer that contains the image data to paint

row
The first row to paint. The painted portion of any row may be limited by the rectangle parameters.

count
The number of rows to paint. The painted portion of any row may be limited by the rectangle parameters.

If the image data in buffer is compressed 1-bit data, you can specify the number of lines by using a negative value (-lines), as explained in Speeding Up 1-Bit Documents.

properties
Options for the display.

Remarks

This method works like PaintBuffer(RasterImage,Graphics,LeadRect,LeadRect,LeadRect,LeadRect,Byte[],Int32,Int32,Int32,RasterPaintProperties), except that only the image region is painted.

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