After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 152 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 5.9 KiB |
@ -1,18 +1,40 @@
|
||||
import Konva from "konva";
|
||||
|
||||
const title=function (width,height,title) {
|
||||
return new Konva.Text({
|
||||
const group=new Konva.Group({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: width,
|
||||
height: 20,
|
||||
})
|
||||
|
||||
const imageObj = new Image();
|
||||
imageObj.src = require('@/assets/kban/logo.png');
|
||||
imageObj.onload = function () {
|
||||
const shape = new Konva.Image({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: width*0.86,
|
||||
height:41,
|
||||
image: imageObj,
|
||||
});
|
||||
group.add(shape)
|
||||
}
|
||||
|
||||
const text=new Konva.Text({
|
||||
x: 0,
|
||||
y: 8,
|
||||
width: width,
|
||||
height: 20,
|
||||
lineHeight: 1,
|
||||
stroke: 'blue',
|
||||
strokeWidth: 2,
|
||||
text: title,
|
||||
align: 'center',
|
||||
fill:'#fff',
|
||||
fontSize: 32,
|
||||
fontStyle:'bold'
|
||||
})
|
||||
group.add(text)
|
||||
|
||||
return group
|
||||
}
|
||||
|
||||
export default title
|
||||
|
@ -1,18 +1,40 @@
|
||||
import Konva from "konva";
|
||||
|
||||
const title=function (width,height,title) {
|
||||
return new Konva.Text({
|
||||
const group=new Konva.Group({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: width,
|
||||
height: 20,
|
||||
})
|
||||
|
||||
const imageObj = new Image();
|
||||
imageObj.src = require('@/assets/kban/logo.png');
|
||||
imageObj.onload = function () {
|
||||
const shape = new Konva.Image({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: width*0.86,
|
||||
height:41,
|
||||
image: imageObj,
|
||||
});
|
||||
group.add(shape)
|
||||
}
|
||||
|
||||
const text=new Konva.Text({
|
||||
x: 0,
|
||||
y: 8,
|
||||
width: width,
|
||||
height: 20,
|
||||
lineHeight: 1,
|
||||
stroke: 'blue',
|
||||
strokeWidth: 2,
|
||||
text: title,
|
||||
align: 'center',
|
||||
fill:'#fff',
|
||||
fontSize: 32,
|
||||
fontStyle:'bold'
|
||||
})
|
||||
group.add(text)
|
||||
|
||||
return group
|
||||
}
|
||||
|
||||
export default title
|
||||
|