Method DrawAlignedImage
DrawAlignedImage(Graphics, Image, Rectangle, ContentAlignment)
Draws the specified System.Drawing.Image, using its original physical size, with specified alignment.
public static void DrawAlignedImage(this Graphics graphics, Image image, Rectangle bounds, ContentAlignment alignment = ContentAlignment.MiddleCenter)
Parameters
graphicsGraphicsSurface to draw image on.
imageImageSystem.Drawing.Image to draw.
boundsRectangleSystem.Drawing.Rectangle structure that specifies the location of the drawn image.
alignmentContentAlignmentImage alignment.
DrawAlignedImage(Graphics, Image, RectD, ContentAlignment)
public static void DrawAlignedImage(this Graphics graphics, Image image, RectD bounds, ContentAlignment alignment = ContentAlignment.MiddleCenter)
Parameters
graphicsGraphicsimageImageboundsRectDalignmentContentAlignment