PeachDrawing
PeachDrawing.RasterCanvas
RasterCanvas.DrawImage Method
| Overloads | |
|---|---|
| DrawImage(Image, Rect) | Draws the specified Image at the specified location and with the specified size. |
| DrawImage(Image, Rect, ImageSampling) | Draws image into destRect, reading its pixels as sampling says. |
| DrawImage(Image, Rect, Rect) | Draws the specified portion of the specified Image at the specified location and with the specified size. |
| DrawImage(Image, Rect, Rect, ImageSampling) | Draws part of image into destRect, reading its pixels as sampling says. |
RasterCanvas.DrawImage(Image, Rect) Method
Draws the specified Image at the specified location and with the specified size.
public override void DrawImage(PeachDrawing.Core.Image image, PeachDrawing.Core.Rect destRect);
Parameters
image Image
Image to draw.
destRect Rect
Rectangle structure that specifies the location and size of the drawn image.
RasterCanvas.DrawImage(Image, Rect, ImageSampling) Method
Draws image into destRect, reading its pixels as sampling says.
public override void DrawImage(PeachDrawing.Core.Image image, PeachDrawing.Core.Rect destRect, PeachDrawing.Core.ImageSampling sampling);
Parameters
image Image
the image to draw
destRect Rect
where to draw it; the image is scaled to fit
sampling ImageSampling
how to read the image’s pixels
Remarks
The default has only the image’s own smooth-or-crisp switch to work with: Nearest turns Interpolate off for the draw (as does Pixelated) and every other value except Automatic turns it on, then the image’s setting is put back. A canvas with real per-draw sampling overrides this.
RasterCanvas.DrawImage(Image, Rect, Rect) Method
Draws the specified portion of the specified Image at the specified location and with the specified size.
public override void DrawImage(PeachDrawing.Core.Image image, PeachDrawing.Core.Rect destRect, PeachDrawing.Core.Rect srcRect);
Parameters
image Image
Image to draw.
destRect Rect
Rectangle structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle.
srcRect Rect
Rectangle structure that specifies the portion of the image object to draw.
RasterCanvas.DrawImage(Image, Rect, Rect, ImageSampling) Method
Draws part of image into destRect, reading its pixels as sampling says.
public override void DrawImage(PeachDrawing.Core.Image image, PeachDrawing.Core.Rect destRect, PeachDrawing.Core.Rect srcRect, PeachDrawing.Core.ImageSampling sampling);
Parameters
image Image
the image to draw
destRect Rect
where to draw it; the image is scaled to fit
srcRect Rect
the part of the image to draw
sampling ImageSampling
how to read the image’s pixels; see DrawImage(Image, Rect, ImageSampling) for the default’s limits