public static DrawCrossImageAtPosition ( this img, |
||
img | this | Image |
position | position of the drawing | |
newWidth | float | ScaleAbsolute's newWidth |
newHeight | float | ScaleAbsolute's newHeight |
return |
public static Image DrawCrossImageAtPosition(this Image img, Rectangle position, float newWidth = 30, float newHeight = 30)
{
img.ScaleAbsolute(newWidth, newHeight);
img.SetAbsolutePosition(
(position.Right + position.Left - (img.PlainWidth / 4)) / 2,
((position.Bottom + position.Top) / 2) - (img.PlainHeight / 4)
);
return img;
}