LineStyle: use style from parent graphical primitive

This commit is contained in:
Emux 2016-09-04 12:10:16 +03:00
parent 3d83c188e0
commit 9c1574eb41
4 changed files with 4 additions and 9 deletions

View File

@ -331,7 +331,7 @@ public class XmlThemeBuilder extends DefaultHandler {
throw new ThemeException("zoom-min must be less or equal zoom-max: " + zoomMin); throw new ThemeException("zoom-min must be less or equal zoom-max: " + zoomMin);
RuleBuilder b = RuleBuilder.create(keys, values); RuleBuilder b = RuleBuilder.create(keys, values);
b.setZoom(zoomMin, zoomMax); b.zoom(zoomMin, zoomMax);
b.element(element); b.element(element);
b.select(selector); b.select(selector);
return b; return b;

View File

@ -118,7 +118,7 @@ public class RuleBuilder {
return new RuleBuilder(type, keyList, valueList); return new RuleBuilder(type, keyList, valueList);
} }
public RuleBuilder setZoom(byte zoomMin, byte zoomMax) { public RuleBuilder zoom(byte zoomMin, byte zoomMax) {
// zoom-level bitmask // zoom-level bitmask
zoom = 0; zoom = 0;
for (int z = zoomMin; z <= zoomMax && z < 32; z++) for (int z = zoomMin; z <= zoomMax && z < 32; z++)

View File

@ -110,7 +110,6 @@ public final class LineStyle extends RenderStyle {
public static class LineBuilder<T extends LineBuilder<T>> extends StyleBuilder<T> { public static class LineBuilder<T extends LineBuilder<T>> extends StyleBuilder<T> {
public String style;
public Cap cap; public Cap cap;
public boolean outline; public boolean outline;
public boolean fixed; public boolean fixed;
@ -165,11 +164,6 @@ public final class LineStyle extends RenderStyle {
return self(); return self();
} }
public T style(String name) {
this.style = name;
return self();
}
public T blur(float blur) { public T blur(float blur) {
this.blur = blur; this.blur = blur;
return self(); return self();

View File

@ -1,6 +1,7 @@
/* /*
* Copyright 2010, 2011, 2012 mapsforge.org * Copyright 2010, 2011, 2012 mapsforge.org
* Copyright 2013 Hannes Janetzek * Copyright 2013 Hannes Janetzek
* Copyright 2016 devemux86
* *
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org). * This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
* *
@ -35,7 +36,7 @@ public abstract class RenderStyle {
public int strokeColor; public int strokeColor;
public float strokeWidth; public float strokeWidth;
public T setStyle(String style) { public T style(String style) {
this.style = style; this.style = style;
return self(); return self();
} }