allow to create Area and Line with 'level' for use as RenderInstruction

This commit is contained in:
Hannes Janetzek 2013-06-28 04:11:18 +02:00
parent ca9440e542
commit eb05c29495
2 changed files with 11 additions and 11 deletions

View File

@ -14,12 +14,7 @@
*/
package org.oscim.theme.renderinstruction;
import org.oscim.backend.canvas.Color;
import org.oscim.theme.IRenderCallback;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes;
/**
* Represents a closed polygon on the map.
@ -28,7 +23,11 @@ public final class Area extends RenderInstruction {
public Area(int fill) {
this.level = 0;
this(0, fill);
}
public Area(int level, int fill) {
this.level = level;
this.style = "";
this.fade = -1;
blendColor = 0;
@ -53,8 +52,8 @@ public final class Area extends RenderInstruction {
// paintFill.setShader(shader);
// }
this.color = fill; //GlUtils.colorToFloatP(fill);
this.blendColor = blendFill; //GlUtils.colorToFloatP(blendFill);
this.color = fill;
this.blendColor = blendFill;
this.blend = blend;
this.strokeWidth = strokeWidth;

View File

@ -14,11 +14,8 @@
*/
package org.oscim.theme.renderinstruction;
import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint.Cap;
import org.oscim.theme.IRenderCallback;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes;
/**
* Represents a polyline on the map.
@ -94,6 +91,10 @@ public final class Line extends RenderInstruction {
this(0, "", stroke, width, Cap.BUTT, true, 0, 0, 0, -1, 0, false, 0);
}
public Line(int level, int stroke, float width) {
this(level, "", stroke, width, Cap.BUTT, true, 0, 0, 0, -1, 0, false, 0);
}
public Line(int stroke, float width, Cap cap) {
this(0, "", stroke, width, cap, true, 0, 0, 0, -1, 0, false, 0);
}