feat: graphics 详细期望结果

This commit is contained in:
unanmed 2024-11-30 23:30:23 +08:00
parent 9d25a521d0
commit 85d7f6c8ff

View File

@ -3,6 +3,16 @@ import { RenderItem } from '../item';
import { Transform } from '../transform';
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 {
/** 线宽 */
lineWidth: number;
@ -31,11 +41,13 @@ interface IGraphicProperty extends ILineProperty {
export const enum GraphicMode {
/** 仅填充 */
Fill = 1,
Fill,
/** 仅描边 */
Stroke = 2,
/** 填充+描边 */
All = 3
Stroke,
/** 先填充,然后描边 */
FillAndStroke,
/** 先描边,然后填充 */
StrokeAndFill
}
export abstract class GraphicItemBase