getStrokeStyle static method
Map<String, dynamic>
getStrokeStyle(
- dynamic width,
- dynamic color,
- dynamic lineJoin,
- dynamic lineCap,
- dynamic miterLimit,
Implementation
static Map<String, dynamic> getStrokeStyle(
width, color, lineJoin, lineCap, miterLimit) {
// Param width: Stroke width
// Param color: As returned by THREE.Color.getStyle()
// Param lineJoin: One of "round", "bevel", "miter" or "miter-limit"
// Param lineCap: One of "round", "square" or "butt"
// Param miterLimit: Maximum join length, in multiples of the "width" parameter (join is truncated if it exceeds that distance)
// Returns style object
width = width ?? 1;
color = color ?? '#000';
lineJoin = lineJoin ?? 'miter';
lineCap = lineCap ?? 'butt';
miterLimit = miterLimit ?? 4;
return {
"strokeColor": color,
"strokeWidth": width,
"strokeLineJoin": lineJoin,
"strokeLineCap": lineCap,
"strokeMiterLimit": miterLimit
};
}