Opened 9 years ago
Last modified 8 years ago
#12415 new defect
[patch] temporary layer did not use use antialiasing
Reported by: | kolesar | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | antialiasing layer | Cc: | michael2402 |
Description (last modified by )
First version of this ticket was named "draw mode did not use use antialiasing". Later I have discovered that many mapmode tools draw to the same temporary layer. Instead of copying the same logic to the tools I have moved setting antialiasing to MapView where this temporary layer is created.
MapView asks MapRendererFactory for an instance of AbstractMapRenderer that applies the same setting for antialiasing as data layers use, regarding to separate antialiasing setting of wireframe mode.
Please use later patch named TemporaryLayerUseAntialiasing.
Attachments (2)
Change History (16)
by , 9 years ago
Attachment: | DrawModeUseAntialiasing.patch added |
---|
comment:1 by , 9 years ago
Description: | modified (diff) |
---|---|
Summary: | [patch] draw mode did not use use antialiasing → [patch] temporary layer did not use use antialiasing |
by , 9 years ago
Attachment: | TemporaryLayerUseAntialiasing.patch added |
---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Keywords: | antialiasing layer added |
---|---|
Milestone: | → 16.03 |
improving antialiasing for all layers is a great enhancement, can you please take bastiK's remarks into account? :)
comment:5 by , 9 years ago
Milestone: | 16.04 → 16.05 |
---|
comment:6 by , 9 years ago
Cc: | added |
---|---|
Milestone: | 16.05 → 16.06 |
@Michael: maybe this one would interest you? :)
comment:7 by , 9 years ago
I'll have a look at it. Temporary layers are on the TODO-List for next week (I'll prepare some patches to be included after 16.05).
A first note: I plan on splitting the layer drawing code and add a paintAll() to each layer that does the same as the paint() in JComponent. We can put the setup code there, that way each layer can do it's own setup if required.
comment:8 by , 8 years ago
Milestone: | 16.06 → 16.07 |
---|
comment:9 by , 8 years ago
Milestone: | 16.07 → 16.08 |
---|
comment:10 by , 8 years ago
Milestone: | 16.08 → 16.09 |
---|
comment:11 by , 8 years ago
Milestone: | 16.09 → 16.10 |
---|
comment:14 by , 8 years ago
Milestone: | 16.12 |
---|
Great!
This is not only an issue for temporary layers, but also for real layers: If you put a marker layer or validator layer on top of a data layer, then the top layer will inherit the antialiasing settings of the layer below.
I can see strange glitches, i.e. it switches between aa and no aa. This must be because sometimes it uses
nonChangedLayersBuffer
and the drawing of the data layer is skipped. This leaves theGraphics2D
object in its virgin no-aa state. However when the data layer is redrawn, the marker / validator layer is in also in aa mode.We should set aa to a default value before drawing each layer (inside the loop). I think this default value should be "no aa" for real layers: A layer often displays lots of data and performance is highest priority. Of course this can (and should) be set in each individual
Layer
class.Then, for temporary layers, it is a good idea to respect wireframe mode / default draw mode. But I think it would be even better to ask the active layer if it considers itself in aa or no aa mode (maybe default return value null == "i don't care"). Practically this is pretty much the same, but I feel it is the active layer's job to dictate this. In principle, JOSM is not limited to osm data layers - think of a plugin that edits gpx layer in place, etc.