Skip to content

SolidPaint ​

纯色填充对象, 可以用于填充与描边。

关键属性 ​

type: string ​

填充类型为 solid。

color: Color ​

颜色。

基础属性 ​

blendMode?: BlendMode ​

混合模式,默认为 normal。

visible?: boolean ​

是否可见,默认为 true。

opacity?: number ​

不透明度,默认为 1,暂时仅针对 color 为 颜色对象 有效。

归属 ​

UI ​

示例 ​

ts
import { Leafer, Rect } from 'leafer-ui'

const leafer = new Leafer({ view: window })

const rect = new Rect({
    width: 100,
    height: 100,
    fill: { 
        type: 'solid',
        color: '#32cd79'
    },
})

leafer.add(rect)

Released under the MIT License.