Line texture: randomize offset rendering, #105
This commit is contained in:
@@ -264,6 +264,7 @@ public class VectorLayer extends AbstractVectorLayer<Drawable> {
|
||||
.color(style.strokeColor)
|
||||
.fixed(style.fixed)
|
||||
.level(0)
|
||||
.randomOffset(style.randomOffset)
|
||||
.stipple(style.stipple)
|
||||
.stippleColor(style.stippleColor)
|
||||
.stippleWidth(style.stippleWidth)
|
||||
|
||||
@@ -50,6 +50,8 @@ public class Style {
|
||||
public final float stippleWidth;
|
||||
public final TextureItem texture;
|
||||
|
||||
public final boolean randomOffset;
|
||||
|
||||
private Style(Builder builder) {
|
||||
strokeWidth = builder.strokeWidth;
|
||||
strokeColor = builder.strokeColor;
|
||||
@@ -68,6 +70,8 @@ public class Style {
|
||||
stippleColor = builder.stippleColor;
|
||||
stippleWidth = builder.stippleWidth;
|
||||
texture = builder.texture;
|
||||
|
||||
randomOffset = builder.randomOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,6 +103,8 @@ public class Style {
|
||||
public float stippleWidth = 1;
|
||||
public TextureItem texture = null;
|
||||
|
||||
public boolean randomOffset = true;
|
||||
|
||||
protected Builder() {
|
||||
}
|
||||
|
||||
@@ -221,6 +227,11 @@ public class Style {
|
||||
this.texture = texture;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder randomOffset(boolean randomOffset) {
|
||||
this.randomOffset = randomOffset;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
static final Style DEFAULT_STYLE = new Builder()
|
||||
|
||||
Reference in New Issue
Block a user