本文整理汇总了Java中org.oscim.backend.canvas.Paint.Cap类的典型用法代码示例。如果您正苦于以下问题:Java Cap类的具体用法?Java Cap怎么用?Java Cap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Cap类属于org.oscim.backend.canvas.Paint包,在下文中一共展示了Cap类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LineStyle
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
public LineStyle(int level, String style, int color, float width,
Cap cap, boolean fixed,
int stipple, int stippleColor, float stippleWidth,
int fadeScale, float blur, boolean isOutline) {
this.level = level;
this.style = style;
this.outline = isOutline;
this.cap = cap;
this.color = color;
this.width = width;
this.fixed = fixed;
this.stipple = stipple;
this.stippleColor = stippleColor;
this.stippleWidth = stippleWidth;
this.blur = blur;
this.fadeScale = fadeScale;
}
示例2: reset
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
public T reset() {
level = -1;
style = null;
fillColor = Color.BLACK;
cap = Cap.ROUND;
strokeWidth = 1;
fixed = false;
fadeScale = -1;
blur = 0;
stipple = 0;
stippleWidth = 1;
stippleColor = Color.BLACK;
return self();
}
示例3: MyTheme
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
public MyTheme() {
rules(
matchKeyValue("natural", "water")
.style(area(Color.BLUE)),
matchKeyValue("landuse", "forest")
.style(area(Color.GREEN)),
matchKeyValue("landuse", "residential")
.style(area(Color.LTGRAY)),
matchKey("highway")
.rules(matchValue("residential")
.style(line(Color.DKGRAY, 1.2f),
line(Color.WHITE, 1.1f)
.cap(Cap.ROUND)))
.style(line(Color.BLACK, 1)
.blur(0.5f)));
}
示例4: TrackLayer
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
public TrackLayer(Map map, Track track) {
super(map);
mWorker = new Worker(map);
mLineStyle = new LineStyle(track.style.color, track.style.width, Cap.BUTT);
mRenderer = new RenderPath();
mTrack = track;
updatePoints();
}
示例5: GridRendererMT
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
public GridRendererMT(final float scale) {
this(
1,
new LineStyle(Color.GRAY, 1.2f * scale, Cap.BUTT),
TextStyle
.builder()
.fontSize(26 * scale)
.fontStyle(Paint.FontStyle.NORMAL)
.color(Color.RED)
.build());
}
示例6: GridRenderer
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
public GridRenderer() {
this(1, new LineStyle(Color.LTGRAY, 1.2f, Cap.BUTT),
TextStyle.builder()
.fontSize(22)
.color(Color.RED)
.build());
}
示例7: PathLayer
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
public PathLayer(Map map, int lineColor, float lineWidth) {
super(map);
mWorker = new Worker(map);
mLineStyle = new LineStyle(lineColor, lineWidth, Cap.BUTT);
mRenderer = new RenderPath();
mPoints = new ArrayList<GeoPoint>();
}
示例8: createLineStyle
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
private LineStyle createLineStyle() {
final Map25TrackConfig trackConfig = Map25ConfigManager.getActiveTourTrackConfig();
return LineStyle
.builder()//
.strokeWidth(trackConfig.outlineWidth)
.color(ColorUtil.getARGB(trackConfig.outlineColor, 0xff))
.cap(Cap.BUTT)
// this is not yet working
// .isOutline(true)
.build();
}
示例9: TileGridLayer
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
public TileGridLayer(Map map, int color, float width, int repeat) {
super(map, new GridRenderer(repeat, new LineStyle(color, width, Cap.BUTT), null));
}
示例10: createLine
import org.oscim.backend.canvas.Paint.Cap; //导入依赖的package包/类
/**
* @param line
* optional: line style defaults
* @param level
* the drawing level of this instruction.
* @param isOutline
* is outline layer
* @return a new Line with the given rendering attributes.
*/
private LineStyle createLine(LineStyle line, String elementName, Attributes attributes,
int level, boolean isOutline) {
LineBuilder<?> b = mLineBuilder.set(line);
b.isOutline(isOutline);
b.level(level);
for (int i = 0; i < attributes.getLength(); i++) {
String name = attributes.getLocalName(i);
String value = attributes.getValue(i);
if ("id".equals(name))
b.style = value;
else if ("src".equals(name))
;// src = value;
else if ("use".equals(name))
;// ignore
else if ("outline".equals(name))
;// ignore
else if ("stroke".equals(name))
b.color(value);
else if ("width".equals(name) || "stroke-width".equals(name)) {
b.strokeWidth = parseFloat(value);
if (line == null) {
if (!isOutline)
validateNonNegative("width", b.strokeWidth);
} else {
/* use stroke width relative to 'line' */
b.strokeWidth += line.width;
if (b.strokeWidth <= 0)
b.strokeWidth = 1;
}
}
else if ("cap".equals(name) || "stroke-linecap".equals(name))
b.cap = Cap.valueOf(value.toUpperCase());
else if ("fix".equals(name))
b.fixed = parseBoolean(value);
else if ("stipple".equals(name))
b.stipple = parseInt(value);
else if ("stipple-stroke".equals(name))
b.stippleColor(value);
else if ("stipple-width".equals(name))
b.stippleWidth = parseFloat(value);
else if ("fade".equals(name))
b.fadeScale = Integer.parseInt(value);
else if ("min".equals(name))
; //min = Float.parseFloat(value);
else if ("blur".equals(name))
b.blur = parseFloat(value);
else if ("style".equals(name))
; // ignore
else if ("dasharray".equals(name))
; // TBD
else
logUnknownAttribute(elementName, name, value, i);
}
return b.build();
}