Ignore:
Timestamp:
2020-04-11T08:54:12+02:00 (4 years ago)
Author:
simon04
Message:

fix #18961 - ColorHelper: harmonize color functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java

    r14193 r16252  
    2424import org.openstreetmap.josm.spi.preferences.Config;
    2525import org.openstreetmap.josm.tools.CheckParameterUtil;
     26import org.openstreetmap.josm.tools.ColorHelper;
    2627import org.openstreetmap.josm.tools.Logging;
    2728import org.openstreetmap.josm.tools.RotationAngle;
     
    168169
    169170        mapImage.alpha = Utils.clamp(Config.getPref().getInt("mappaint.icon-image-alpha", 255), 0, 255);
    170         Integer pAlpha = Utils.colorFloat2int(c.get(keys[ICON_OPACITY_IDX], null, float.class));
     171        Integer pAlpha = ColorHelper.float2int(c.get(keys[ICON_OPACITY_IDX], null, float.class));
    171172        if (pAlpha != null) {
    172173            mapImage.alpha = pAlpha;
     
    213214        Stroke stroke = null;
    214215        if (strokeColor != null && strokeWidth != null) {
    215             Integer strokeAlpha = Utils.colorFloat2int(c.get("symbol-stroke-opacity", null, Float.class));
     216            Integer strokeAlpha = ColorHelper.float2int(c.get("symbol-stroke-opacity", null, Float.class));
    216217            if (strokeAlpha != null) {
    217218                strokeColor = new Color(strokeColor.getRed(), strokeColor.getGreen(),
     
    227228
    228229        if (fillColor != null) {
    229             Integer fillAlpha = Utils.colorFloat2int(c.get("symbol-fill-opacity", null, Float.class));
     230            Integer fillAlpha = ColorHelper.float2int(c.get("symbol-fill-opacity", null, Float.class));
    230231            if (fillAlpha != null) {
    231232                fillColor = new Color(fillColor.getRed(), fillColor.getGreen(),
Note: See TracChangeset for help on using the changeset viewer.