Modify

Opened 18 months ago

Last modified 5 months ago

#18131 new defect

Antialias JOSM logo on loading screen - jaggy steps are not very nice

Reported by: mkoniecz Owned by: team
Priority: minor Milestone:
Component: Core Version:
Keywords: template_report logo antialiasing svg clip path Cc:

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. Open JOSM
  2. See logo

What is the expected result?

No jaggy steps on upper logo edge

What happens instead?

Jaggy steps especially visible on the upper edge

Please provide any additional information below. Attach a screenshot if possible.


URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-09-12 23:23:47 +0200 (Thu, 12 Sep 2019)
Build-Date:2019-09-12 21:28:35
Revision:15348
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15348 en) Linux Ubuntu 16.04.6 LTS
Memory Usage: 428 MB / 869 MB (183 MB allocated, but free)
Java version: 1.8.0_201-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: :0.0 1366x768
Maximum Screen Size: 1366x768
libcommons-logging-java: libcommons-logging-java:all-1.2-1+build1
fonts-noto: fonts-noto:-

Plugins:
+ OpeningHoursEditor (34977)
+ PicLayer (35104)
+ buildings_tools (34982)
+ continuosDownload (82)
+ ejml (35049)
+ geotools (34908)
+ imagery_offset_db (34908)
+ jts (35064)
+ log4j (34908)
+ measurement (35051)
+ reverter (35084)
+ todo (30306)

Validator rules:
+ ${HOME}/Documents/install_moje/OSM software/josm/data/validator/deprecated.mapcss
+ ${HOME}/Documents/install_moje/OSM software/josm/data/validator/unnecessary.mapcss
+ ${HOME}/Documents/install_moje/OSM software/josm/data/validator/combinations.mapcss

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Failed to add ${HOME}/Documents/install_moje/OSM software/josm/data/validator/deprecated.mapcss to tag checker
- W: java.nio.file.NoSuchFileException: ${HOME}/Documents/install_moje/OSM software/josm/data/validator/deprecated.mapcss
- W: Failed to add ${HOME}/Documents/install_moje/OSM software/josm/data/validator/unnecessary.mapcss to tag checker
- W: java.nio.file.NoSuchFileException: ${HOME}/Documents/install_moje/OSM software/josm/data/validator/unnecessary.mapcss
- W: Failed to add ${HOME}/Documents/install_moje/OSM software/josm/data/validator/combinations.mapcss to tag checker
- W: java.nio.file.NoSuchFileException: ${HOME}/Documents/install_moje/OSM software/josm/data/validator/combinations.mapcss

Attachments (2)

Selection_002.png (17.1 KB) - added by mkoniecz 18 months ago.
damned.PNG (63.7 KB) - added by Don-vip 18 months ago.

Download all attachments as: .zip

Change History (13)

Changed 18 months ago by mkoniecz

Attachment: Selection_002.png added

comment:1 Changed 18 months ago by Don-vip

Description: modified (diff)
Keywords: logo antialiasing added
Priority: normalminor

comment:2 Changed 18 months ago by Don-vip

Keywords: svg added

Changed 18 months ago by Don-vip

Attachment: damned.PNG added

comment:3 Changed 18 months ago by Don-vip


Even Internet Explorer does a better job than us :'(

comment:4 Changed 18 months ago by Don-vip

comment:5 Changed 7 months ago by mkoniecz

https://github.com/blackears/svgSalamander/issues/44#issuecomment-662588421 has some relevant comments

Try using the following rendering hints:

public final static Map<Object, Object> RENDERING_HINTS = Map.of(
      KEY_ANTIALIASING,
      VALUE_ANTIALIAS_ON,
      KEY_ALPHA_INTERPOLATION,
      VALUE_ALPHA_INTERPOLATION_QUALITY,
      KEY_COLOR_RENDERING,
      VALUE_COLOR_RENDER_QUALITY,
      KEY_DITHERING,
      VALUE_DITHER_DISABLE,
      KEY_FRACTIONALMETRICS,
      VALUE_FRACTIONALMETRICS_ON,
      KEY_INTERPOLATION,
      VALUE_INTERPOLATION_BICUBIC,
      KEY_RENDERING,
      VALUE_RENDER_QUALITY,
      KEY_STROKE_CONTROL,
      VALUE_STROKE_PURE,
      KEY_TEXT_ANTIALIASING,
      VALUE_TEXT_ANTIALIAS_ON
  );

// ... later on ...

graphics.setRenderingHints( RENDERING_HINTS );

See: https://github.com/DaveJarvis/kmcaster/blob/master/src/main/com/whitemagicsoftware/kmcaster/SvgRasterizer.java
Can you confirm that this is something you can fix by setting rendering hints in your code so that I may close this bug report?

comment:6 Changed 7 months ago by stoecker

Milestone: 20.08

comment:7 Changed 6 months ago by simon04

I've replied at https://github.com/blackears/svgSalamander/issues/44#issuecomment-678665074

JOSM developer here. We've already been setting RenderingHints.KEY_ANTIALIASING to RenderingHints.VALUE_ANTIALIAS_ON, see https://github.com/openstreetmap/josm/blob/master/src/org/openstreetmap/josm/tools/ImageProvider.java#L1639-L1652

Adding the additional hints does not make a difference. Here is the result I obtain when adding all hints from https://github.com/blackears/svgSalamander/issues/44#issuecomment-662588421

https://user-images.githubusercontent.com/782446/90961413-0902b600-e4a9-11ea-828b-056a67d5ff1e.png

Any ideas to debug this problem/behaviour?

comment:8 Changed 6 months ago by simon04

DevCharly in https://github.com/blackears/svgSalamander/issues/44#issuecomment-678672373

The "stepping" at the outside of the map and the pen are caused by clipping used in the SVG.

Currently, the following icons use a clip-path:

git grep -l clip-path=
native/linux/latest/usr/share/icons/hicolor/scalable/apps/org.openstreetmap.josm-latest.svg
native/linux/tested/usr/share/icons/hicolor/scalable/apps/org.openstreetmap.josm.svg
nodist/images/logo/raw_logo_for_inkscape.svg
resources/images/clock.svg
resources/images/data/imagery/osmbasedmap.svg
resources/images/logo.svg
resources/images/openlocation.svg
resources/images/preferences/map.svg
resources/images/preferences/remotecontrol.svg
resources/images/presets/landmark/bunker_silo.svg
resources/images/presets/shop/groceries/dairy.svg
resources/images/presets/shop/hardware.svg

comment:9 Changed 6 months ago by simon04

Milestone: 20.0820.09

comment:10 Changed 5 months ago by Don-vip

Keywords: clip path added
Milestone: 20.0920.10

comment:11 Changed 5 months ago by simon04

Milestone: 20.10

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to mkoniecz
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.