incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 120744] insert as bitmap from clipboard or convert to bitmap adds 1 pixel if anti-aliasing is used
Date Tue, 04 Sep 2012 16:29:49 GMT

--- Comment #2 from Armin Le Grand <> ---
ALG: Caused by AA coordinate interpretation (even system-dependent). The
top-left corner of the example
- with non-AA: fills the first row and column of pixels
- with AA: Fills it half
The pixel coordinates in AA (on system-level) are interpreted as mid-pixel,
probably to be most compatible with the non-AA behaviour to always fill to the
In an ideal world the coordinates would be on the grid crossing points, thus a
1 pixel wide line would fill half of the first pixel row and half of the one
above. This would be in analogy to fat lines (more than one pixel) being
centered to their geometric definition. This *can* be done (by substractiong
0.5 in X and Y in AA mode to all coordinates) and nothing would neeed to be
adapted. The big (and unacceptable) caveat is that there would be no hairlines
anymore; all 1 pixel lines (the hor/ver ones) would cover two actual pixel
lines, each with half intensity.
This is very tricky and there is no simple and good solution. In this case all
conversions to bitmap would have to make exceptions to draw the geometry
differently from the discrete screen representation.
A related problem is: A logically 100x100 pixel object with a hairline will be
101x101 pixels when converted to bitmap, thus the logical object size would
need to be changed when converting to bitmap.
There should be better possibilities to solve such cases when the core is on
full double precision...

You are receiving this mail because:
You are the assignee for the bug.

View raw message