Skip to content

Commit

Permalink
LineStyle: use style from parent graphical primitive
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Sep 4, 2016
1 parent 3d83c18 commit 9c1574e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion vtm/src/org/oscim/theme/XmlThemeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ else if (closed == Closed.NO)
throw new ThemeException("zoom-min must be less or equal zoom-max: " + zoomMin);

RuleBuilder b = RuleBuilder.create(keys, values);
b.setZoom(zoomMin, zoomMax);
b.zoom(zoomMin, zoomMax);
b.element(element);
b.select(selector);
return b;
Expand Down
2 changes: 1 addition & 1 deletion vtm/src/org/oscim/theme/rule/RuleBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public static RuleBuilder create(String keys, String values) {
return new RuleBuilder(type, keyList, valueList);
}

public RuleBuilder setZoom(byte zoomMin, byte zoomMax) {
public RuleBuilder zoom(byte zoomMin, byte zoomMax) {
// zoom-level bitmask
zoom = 0;
for (int z = zoomMin; z <= zoomMax && z < 32; z++)
Expand Down
6 changes: 0 additions & 6 deletions vtm/src/org/oscim/theme/styles/LineStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public LineStyle current() {

public static class LineBuilder<T extends LineBuilder<T>> extends StyleBuilder<T> {

public String style;
public Cap cap;
public boolean outline;
public boolean fixed;
Expand Down Expand Up @@ -165,11 +164,6 @@ public T reset() {
return self();
}

public T style(String name) {
this.style = name;
return self();
}

public T blur(float blur) {
this.blur = blur;
return self();
Expand Down
3 changes: 2 additions & 1 deletion vtm/src/org/oscim/theme/styles/RenderStyle.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright 2010, 2011, 2012 mapsforge.org
* Copyright 2013 Hannes Janetzek
* Copyright 2016 devemux86
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
Expand Down Expand Up @@ -35,7 +36,7 @@ public static abstract class StyleBuilder<T extends StyleBuilder<T>> {
public int strokeColor;
public float strokeWidth;

public T setStyle(String style) {
public T style(String style) {
this.style = style;
return self();
}
Expand Down

0 comments on commit 9c1574e

Please sign in to comment.