|
@@ -240,8 +240,6 @@ export default class Draw {
|
|
|
const fontWidth1 = geometry.sideWidth
|
|
|
//let dy = (points[3].y - points[0].y)/fontInfo.textValues.length/2
|
|
|
let dy = geometry.sideThickness/fontInfo.height/2
|
|
|
- console.log('dy:'+dy)
|
|
|
- console.log('(points[3].y - points[0].y):'+(points[3].y - points[0].y));
|
|
|
for(let i=0;i<fontInfo.textValues.length;++i){
|
|
|
// const line1 = mathUtil.createLine1({ x: (points[0].x + points[3].x) / 2, y: (points[0].y + points[3].y) / 2 }, { x: (points[2].x + points[1].x) / 2, y: (points[2].y + points[1].y) / 2 })
|
|
|
// const fontStart1 = mathUtil.getDisPointsLine(line1, pt, fontWidth1 / 2, fontWidth1 / 2)
|
|
@@ -254,7 +252,6 @@ export default class Draw {
|
|
|
//let count = (2*(i-(fontInfo.textValues.length-1))+1)
|
|
|
let count = 1 * (fontInfo.textValues.length-i)
|
|
|
count = 2* count - fontInfo.textValues.length
|
|
|
- console.log('count:'+count)
|
|
|
this.context.fillText(fontInfo.textValues[i], pt.x - fontWidth1/2, pt.y + dy*count)
|
|
|
}
|
|
|
|
|
@@ -911,11 +908,11 @@ export default class Draw {
|
|
|
else{
|
|
|
if(geometry.hasOwnProperty('width')){
|
|
|
//this.context.drawImage(geometry.image, pt.x-geometry.width/2, pt.y-geometry.height/2, geometry.width, geometry.height)
|
|
|
- this.context.drawImage(geometry.image, -geometry.width / 2, -geometry.height / 2)
|
|
|
+ this.context.drawImage(geometry.image, -geometry.ratio * geometry.width / 2, -geometry.ratio * geometry.height / 2,geometry.ratio * geometry.width / 2, geometry.ratio * geometry.height / 2)
|
|
|
}
|
|
|
else{
|
|
|
//this.context.drawImage(geometry.image, pt.x-geometry.width/2, pt.y-geometry.height/2, geometry.image.width, geometry.image.height)
|
|
|
- this.context.drawImage(geometry.image, -geometry.width / 2, -geometry.height / 2)
|
|
|
+ this.context.drawImage(geometry.image, -geometry.ratio * geometry.width / 2, -geometry.ratio * geometry.height / 2,geometry.ratio * geometry.width / 2, geometry.ratio * geometry.height / 2)
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1035,7 +1032,6 @@ export default class Draw {
|
|
|
this.context.closePath();
|
|
|
this.context.fill();
|
|
|
this.context.stroke();
|
|
|
-
|
|
|
this.context.restore();
|
|
|
}
|
|
|
|