Changeset 8087 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java
- Timestamp:
- 2015-02-19T15:22:49+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java
r7402 r8087 127 127 float xOffset = 0; 128 128 float yOffset = 0; 129 float[] offset = c.get( "text-offset", null, float[].class);129 float[] offset = c.get(TEXT_OFFSET, null, float[].class); 130 130 if (offset != null) { 131 131 if (offset.length == 1) { … … 136 136 } 137 137 } 138 xOffset = c.get( "text-offset-x", xOffset, Float.class);139 yOffset = c.get( "text-offset-y", yOffset, Float.class);140 141 Color color = c.get( "text-color", defaultTextColor, Color.class);142 float alpha = c.get( "text-opacity", 1f, Float.class);138 xOffset = c.get(TEXT_OFFSET_X, xOffset, Float.class); 139 yOffset = c.get(TEXT_OFFSET_Y, yOffset, Float.class); 140 141 Color color = c.get(TEXT_COLOR, defaultTextColor, Color.class); 142 float alpha = c.get(TEXT_OPACITY, 1f, Float.class); 143 143 color = new Color(color.getRed(), color.getGreen(), 144 144 color.getBlue(), Utils.color_float2int(alpha)); 145 145 146 Float haloRadius = c.get( "text-halo-radius", null, Float.class);146 Float haloRadius = c.get(TEXT_HALO_RADIUS, null, Float.class); 147 147 if (haloRadius != null && haloRadius <= 0) { 148 148 haloRadius = null; … … 150 150 Color haloColor = null; 151 151 if (haloRadius != null) { 152 haloColor = c.get( "text-halo-color", Utils.complement(color), Color.class);153 float haloAlpha = c.get( "text-halo-opacity", 1f, Float.class);152 haloColor = c.get(TEXT_HALO_COLOR, Utils.complement(color), Color.class); 153 float haloAlpha = c.get(TEXT_HALO_OPACITY, 1f, Float.class); 154 154 haloColor = new Color(haloColor.getRed(), haloColor.getGreen(), 155 155 haloColor.getBlue(), Utils.color_float2int(haloAlpha));
Note:
See TracChangeset
for help on using the changeset viewer.