Issue 120230 - [From Symphony] disable antialiased lines for background hatches
Summary: [From Symphony] disable antialiased lines for background hatches
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: AOO 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
Depends on: 120237
  Show dependency tree
Reported: 2012-07-09 13:50 UTC by
Modified: 2016-04-09 10:58 UTC (History)
4 users (show)

See Also:
Latest Confirmation in: ---
Developer Difficulty: ---

original patch for the enhancement (2.18 KB, patch)
2012-07-16 13:40 UTC,
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description 2012-07-09 13:50:08 UTC
Chen Shuai noticed that a hatched background looks worse if antialiasing is enabled. This is especially true for thumbnail previews. So hatching should be disabled if it is only used for filling the background.
Comment 1 Armin Le Grand 2012-07-16 13:34:57 UTC
ALG: Taking a look...
Comment 2 2012-07-16 13:40:06 UTC
Created attachment 78652 [details]
original patch for the enhancement

The problem with the patch is that AOO already got a related change that interacts with this patch. Reassigning to ALG, the author of the other change.
Comment 3 Armin Le Grand 2012-07-23 15:07:39 UTC
ALG: More complicated as it looks. To simply hard-wired call the VCL hatch painting is not an option, this will collide later with VCL-free renderers. It is only painted differently since VCL hatch painting has a hard-wired implementation which chooses a pixel-based minimum for painting.
This is not the normal procedure; in general to paint the model means to create a discrete visualisation (based on pixels) which will always have errors, but tries to be as close as possible to the original visualisation. The hatch definition includes a distance between the lines in 100th mm, so this view-only 'optimization' is not part of the normal handling.
It will need to be 'simulated' using a view-dependent primitive (and it can be). In this case it makes sence since it will do the same what VCL did and thus does what the definition was initially inteded to do, just by purpose and not hidden in the VCL render implementation part.
Preparing implementation of the needed view-dependent primitive.
Comment 4 SVN Robot 2012-07-23 16:40:54 UTC
"alg" committed SVN revision 1364705 into trunk:
#120230# Adapt hatch processing to keep a view-dependent minimal distance for...
Comment 5 Armin Le Grand 2012-07-23 16:41:14 UTC
ALG: Adapted FillHatchAttribute to have an integer nMinimalDiscreteDistance. This is active when > 0, else inactive. Adapted FillHatchPrimitive2D to be derived from DiscreteMetricDependentPrimitive2D. It will now adapt when MinimalDiscreteDistance of the contained attribute::FillHatchAttribute is used (else fallback to view-independent primitive). Adapted creation places of FillHatchAttribute, currently all get a default of three (like old VCL implementation) for nMinimalDiscreteDistance.
Ckecked, works as expected. Comitted as r1364705.
Comment 6 Shenfeng Liu 2012-10-10 07:14:07 UTC
set Target Milestone to AOO 3.5.0 for PM purpose.
Comment 7 Marcus 2016-04-09 10:58:11 UTC
fixed in 4.0.0