PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
Text disappearing when using XLinearGradientBrush: Bug?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
hansolav



Joined: 10 Feb 2008
Posts: 1

PostPosted: Sun Feb 10, 2008 3:09 am    Post subject: Text disappearing when using XLinearGradientBrush: Bug? Reply with quote

Hi,

I believe I've found a bug that causes text to disappear when drawn with DrawString and XBrushes.Black immediately after drawing a rounded rectangle with a XLinearGradientBrush.
It could be that the bug is more general than that, but this is how I bumped into it. I'm using Pdfsharp 1.0.898.

The code below should illustrate the problem (at least it does on my machine). Try removing the DrawRoundedRectangle and see what happens.

Code:

            PdfDocument doc = new PdfDocument();
            PdfPage page = doc.AddPage();
            XGraphics gfx = XGraphics.FromPdfPage(page);

            XRect rect = new XRect(10, 10, 100, 100);
            gfx.DrawRoundedRectangle(
                new XPen(XColors.Black, 3),
                new XLinearGradientBrush(rect, XColors.Red, XColors.Green, XLinearGradientMode.Vertical),
                rect,
                new XSize(5, 5));

            gfx.DrawString("Some text that disappears", new XFont("Arial", 20), XBrushes.Black,
                new XRect(200, 200, 200, 200), XStringFormat.TopLeft);

            doc.Save("HelloWorld.pdf");
            Process.Start("HelloWorld.pdf");
Back to top
View user's profile Send private message
lucwuyts



Joined: 13 Jun 2008
Posts: 1

PostPosted: Fri Jun 13, 2008 9:14 am    Post subject: Reply with quote

I recently started using PDFSharp in a project where i need some graphics.

I seem to have the same problem with this Brush.

Did you find a solution??

Thanks,
Luc
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com