![]() |
|
GraphicsExtensionsToBitmap Method | KGy SOFT Drawing Libraries Help |
Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 4.6.0
Syntax
public static Bitmap ToBitmap( this Graphics graphics, bool visibleClipOnly )
<ExtensionAttribute> Public Shared Function ToBitmap ( graphics As Graphics, visibleClipOnly As Boolean ) As Bitmap
public: [ExtensionAttribute] static Bitmap^ ToBitmap( Graphics^ graphics, bool visibleClipOnly )
[<ExtensionAttribute>] static member ToBitmap : graphics : Graphics * visibleClipOnly : bool -> Bitmap
Parameters
- graphics
- Type: System.DrawingGraphics
The Graphics instance to be converted. - visibleClipOnly
- Type: SystemBoolean
When , the result will contain only the area represented by VisibleClipBounds property. When , the result will contain the image of the whole container source (when a container object is found), where the visible clip bounds can be identified by VisibleClipBounds in pixels.
Return Value
Type: BitmapA Bitmap object that contains the image content of the source Graphics object, or , when the required area of graphics is empty.
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).See Also