Issue 120230 - [From Symphony] disable antialiased lines for background hatches
[From Symphony] disable antialiased lines for background hatches
Status: RESOLVED FIXED
Product: gsl
Classification: Code
Component: code
AOO 3.4.0
All All
: P3 normal (vote)
: AOO 4.0
Assigned To: Armin Le Grand
:
Depends on: 120237
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-09 13:50 UTC by hdu@apache.org
Modified: 2012-10-10 07:14 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation on: ---
Developer Difficulty: ---


Attachments
original patch for the enhancement (2.18 KB, patch)
2012-07-16 13:40 UTC, hdu@apache.org
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description hdu@apache.org 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 hdu@apache.org 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.