Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
Rotate a GraphicsContainer without rasterizing
Rank: Advanced Member
Groups: Guest
Joined: 5/10/2006(UTC) Posts: 32
Thanks: 6 times
|
We are getting contents from a PDF frame, sometimes we need to rotate the GraphicsContainer before calling DrawContainer on our output AdvancedGraphics instance. I tried using a pipeline against the PDFFrame, but the results of the pipeline is a raster bitmap, I need the contents to remain paths (which is what is in the PDF Frame) Code:.
.
.
var pdfReader = new PdfReader(@"C:\temp\16x12_indoorPillow_CutFile.pdf", artwork.DpiX, artwork.DpiY);
var frameStuff = pdfReader.Frames[0];
Pipeline pip = new Pipeline();
pip.Add(frameStuff);
pip.Add(new Rotate(90));
// the result of the pipeline is a raster image
graphics.DrawImage(pip, 150, 150);
.
.
.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/10/2006(UTC) Posts: 32
Thanks: 6 times
|
Figured it out. What you have to do is apply a transform to the graphics then draw the container, and then reset the transform before continuing Code:graphics.Transform.Translate(container.Height, 0);
graphics.Transform.RotateAt(90, new System.Drawing.PointF(artwork.Width + 200, 150));
graphics.DrawContainer(container, artwork.Width + 200, 150);
graphics.Transform.RotateAt(-90, new System.Drawing.PointF(artwork.Width + 200, 150));
graphics.Transform.Translate(-container.Height, 0);
|
|
|
|
Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
Rotate a GraphicsContainer without rasterizing
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.