Search found 1013 matches
- Mon Sep 07, 2020 6:29 pm
- Forum: wxCode
- Topic: wxPdfDocument: Plotting a Rotated Rectangle
- Replies: 20
- Views: 2277
Re: wxPdfDocument: Plotting a Rotated Rectangle
I'm sorry Utelle, I got the PPI wrong. The screen DC returns 96, the wxPdfDC returns 1200. GetSize() returns x: 13,200 and y: 10,200 Thanks for the information. I adjusted the translation vector on setting the transformation matrix by taking the resolution into account. Please try the latest wxPdfD...
- Mon Sep 07, 2020 9:46 am
- Forum: wxCode
- Topic: Create a PDF with an area filled with a raster pattern
- Replies: 16
- Views: 2980
Re: Create a PDF with an area filled with a raster pattern
Yes, while reading the whole EMF, I came across the need to write elements to PDF that are not used in WMF. As said before, there is only partial support for the WMF format. Even if I decide to enhance the WMF support and/or to add EMF support, there will still be operations that can't be applied t...
- Sun Sep 06, 2020 9:18 pm
- Forum: wxCode
- Topic: Create a PDF with an area filled with a raster pattern
- Replies: 16
- Views: 2980
Re: Create a PDF with an area filled with a raster pattern
I'm sorry, I followed the example of WMF, where the PDF code is written directly. That's why I'm at a low-level level. Well, wxPdfDocument supports to add WMF graphics as image objects to a PDF document. This is the high level goal. The PDF specification does not include direct support for WMF grap...
- Sun Sep 06, 2020 7:40 pm
- Forum: wxCode
- Topic: Create a PDF with an area filled with a raster pattern
- Replies: 16
- Views: 2980
Re: Create a PDF with an area filled with a raster pattern
My inline image BI /CS/R7 /W 16 /H 8 /BPC 4 /F /AHx ID 00 00 00 00 00 00 00 00 00 00 00 aa 00 00 00 aa a0 00 0a 00 a0 00 0a 00 a0 00 0a 00 a0 00 0a 00 0a 00 a0 00 0a 00 a0 00 0a 00 a0 00 0a 00 a0 00 00 aa 00 00 00 aa 00 00 00 00 00 00 00 00 00 00 > EI Q Instead of describing the goal you want to ac...
- Sat Sep 05, 2020 11:40 pm
- Forum: wxCode
- Topic: wxPdfDocument: Plotting a Rotated Rectangle
- Replies: 20
- Views: 2277
Re: wxPdfDocument: Plotting a Rotated Rectangle
The origin is specified in display units. I'm seeing values of x: 6591 and y: 5946 and the rotation is in radians (5.49778). The origin is the center of the rectangle. Well, if you use x: 6591 and y: 5946 as coordinates when drawing to a wxPdfDC with default settings, you are drawing outside the av...
- Sat Sep 05, 2020 1:13 pm
- Forum: wxCode
- Topic: wxPdfDocument: Plotting a Rotated Rectangle
- Replies: 20
- Views: 2277
Re: wxPdfDocument: Plotting a Rotated Rectangle
We're using wxMM_TEXT. The DC sample of wxPdfDocument uses wxMM_POINTS. However, due to the value of the default resolution this results in the same scaling factor as wxMM_TEXT. That is, this also doesn't explain the issue. Could you please describe how you derive the translation vector of the tran...
- Fri Sep 04, 2020 10:17 pm
- Forum: wxCode
- Topic: wxPdfDocument: Plotting a Rotated Rectangle
- Replies: 20
- Views: 2277
Re: wxPdfDocument: Plotting a Rotated Rectangle
Okay, I've added a screen shot of two rectangles, one rotated and one not as well as two PDF files. One output from our GDI routines (TEST_GDI.pdf) and the other from the wxPdfDoc library (TEST_PDF.pdf). Maybe it will shed some light on what is wrong. I couldn't resist to check the PDF file immedia...
- Fri Sep 04, 2020 9:07 pm
- Forum: wxCode
- Topic: wxPdfDocument: Plotting a Rotated Rectangle
- Replies: 20
- Views: 2277
Re: wxPdfDocument: Plotting a Rotated Rectangle
Thanks. I'll take a look over the weekend.
- Fri Sep 04, 2020 5:19 pm
- Forum: wxCode
- Topic: wxPdfDocument: Plotting a Rotated Rectangle
- Replies: 20
- Views: 2277
Re: wxPdfDocument: Plotting a Rotated Rectangle
I was using wxWidgets 3.1.0, then upgraded to 3.1.4 but still don't see anything. So obviously the problem you experience is not related to the wxWidgets version. Good to know, even though it doesn't solve the puzzle. I'm running in debug and stepped into the wxpdfdoc code and I do see the new func...
- Thu Sep 03, 2020 8:58 pm
- Forum: wxCode
- Topic: wxPdfDocument: Plotting a Rotated Rectangle
- Replies: 20
- Views: 2277
Re: wxPdfDocument: Plotting a Rotated Rectangle
Thanks for updating, but does not seem to be working unless I'm doing something wrong. I see the new functions so I believe I built it correctly but no output at all. Rounded rectangles at 0 degree rotation display correctly. Well, I tested the new functions by adding calls to them locally in the D...
- Thu Sep 03, 2020 5:32 pm
- Forum: wxCode
- Topic: Create a PDF with an area filled with a raster pattern
- Replies: 16
- Views: 2980
Re: Create a PDF with an area filled with a raster pattern
If your EMF files contain bitmap images anyway, the easiest approach is to convert them to a bitmap format like PNG beforehand. I've done that for your attached files - see attached zip file. Yes, but these are cutouts of individual areas, and replacement by a raster affects the size of the resulti...
- Thu Sep 03, 2020 10:17 am
- Forum: wxCode
- Topic: Create a PDF with an area filled with a raster pattern
- Replies: 16
- Views: 2980
Re: Create a PDF with an area filled with a raster pattern
I have two type areas with raster. EMF atached. If your EMF files contain bitmap images anyway, the easiest approach is to convert them to a bitmap format like PNG beforehand. I've done that for your attached files - see attached zip file. First P2108_200901 have raster type EMR_CREATEDIBPATTERNBRU...
- Thu Sep 03, 2020 8:25 am
- Forum: wxCode
- Topic: Create a PDF with an area filled with a raster pattern
- Replies: 16
- Views: 2980
Re: Create a PDF with an area filled with a raster pattern
The goal is to save the EMF to PDF. I used your WMF example and replaced META_ with EMR_. Everything works until I came across areas filled with a raster pattern in EMF. As said WMF/EMF raster operations are currently not supported by the WMF parser included in wxPdfDocument. WMF support of wxPdfDo...
- Wed Sep 02, 2020 8:33 pm
- Forum: wxCode
- Topic: Create a PDF with an area filled with a raster pattern
- Replies: 16
- Views: 2980
Re: Create a PDF with an area filled with a raster pattern
From your attached PDF documents I can see that you used wxPdfDocument. That was not clear from your posting. For future postings you should remember to mention the wxWidgets based components you are using and with which you experience problems. I try created a PDF by copying a vector part from an e...
- Tue Aug 25, 2020 9:44 pm
- Forum: wxCode
- Topic: wxPdfDocument: Plotting a Rotated Rectangle
- Replies: 20
- Views: 2277
Re: wxPdfDocument: Plotting a Rotated Rectangle
In wxWidgets, we're using the wxAffineMatrix2D class to display a rotated rectangle. Below is a small sample of the code we use. This code works great on a panel but when we use the wxPdfDC class, the rectangle disappears. Is this the correct way to display a rotated rectangle in this library or is...