Opened 8 years ago
Closed 8 years ago
#13375 closed defect (fixed)
[Patch] Fix icon rendering
Reported by: | michael2402 | Owned by: | michael2402 |
---|---|---|---|
Priority: | normal | Milestone: | 16.08 |
Component: | Core mappaint | Version: | |
Keywords: | gsoc-core regression | Cc: | Don-vip, bastiK, stoecker |
Description (last modified by )
[10827] introduced a bug where the coordinates were not computed correctly.
I fixed the sign error and also made the selection box rotate with the image (it looked odd if the image is rotated and that box is not).
Attachments (5)
Change History (17)
by , 8 years ago
Attachment: | patch-fix-mappaint-icons.patch added |
---|
by , 8 years ago
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
Milestone: | → 16.08 |
---|
comment:3 by , 8 years ago
Keywords: | regression added |
---|---|
Type: | enhancement → defect |
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 8 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
by , 8 years ago
by , 8 years ago
Attachment: | unsharpiconbox.png added |
---|
comment:7 by , 8 years ago
Another problem is that the icon box is unsharp. However I alreaedy noticed this before r10827 on high zoom levels. Now it seems it is always unsharp.
comment:8 by , 8 years ago
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2016-08-18 19:51:12 +0200 (Thu, 18 Aug 2016) Build-Date:2016-08-18 17:56:08 Revision:10842 Relative:URL: ^/trunk Identification: JOSM/1.5 (10842 de) Windows 7 32-Bit Memory Usage: 384 MB / 742 MB (88 MB allocated, but free) Java version: 1.8.0_101-b13, Oracle Corporation, Java HotSpot(TM) Client VM VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files\josm-latest-bla.jnlp, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=256m,768m, -Djnlpx.splashport=63865, -Djnlpx.jvm=<java.home>\bin\javaw.exe, -Djnlpx.vmargs=LURqYXZhLnV0aWwuQXJyYXlzLnVzZUxlZ2FjeU1lcmdlU29ydD10cnVlAA==] Dataset consistency test: No problems found }}
comment:9 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
Summary: | [Patch] Fix icon rendering. → Fix icon rendering |
by , 8 years ago
Attachment: | patch-test-icon-rendering.patch added |
---|
comment:10 by , 8 years ago
The problem is with how we define the center / position of objects.
The definition currently used is:
- Center is exactly the middle of the map view
- Objects are placed on the exact position, if they are between two pixel, antialiasing gives us that nice line
The jumping during zoom is caused by rounding problems: (int)
rounds towards zero. Since some parts of the code are using translated coordinates, we may get differences there. After switching that to Math.round()
, I still got flickering images. This was caused by the map view center not being aligned to a pixel (map view has an odd width/height).
I changed the zoom code to not use the exact center but a center close to the exact one. The component still aligns to the exact center. So if you move the window around, rounding errors caused by this will not sum up.
I attached the patch, it should fix the issue. I have not had time to test if it works in all zoom situations.
comment:11 by , 8 years ago
Summary: | Fix icon rendering → [Patch] Fix icon rendering |
---|
In 10842/josm: