11
This commit is contained in:
@@ -78,6 +78,14 @@ export class ObjectManager {
|
||||
this.layerManager = options.layerManager
|
||||
}
|
||||
onMounted() { }
|
||||
/** 设置混合模式 */
|
||||
setBlendMode(id: string, blendMode: string) {
|
||||
const object = this.canvasManager.getObjectById(id)
|
||||
if (!object) return console.warn('设置混合模式失败,对象不存在ID:', id)
|
||||
object.set("globalCompositeOperation", blendMode)
|
||||
this.canvasManager.renderAll()
|
||||
}
|
||||
|
||||
/** 设置平铺状态 */
|
||||
setFillRepeat(id: string) {
|
||||
const object = this.canvasManager.getObjectById(id)
|
||||
@@ -118,6 +126,7 @@ export class ObjectManager {
|
||||
scaleY: object.scaleY,
|
||||
flipX: object.flipX,
|
||||
flipY: object.flipY,
|
||||
globalCompositeOperation: object.globalCompositeOperation,
|
||||
originX: "left",
|
||||
originY: "top",
|
||||
info,
|
||||
|
||||
Reference in New Issue
Block a user