From 1883e381fee5ef851e33a8fbf57f842da985dc95 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Sat, 21 Dec 2024 23:33:31 +0800 Subject: [PATCH] feat: Graphic Props Base Comment --- src/core/render/renderer/props.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/render/renderer/props.ts b/src/core/render/renderer/props.ts index d190a04..61f688e 100644 --- a/src/core/render/renderer/props.ts +++ b/src/core/render/renderer/props.ts @@ -91,12 +91,18 @@ export interface DamageProps extends BaseProps { strokeWidth?: number; } -interface GraphicPropsBase extends BaseProps, Partial { +export interface GraphicPropsBase extends BaseProps, Partial { + /** 是否填充,若填写 {@link stroke},那么表现为先填充后描边 */ fill?: boolean; + /** 是否描边,若填写 {@link fill},那么表现为先填充后描边 */ stroke?: boolean; + /** 是否先描边后填充,优先级最高,若设置,则 {@link fill} 与 {@link stroke} 无效。 */ strokeAndFill?: boolean; + /** 填充原则,比如 `nonzero` 表示非零环绕原则,默认为奇偶环绕原则 `evenodd` */ fillRule?: CanvasFillRule; + /** 填充样式 */ fillStyle?: CanvasStyle; + /** 描边样式 */ strokeStyle?: CanvasStyle; }