Protected ProjProtected optionPrivate create设置多边形图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern
setFillPatternStyle({
pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
// image: undefined,
patternColor: "rgba(0, 0, 0,1)",//图案颜色
fill: "rgba(255, 255, 0,1)",//背景色
width: 2,
lineDash: null,
ratio: 1,
offset: 0,
scale: 1,
size: 5,
spacing: 10,
angle: 0
})
设置边框图案填充模式样式,pattern与image 二选一,不用的需undefined,同时配置优先pattern
setStrokePatternStyle({
pattern: undefined,图案Enum:mirage2d.DataType.featureStyleType.caps
// image: undefined,
color: "rgba(255, 255, 0,1)",//背景色
width: 2,
lineDash: null,
ratio: 1,
patternColor: "rgba(0, 0, 0,1)",//图案颜色
offset: 0,
scale: 1,
size: 5,
spacing: 10,
angle: 0
})
设置图形文字样式
setTextStyle({
font: "14px Microsoft YaHei",
text: "示例",
fill: {
color: "#8B4513", //"rgba(255, 255, 255, 1)",
},
stroke: {
color: "rgba(255, 255, 255,1)", //"#fff",
width: 2, //2,
},
backgroundFill: {
color: "rgba(255, 255, 255, 0.0)", //"rgba(255, 255, 255, 1)",
},
backgroundStroke: {
color: "rgba(0, 0, 0, 0.0)", //"#fff",
width: 2,
},
padding: [3, 3, 3, 3],
offsetX: 0,
offsetY: -10,
textBaseline: "bottom",
})
Generated using TypeDoc
设置圆点样式