DrawingExtensionsDrawImage Method (Graphics, Image, Rect, Rect, PlaneConfiguration, Double, Int32, HighBitScaleMode)

CVB.Net Documentation
Draw a Image object into a Graphics object.

Namespace:  Stemmer.Cvb.Extensions
Assembly:  Stemmer.Cvb.Extensions (in Stemmer.Cvb.Extensions.dll) Version: 14.0.0.0
Syntax

public static void DrawImage(
	this Graphics dc,
	Image img,
	Rect sourceRect,
	Rect targetRect,
	PlaneConfiguration planes,
	double gain,
	int offset,
	HighBitScaleMode mode
)

Parameters

dc
Type: System.DrawingGraphics
Graphics object to paint to
img
Type: Stemmer.CvbImage
Image to paint
sourceRect
Type: Stemmer.CvbRect
Subsection of the image to paint
targetRect
Type: Stemmer.CvbRect
Rectangle in the target dc to paint to
planes
Type: Stemmer.CvbPlaneConfiguration
Plane configuration to use
gain
Type: SystemDouble
Gain to apply
offset
Type: SystemInt32
Offset to apply
mode
Type: Stemmer.CvbHighBitScaleMode
Treatment for images with more than 8 bits per pixel. Note that setting this mode to
HighbitScaleMode.ViewPort
cause the function to ignore the gain and offset setting.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Graphics. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions

ExceptionCondition
ArgumentNullExceptionIf dc is null or img is null
ObjectDisposedExceptionIf the img has already been disposed
See Also

Reference