PDFsharpI don't know what BeginBox in this snippet? Thanks in advance :)
Code:
void DrawImageRotated(XGraphics gfx, int number)
{
BeginBox(gfx, number, "DrawImage (rotated)");
XImage image = XImage.FromFile(jpegSamplePath);
const double dx = 250, dy = 140;
gfx.TranslateTransform(dx / 2, dy / 2);
gfx.ScaleTransform(0.7);
gfx.RotateTransform(-25);
gfx.TranslateTransform(-dx / 2, -dy / 2);
//XMatrix matrix = new XMatrix(); //XMatrix.Identity;
double width = image.PixelWidth * 72 / image.HorizontalResolution;
double height = image.PixelHeight * 72 / image.HorizontalResolution;
gfx.DrawImage(image, (dx - width) / 2, 0, width, height);
EndBox(gfx);
}