LEADTOOLS GDI/GDI+ (Leadtools.Drawing assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
PaintRegionBuffer(RasterImage,IntPtr,LeadRect,LeadRect,LeadRect,LeadRect,Byte[],Int32,Int32,Int32,RasterPaintProperties) Method
See Also 



image
The source image.
hdc
The destination Windows device context handle 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 hdc handle.

The coordinates in the destRect object are relative to the hdc handle. 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 device context handle. You can pass Rectangle.Empty to use the default, which matches the device context handle. In most cases, however, you should use the rectangle returned by the .NET PaintEventArgs.ClipRectangle or Windows WM_PAINT message.

buffer
The buffer that contains the image data to paint
bufferOffset
Offset into buffer where the data starts.
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 as a negative value (-lines), as explained in Speeding Up 1-Bit Documents.

properties
Options for the display.
image
The source image.
hdc
The destination Windows device context handle 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 hdc handle.

The coordinates in the destRect object are relative to the hdc handle. 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 device context handle. You can pass Rectangle.Empty to use the default, which matches the device context handle. In most cases, however, you should use the rectangle returned by the .NET PaintEventArgs.ClipRectangle or Windows WM_PAINT message.

buffer
The buffer that contains the image data to paint
bufferOffset
Offset into buffer where the data starts.
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 as a negative value (-lines), as explained in Speeding Up 1-Bit Documents.

properties
Options for the display.
Paints image region data from a buffer into a Windows device context handle.

Syntax

Visual Basic (Declaration) 
Overloads Public Shared Sub PaintRegionBuffer( _
   ByVal image As RasterImage, _
   ByVal hdc As IntPtr, _
   ByVal srcRect As LeadRect, _
   ByVal srcClipRect As LeadRect, _
   ByVal destRect As LeadRect, _
   ByVal destClipRect As LeadRect, _
   ByVal buffer() As Byte, _
   ByVal bufferOffset As Integer, _
   ByVal row As Integer, _
   ByVal count As Integer, _
   ByVal properties As RasterPaintProperties _
) 
Visual Basic (Usage)Copy Code
Dim image As RasterImage
Dim hdc As IntPtr
Dim srcRect As LeadRect
Dim srcClipRect As LeadRect
Dim destRect As LeadRect
Dim destClipRect As LeadRect
Dim buffer() As Byte
Dim bufferOffset As Integer
Dim row As Integer
Dim count As Integer
Dim properties As RasterPaintProperties
 
RasterImagePainter.PaintRegionBuffer(image, hdc, srcRect, srcClipRect, destRect, destClipRect, buffer, bufferOffset, row, count, properties)
C# 
public static void PaintRegionBuffer( 
   RasterImage image,
   IntPtr hdc,
   LeadRect srcRect,
   LeadRect srcClipRect,
   LeadRect destRect,
   LeadRect destClipRect,
   byte[] buffer,
   int bufferOffset,
   int row,
   int count,
   RasterPaintProperties properties
)
C++/CLI 
public:
static void PaintRegionBuffer( 
   RasterImage^ image,
   IntPtr hdc,
   LeadRect srcRect,
   LeadRect srcClipRect,
   LeadRect destRect,
   LeadRect destClipRect,
   array<byte>^ buffer,
   int bufferOffset,
   int row,
   int count,
   RasterPaintProperties properties
) 

Parameters

image
The source image.
hdc
The destination Windows device context handle 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 hdc handle.

The coordinates in the destRect object are relative to the hdc handle. 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 device context handle. You can pass Rectangle.Empty to use the default, which matches the device context handle. In most cases, however, you should use the rectangle returned by the .NET PaintEventArgs.ClipRectangle or Windows WM_PAINT message.

buffer
The buffer that contains the image data to paint
bufferOffset
Offset into buffer where the data starts.
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 as a negative value (-lines), as explained in Speeding Up 1-Bit Documents.

properties
Options for the display.

Example

Remarks

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also