contents are placed on inner faces of building, with visibles above surface and others below
This commit is contained in:
@@ -4,7 +4,7 @@ export default {
|
||||
deg2rad (deg) {
|
||||
return deg * (Math.PI / 180)
|
||||
},
|
||||
createLabelCanvas (text, fontsize) {
|
||||
createLabelCanvas (text, fontsize, sizefactore, txtcolor) {
|
||||
// console.log('createLabelCanvas', this.data.Titre)
|
||||
const size = fontsize
|
||||
const borderSize = 5
|
||||
@@ -19,7 +19,7 @@ export default {
|
||||
width = Math.max(width, ctx.measureText(lines[i]).width + doubleBorderSize)
|
||||
}
|
||||
const height = size * lines.length + doubleBorderSize
|
||||
this.label_size = { x: width / 21, y: height / 21 }
|
||||
this.label_size = { x: width / sizefactore, y: height / sizefactore }
|
||||
ctx.canvas.width = width
|
||||
ctx.canvas.height = height
|
||||
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
|
||||
// ctx.fillStyle = 'red'
|
||||
// ctx.fillRect(0, 0, width, height)
|
||||
ctx.fillStyle = 'black'
|
||||
ctx.fillStyle = txtcolor
|
||||
for (var j = 0; j < lines.length; j++) {
|
||||
ctx.fillText(lines[j], borderSize, borderSize + j * size)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user