Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.
Wed Nov 06, 2019 11:16 am
HI,
i dont find the way to fill a path with forward or backward diagonal lines, like a hatchbrush.
How can i do this?
Christian
-

Bazi_101
-
- Posts: 9
- Joined: Sun Sep 29, 2019 4:40 pm
Thu Nov 07, 2019 6:46 am
Hi,
Thanks for your inquiry.
Please refer to following code:
- Code: Select all
PdfDocument doc = new PdfDocument();
PdfPageBase page = doc.Pages.Add();
PdfPen pen1 = new PdfPen(Color.DeepSkyBlue, 0.02f);
//use PdfTilingBrush
PdfTilingBrush brush = new PdfTilingBrush(new RectangleF(0, 0, 3f, 4f));
brush.Graphics.DrawLine(pen1, 0, 0, 3, 4);
page.Canvas.DrawRectangle(brush, new Rectangle(new Point(0,20), new Size(100, 100)));
doc.SaveToFile("19487.pdf");
If this doesn't meet your requirement, please provide detailed information along with the desired result.
Sincerely,
Betsy
E-iceblue support team
-


Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am
Sun Dec 01, 2019 1:51 pm
Hi Betsy,
it works well.
Thanks a lot
Christian
-

Bazi_101
-
- Posts: 9
- Joined: Sun Sep 29, 2019 4:40 pm
Mon Dec 02, 2019 1:48 am
Hi,
Thanks for your feedback.
If there is any question, welcome to get it back to us.
Sincerely,
Betsy
E-iceblue support team
-


Betsy.jiang
-
- Posts: 3099
- Joined: Tue Sep 06, 2016 8:30 am