mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 04:19:30 +08:00
feat: graphics 详细期望结果
This commit is contained in:
parent
9d25a521d0
commit
85d7f6c8ff
@ -3,6 +3,16 @@ import { RenderItem } from '../item';
|
|||||||
import { Transform } from '../transform';
|
import { Transform } from '../transform';
|
||||||
import { ElementNamespace, ComponentInternalInstance } from 'vue';
|
import { ElementNamespace, ComponentInternalInstance } from 'vue';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Expected usage (this comment needs to be deleted after implements correctly):
|
||||||
|
* <rect x={10} y={30} width={50} height={30} fill stroke /> <!-- 表现为先填充,后描边 -->
|
||||||
|
* <circle x={10} y={50} radius={10} start={Math.PI / 2} end={Math.PI} stroke /> <!-- 表现为仅描边 -->
|
||||||
|
* <ellipse x={100} y={50} radiusX={10} radiusY={50} strokeAndFill /> <!-- 表现为先描边后填充 -->
|
||||||
|
* <rect x={100} y={50} width={50} height={30} fill /> <!-- 表现为仅填充 -->
|
||||||
|
* <rect x={100} y={50} width={50} height={30} /> <!-- 表现为仅填充 -->
|
||||||
|
* Line BezierCurve QuadraticCurve 无法设置填充属性,如设置则无效
|
||||||
|
*/
|
||||||
|
|
||||||
interface ILineProperty {
|
interface ILineProperty {
|
||||||
/** 线宽 */
|
/** 线宽 */
|
||||||
lineWidth: number;
|
lineWidth: number;
|
||||||
@ -31,11 +41,13 @@ interface IGraphicProperty extends ILineProperty {
|
|||||||
|
|
||||||
export const enum GraphicMode {
|
export const enum GraphicMode {
|
||||||
/** 仅填充 */
|
/** 仅填充 */
|
||||||
Fill = 1,
|
Fill,
|
||||||
/** 仅描边 */
|
/** 仅描边 */
|
||||||
Stroke = 2,
|
Stroke,
|
||||||
/** 填充+描边 */
|
/** 先填充,然后描边 */
|
||||||
All = 3
|
FillAndStroke,
|
||||||
|
/** 先描边,然后填充 */
|
||||||
|
StrokeAndFill
|
||||||
}
|
}
|
||||||
|
|
||||||
export abstract class GraphicItemBase
|
export abstract class GraphicItemBase
|
||||||
|
Loading…
Reference in New Issue
Block a user