Page 2 of 2

Re: PDF-Xchange Editor renders wipeout incorrectly.

Posted: Thu Nov 15, 2018 8:30 am
by Timur Born
Thanks for the detailed explanation, Ivan. Only today did I finally understand it correctly, which is entirely my own fault. :)

Re: PDF-Xchange Editor renders wipeout incorrectly.

Posted: Thu Nov 15, 2018 1:40 pm
by Tracker Supp-Stefan
:D

Re: PDF-Xchange Editor renders wipeout incorrectly.

Posted: Tue Jan 22, 2019 12:35 pm
by Timur Born
Ivan - Tracker Software wrote: Thu Oct 11, 2018 10:43 pmIn regards issues with rendering lines (especially thin lines) when aa is not enabled - I made some changes, and now it looks better but still far from perfect. I will not include those changes in build 327.1 we are going to release soon, because I still have to work on that a bit more.
I see the changes are included now?! There still is the problem of stroke adjusted lines not being anti-aliased, though.

I also wonder how point (PT) and pixels correlate at various DPI settings? At 96 dpi Editor seems to use about 30-50% more pixels than what is set for pt strength of a line/box. So a 10 pt line/box is drawn as 13 pixels at 100% and a 2 pt line/box as 3 pixels. At what DPI setting would points and pixels equal each other?

Re: PDF-Xchange Editor renders wipeout incorrectly.

Posted: Tue Sep 03, 2019 2:35 pm
by Timur Born
Timur Born wrote: Tue Jan 22, 2019 12:35 pmThere still is the problem of stroke adjusted lines not being anti-aliased, though.

I also wonder how point (PT) and pixels correlate at various DPI settings? At 96 dpi Editor seems to use about 30-50% more pixels than what is set for pt strength of a line/box. So a 10 pt line/box is drawn as 13 pixels at 100% and a 2 pt line/box as 3 pixels. At what DPI setting would points and pixels equal each other?
A few months later, same questions.

Re: PDF-Xchange Editor renders wipeout incorrectly.

Posted: Tue Sep 03, 2019 3:22 pm
by Ivan - Tracker Software
There still is the problem of stroke adjusted lines not being anti-aliased, though.
Yes, unfortunately, we did not fix this issue yet.
I also wonder how point (PT) and pixels correlate at various DPI settings? At 96 dpi Editor seems to use about 30-50% more pixels than what is set for pt strength of a line/box. So a 10 pt line/box is drawn as 13 pixels at 100% and a 2 pt line/box as 3 pixels. At what DPI setting would points and pixels equal each other?
A point (pt) is equal to 1/72 inch. When you have, say, 36 pt line/box, it means you have 1/2 inch, or, at 96 dpi, 48 pixels.
To have 1 point equal 1 pixel you have to set your zoom level to 72/dpi. So, for 96 dpi corresponding zoom level should be 75%.

Hope that helps.

Re: PDF-Xchange Editor renders wipeout incorrectly.

Posted: Tue Sep 03, 2019 5:58 pm
by Timur Born
Thanks for the explanation. I tested this with both a 10 pt and a 1 pt horizontal line comment, anti-aliasing disabled:

The 10 pt line is drawn as 10 px up to 78% zoom with Stroke Adjust on and up to 75% with Stroke Adjust off.

The 1 pt line is drawn as 1 px up to 113% zoom with Stroke Adjust on and up to 118% with Stroke Adjust off.

Why would the 10 pt line behave opposite to the 1 pit line in regard to Stroke Adjust?

Re: PDF-Xchange Editor renders wipeout incorrectly.

Posted: Tue Sep 03, 2019 6:18 pm
by Ivan - Tracker Software
Stroke adjusting intended to adjust line position and thickness to let it fill full pixels, as you may know.
By the specification (section "10.7.5 Automatic stroke adjustment" of PDF 2.0 spec):
... The thickness shall be as near as possible to the requested line width — no more than half a pixel different. ...
As I said above, at 96 dpi 1pt is equal to 1 pixel on 75% zoom level.
Roughly, Npixels = (width / 72) * dpi * zoomLevel.
So, on 75% 1 pt has 1 pixel, and 10 pt has 10 pixels.
Next step would be 2 pixels for 1pt line, and 11 pixels for 10 pt line, right?
Taking into account rounding, we can say that when the formal above give us 1.5 pixels, we will draw it as 2 pixels.
So, for 1 pt line:
1.5 = 1 / 72 * 96 * z => z = 1.125 or about 113%
for 10 pt line:
10.5 = 10/72 * 96 * z => z = 0.7875 or about 78-79%

I hope I answered your questions and all the rest, Ill leave the rest of the math to you.

Re: PDF-Xchange Editor renders wipeout incorrectly.

Posted: Tue Sep 03, 2019 6:33 pm
by Timur Born
Thanks again for the explanation, it's well appreciated!

Re: PDF-Xchange Editor renders wipeout incorrectly.

Posted: Tue Sep 03, 2019 9:34 pm
by TrackerSupp-Daniel
:D