Class DrawImageCommand
Draws an image scaled to fit a destination rectangle.
Inherited Members
Namespace: DRIT.Drawing.Vector.Commands
Assembly: DRIT.Drawing.dll
Syntax
public sealed class DrawImageCommand : DrawingCommand
Constructors
DrawImageCommand(Image, RectangleF, RectangleF, GraphicsUnit, ImageAttributes?)
Initializes a new DrawImageCommand, cloning the image and attributes.
Declaration
public DrawImageCommand(Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes? attr)
Parameters
| Type | Name | Description |
|---|---|---|
| Image | image | |
| RectangleF | destRect | |
| RectangleF | srcRect | |
| GraphicsUnit | srcUnit | |
| ImageAttributes | attr |
Properties
Attr
Gets the image attributes, or null.
Declaration
public ImageAttributes? Attr { get; }
Property Value
| Type | Description |
|---|---|
| ImageAttributes |
DestRect
Gets the destination rectangle.
Declaration
public RectangleF DestRect { get; }
Property Value
| Type | Description |
|---|---|
| RectangleF |
Image
Gets the image to draw.
Declaration
public Image Image { get; }
Property Value
| Type | Description |
|---|---|
| Image |
SrcRect
Gets the source rectangle.
Declaration
public RectangleF SrcRect { get; }
Property Value
| Type | Description |
|---|---|
| RectangleF |
SrcUnit
Gets the source unit.
Declaration
public GraphicsUnit SrcUnit { get; }
Property Value
| Type | Description |
|---|---|
| GraphicsUnit |
Methods
Clone()
Creates a deep copy of this command.
Declaration
public override DrawingCommand Clone()
Returns
| Type | Description |
|---|---|
| DrawingCommand | A new DrawingCommand with the same state. |