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

DrawCheckmarkImageAtPosition() public static method

Draws the images at the specified location.
public static DrawCheckmarkImageAtPosition ( this img, Rectangle position, float newWidth = 40, float newHeight = 40 ) : 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 DrawCheckmarkImageAtPosition(this Image img, Rectangle position, float newWidth = 40, float newHeight = 40)
        {
            img.ScaleAbsolute(newWidth, newHeight);
            img.SetAbsolutePosition(
                    (position.Right + position.Left - (img.PlainWidth / 4)) / 2,
                    ((position.Bottom + position.Top) / 2) - (img.PlainHeight / 4) - 2
                    );
            return img;
        }