PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 2:53 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu May 30, 2019 8:21 am 
Offline

Joined: Thu May 30, 2019 7:36 am
Posts: 1
Hi,
PdfGraphicsState.AddTransform using only XMatrixOrder.Prepend, so it has a different result when trying to run the code in 1.32 and 1.5 versions:

XFont fontRegular = new XFont("Times New Roman", 20, XFontStyle.Regular);

state = gfx.Save();
gfx.TranslateTransform(100, 100);
gfx.ScaleTransform(0.5, XMatrixOrder.Prepend);
gfx.DrawString("Test1", fontRegular, XBrushes.DarkSlateGray, 0, 30);
gfx.Restore(state);

state = gfx.Save();
gfx.TranslateTransform(200, 200);
gfx.ScaleTransform(0.5, 0.5, XMatrixOrder.Append); //<==== here we have got difference
gfx.DrawString("Test3", fontRegular, XBrushes.DarkSlateGray, 0, 30);
gfx.Restore(state);
state = gfx.Save();

Is there is a reason why append is not processed like it is done in provided example (AddTransform.png)


Attachments:
File comment: fixed AddTransform function
fixed AddTransform.png
fixed AddTransform.png [ 16.99 KiB | Viewed 26596 times ]
File comment: Result ver:1.5
result ver.1.5.png
result ver.1.5.png [ 4.99 KiB | Viewed 26596 times ]
File comment: Result ver:1.32
result ver.1.32.png
result ver.1.32.png [ 3.08 KiB | Viewed 26596 times ]
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group