PdfRpt.Core.Helper.VectorImages.DrawCrossImageAtPosition C# (CSharp) Method

DrawCrossImageAtPosition() public static method

Draws the images at the specified location.
public static DrawCrossImageAtPosition ( this img, Rectangle position, float newWidth = 30, float newHeight = 30 ) : Image
img this Image
position iTextSharp.text.Rectangle position of the drawing
newWidth float ScaleAbsolute's newWidth
newHeight float ScaleAbsolute's newHeight
return iTextSharp.text.Image
        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;
        }