PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jul 14, 2024 6:33 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Draw shapes
PostPosted: Thu Aug 30, 2012 1:50 pm 
Offline

Joined: Thu Aug 30, 2012 1:46 pm
Posts: 2
Hi,

I'm using MigraDoc in my project and I need to construct an ellipse. It is possible this ? Which DocumentObjectModel should I use ?

Thank you!


Top
 Profile  
Reply with quote  
 Post subject: Re: Draw shapes
PostPosted: Tue Sep 04, 2012 6:12 am 
Offline

Joined: Thu Aug 30, 2012 1:46 pm
Posts: 2
For a better understand I will give an example with rectangle:

Document document = new Document();
MigraDoc.DocumentObjectModel.Section section = document.AddSection();
TextFrame textFrame = new TextFrame();
textFrame.Width = new Unit(200);
textFrame.Height = new Unit(200);
textFrame.RelativeHorizontal = RelativeHorizontal.Page;
textFrame.RelativeVertical = RelativeVertical.Page;
textFrame.WrapFormat.DistanceLeft = new Unit(10, UnitType.Millimeter);
textFrame.WrapFormat.DistanceTop = new Unit(10, UnitType.Millimeter);
textFrame.LineFormat.Width = new Unit(2);
textFrame.LineFormat.Color = MigraDoc.DocumentObjectModel.Colors.Black;
textFrame.FillFormat.Color = MigraDoc.DocumentObjectModel.Colors.Green;
section.Add(textFrame);

It is possible to create ellipse in this manner ?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 43 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