@univerjs-pro/engine-shape 0.25.1 → 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/index.d.ts +4 -3
- package/lib/types/{model → models}/shape-model.d.ts +11 -2
- package/lib/types/render-engine/custom-shape-render-model.d.ts +7 -0
- package/lib/types/render-engine/line-shape-render-model.d.ts +15 -0
- package/lib/types/render-engine/point-to-shape-transform.d.ts +3 -3
- package/lib/types/render-engine/shape-render-model.d.ts +4 -1
- package/lib/types/shape-enum.d.ts +49 -0
- package/lib/types/shape-type.d.ts +49 -1
- package/lib/types/util/shape-name.d.ts +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +3 -3
- /package/lib/types/{model → models}/group-shape-model.d.ts +0 -0
package/lib/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { BasicShapeModel as ShapeModel } from '../src/
|
|
1
|
+
export { BasicShapeModel as ShapeModel } from '../src/models/shape-model';
|
|
2
2
|
export { LineShapeRenderModel } from '../src/render-engine/line-shape-render-model';
|
|
3
3
|
export { BaseShapeRenderModel } from '../src/render-engine/shape-render-model';
|
|
4
|
-
export { BasicShapeEnum, ImageFillModeEnum, ImageSourceTypeEnum, ShapeArrowSizeEnum, ShapeArrowTypeEnum, ShapeFillEnum, ShapeGradientTypeEnum, ShapeLineCapEnum, ShapeLineDashEnum, ShapeLineJoinEnum, ShapeLineTypeEnum, ShapeOperatorEnum, ShapeRenderModeEnum, ShapeSketchTypeEnum, ShapeTypeEnum } from '../src/shape-enum';
|
|
5
|
-
export type { IBasicShapeData, IConnectorLayoutResult, IConnectorRouteLayoutResult, IConnectPointInfo, ICustomShapeTextData, ICxnShapeData, IDrawingRect, IGdContext, IGdContextBase, ILineType, IPathCommand, IPresetShapeConfig, IShapeAdjustItem, IShapeAdjustItemResolved, IShapeContextOptions, IShapeData, IShapeHitTestResult, IShapeJSONData, IShapeLineStyle, IShapeModel, IShapePath, IShapePoint, IShapePointWithAdjName, IShapeRect, IShapeRelation, IShapeRelationItem, IShapeRenderParameters, IShapeText, ShapeAdjustHandleTypeEnum, ShapeHitTestHitTypeEnum, } from '../src/shape-type';
|
|
4
|
+
export { BasicShapeEnum, ImageFillModeEnum, ImageSourceTypeEnum, ShapeArrowSizeEnum, ShapeArrowTypeEnum, ShapeFillEnum, ShapeGradientTypeEnum, ShapeLineCapEnum, ShapeLineDashEnum, ShapeLineJoinEnum, ShapeLineTypeEnum, ShapeOperatorEnum, ShapePresetShadowValEnum, ShapeRenderModeEnum, ShapeSketchTypeEnum, ShapeTypeEnum } from '../src/shape-enum';
|
|
5
|
+
export type { IBasicShapeData, IConnectorLayoutResult, IConnectorRouteLayoutResult, IConnectPointInfo, ICustomShapeTextData, ICxnShapeData, IDrawingRect, IGdContext, IGdContextBase, ILineType, IPathCommand, IPresetShapeConfig, IShapeAdjustItem, IShapeAdjustItemResolved, IShapeContextOptions, IShapeData, IShapeHitTestResult, IShapeJSONData, IShapeLineStyle, IShapeModel, IShapePath, IShapePoint, IShapePointWithAdjName, IShapeRect, IShapeRelation, IShapeRelationItem, IShapeRenderParameters, IShapeShadowEffect, IShapeText, IShapeTextRectPadding, ShapeAdjustHandleTypeEnum, ShapeHitTestHitTypeEnum, ShapeTextDirection, } from '../src/shape-type';
|
|
6
6
|
export { AccentBorderCallout1Shape } from '../src/shapes/accent-border-callout1-shape';
|
|
7
7
|
export { AccentBorderCallout2Shape } from '../src/shapes/accent-border-callout2-shape';
|
|
8
8
|
export { AccentBorderCallout3Shape } from '../src/shapes/accent-border-callout3-shape';
|
|
@@ -197,4 +197,5 @@ export { ShapeDefaultConfig } from './shape-default';
|
|
|
197
197
|
export { freeRouteBentConnectorLinePoints } from './util/connector-points-util';
|
|
198
198
|
export type { IBentConnectorResult } from './util/connector-points-util';
|
|
199
199
|
export { ConnectorCoordinateTransform } from './util/connector-transform';
|
|
200
|
+
export { createUniqueShapeName } from './util/shape-name';
|
|
200
201
|
export { isConnectorShape, isCurvedConnectorShape } from './util/shape-util';
|
|
@@ -5,6 +5,7 @@ export declare function deepMerge<T extends Record<string, any>>(target: T, ...s
|
|
|
5
5
|
export declare class BasicShapeModel implements IShapeModel {
|
|
6
6
|
protected _shapeType: ShapeTypeEnum;
|
|
7
7
|
private readonly _id;
|
|
8
|
+
private _name?;
|
|
8
9
|
protected _shapeData: IShapeData;
|
|
9
10
|
/**
|
|
10
11
|
* this property is only used for LineShapeRenderModel to indicate whether to render line points for routing
|
|
@@ -13,12 +14,14 @@ export declare class BasicShapeModel implements IShapeModel {
|
|
|
13
14
|
private _context;
|
|
14
15
|
private _renderModel;
|
|
15
16
|
private _adjustNameMap;
|
|
16
|
-
constructor(shapeType: ShapeTypeEnum, id: string, shapeData?: IShapeData);
|
|
17
|
+
constructor(shapeType: ShapeTypeEnum, id: string, shapeData?: IShapeData, name?: string);
|
|
17
18
|
changeShapeType(shapeType: ShapeTypeEnum, shapeData?: IShapeData): void;
|
|
18
19
|
getShapeType(): ShapeTypeEnum;
|
|
19
20
|
getShapeRelation(): IShapeRelation | undefined;
|
|
20
21
|
getBasicShapeType(): BasicShapeEnum;
|
|
21
22
|
getId(): string;
|
|
23
|
+
getName(): string | undefined;
|
|
24
|
+
setName(name?: string): void;
|
|
22
25
|
/**
|
|
23
26
|
* get shape text data
|
|
24
27
|
* @returns The shape text data
|
|
@@ -68,6 +71,9 @@ export declare class BasicShapeModel implements IShapeModel {
|
|
|
68
71
|
private _getAdjScope;
|
|
69
72
|
private _setAdjustValue;
|
|
70
73
|
clearAdjustValue(): void;
|
|
74
|
+
cloneShapeDataForShapeType(shapeType: ShapeTypeEnum): IShapeData;
|
|
75
|
+
cloneSnapshot(): IShapeJSONData;
|
|
76
|
+
cloneSnapshotForShapeType(shapeType: ShapeTypeEnum): IShapeJSONData;
|
|
71
77
|
/**
|
|
72
78
|
* et adjust value by adj name
|
|
73
79
|
* @param {string} adjName The name of adj point
|
|
@@ -113,8 +119,11 @@ export declare class BasicShapeModel implements IShapeModel {
|
|
|
113
119
|
*/
|
|
114
120
|
buildClipPath(canvasContext: CanvasRenderingContext2D, rect: IShapeRect): IShapeRect | false;
|
|
115
121
|
getDrawingPoints(): IShapePointWithAdjName[];
|
|
116
|
-
calcAdjValue(rect: IShapeRect, point: IShapePoint, adjustInfo: IShapeAdjustItemResolved,
|
|
122
|
+
calcAdjValue(rect: IShapeRect, point: IShapePoint, adjustInfo: IShapeAdjustItemResolved, _isFlipH: boolean, _isFlipV: boolean): number;
|
|
117
123
|
dispose(): void;
|
|
124
|
+
private _getSnapshotAdjustValues;
|
|
125
|
+
private _cloneShapeDataWithSnapshotAdjustValues;
|
|
118
126
|
toJSON(): IShapeJSONData;
|
|
119
127
|
fromJSON(json: IShapeJSONData): void;
|
|
128
|
+
private _createRenderModel;
|
|
120
129
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IPresetShapeConfig } from '../shape-type';
|
|
2
|
+
import { BaseShapeRenderModel } from './shape-render-model';
|
|
3
|
+
export declare class CustomShapeRenderModel extends BaseShapeRenderModel {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly presetShapeConfig: IPresetShapeConfig;
|
|
6
|
+
constructor(name: string, presetShapeConfig: IPresetShapeConfig);
|
|
7
|
+
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { IShapeData, IShapePoint, IShapeRect, IShapeRenderParameters } from '../shape-type';
|
|
2
2
|
import type { BaseShapeContext } from './base-shape-context';
|
|
3
3
|
import { BaseShapeRenderModel } from './shape-render-model';
|
|
4
|
+
/**
|
|
5
|
+
* Interface for storing complete path command information for line shapes
|
|
6
|
+
* Used to preserve bezier curve data when redrawing with arrow adjustments
|
|
7
|
+
*/
|
|
8
|
+
export interface ILinePathCommand {
|
|
9
|
+
command: string;
|
|
10
|
+
points: number[];
|
|
11
|
+
}
|
|
4
12
|
/**
|
|
5
13
|
* Base class for line-type shapes (connectors, lines).
|
|
6
14
|
*
|
|
@@ -13,6 +21,11 @@ import { BaseShapeRenderModel } from './shape-render-model';
|
|
|
13
21
|
*/
|
|
14
22
|
export declare abstract class LineShapeRenderModel extends BaseShapeRenderModel {
|
|
15
23
|
protected _isLineShape: boolean;
|
|
24
|
+
static toRoundedPolylineCommands(commands: ILinePathCommand[], cornerRadius: number): ILinePathCommand[];
|
|
25
|
+
private static _cloneLinePathCommands;
|
|
26
|
+
private static _isLineOnlyPolyline;
|
|
27
|
+
private static _getPolylineCommandPoint;
|
|
28
|
+
private static _getRoundedCorner;
|
|
16
29
|
/**
|
|
17
30
|
* Check if a point is near a line segment.
|
|
18
31
|
*
|
|
@@ -84,8 +97,10 @@ export declare abstract class LineShapeRenderModel extends BaseShapeRenderModel
|
|
|
84
97
|
render(canvasContext: CanvasRenderingContext2D, rect: IShapeRect, shapeContext: BaseShapeContext, shapeData: IShapeData, renderOption: IShapeRenderParameters): void;
|
|
85
98
|
private _scalePoints;
|
|
86
99
|
private _executePathCommand;
|
|
100
|
+
private _drawLinePathCommands;
|
|
87
101
|
private _applyFill;
|
|
88
102
|
private _applyStrokeWithArrows;
|
|
103
|
+
private _getLineCornerRadius;
|
|
89
104
|
/**
|
|
90
105
|
* Extract start and end points with tangent direction points for arrow rendering
|
|
91
106
|
* For bezier curves, uses control points to get correct tangent direction
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { IShapePoint } from '../shape-type';
|
|
2
|
-
interface
|
|
2
|
+
interface IPoint {
|
|
3
3
|
x: number;
|
|
4
4
|
y: number;
|
|
5
5
|
}
|
|
6
|
-
interface
|
|
6
|
+
interface ITransformResult {
|
|
7
7
|
rotation: 0 | 90 | 180 | 270;
|
|
8
8
|
flipH: boolean;
|
|
9
9
|
flipV: boolean;
|
|
10
10
|
restorePoints: IShapePoint[];
|
|
11
11
|
}
|
|
12
|
-
export declare function resolveTransform(points:
|
|
12
|
+
export declare function resolveTransform(points: IPoint[]): ITransformResult;
|
|
13
13
|
export {};
|
|
@@ -23,7 +23,10 @@ export declare abstract class BaseShapeRenderModel {
|
|
|
23
23
|
* @param gdRecord The current gdRecord used to calculate text rect, if the shape has transformed, should use the latest gdRecord
|
|
24
24
|
* @returns {IShapeRect} The text rectangle within the shape
|
|
25
25
|
*/
|
|
26
|
-
getTextRect(rect: IShapeRect, gdRecord: Partial<IGdContext
|
|
26
|
+
getTextRect(rect: IShapeRect, gdRecord: Partial<IGdContext>, shapeData?: IShapeData): IShapeRect;
|
|
27
|
+
private _hasExplicitTextRectPadding;
|
|
28
|
+
private _getPaddedWholeRect;
|
|
29
|
+
private _getTextRectPadding;
|
|
27
30
|
/**
|
|
28
31
|
* 计算所有可填充路径(fill !== 'none')的实际包围盒。
|
|
29
32
|
*
|
|
@@ -30,6 +30,55 @@ export declare enum ShapeDirectionEnum {
|
|
|
30
30
|
Left = 180,
|
|
31
31
|
Up = 270
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* OOXML ST_PresetShadowVal values used by `<a:prstShdw prst="...">`.
|
|
35
|
+
*
|
|
36
|
+
* The enum member names intentionally keep the OOXML `shdw*` numbering so JSON
|
|
37
|
+
* can map back to OOXML losslessly. Use each member's JSDoc for the human-readable
|
|
38
|
+
* Office preset name.
|
|
39
|
+
*/
|
|
40
|
+
export declare enum ShapePresetShadowValEnum {
|
|
41
|
+
/** OOXML shdw1: Top Left Drop Shadow, a regular outer shadow toward the top-left. */
|
|
42
|
+
Shdw1 = "shdw1",
|
|
43
|
+
/** OOXML shdw2: Top Right Drop Shadow, a regular outer shadow toward the top-right. */
|
|
44
|
+
Shdw2 = "shdw2",
|
|
45
|
+
/** OOXML shdw3: Back Left Perspective Shadow, a perspective shadow behind the shape on the left. */
|
|
46
|
+
Shdw3 = "shdw3",
|
|
47
|
+
/** OOXML shdw4: Back Right Perspective Shadow, a perspective shadow behind the shape on the right. */
|
|
48
|
+
Shdw4 = "shdw4",
|
|
49
|
+
/** OOXML shdw5: Bottom Left Drop Shadow, a regular outer shadow toward the bottom-left. */
|
|
50
|
+
Shdw5 = "shdw5",
|
|
51
|
+
/** OOXML shdw6: Bottom Right Drop Shadow, a regular outer shadow toward the bottom-right. */
|
|
52
|
+
Shdw6 = "shdw6",
|
|
53
|
+
/** OOXML shdw7: Front Left Perspective Shadow, a perspective shadow in front of the shape on the left. */
|
|
54
|
+
Shdw7 = "shdw7",
|
|
55
|
+
/** OOXML shdw8: Front Right Perspective Shadow, a perspective shadow in front of the shape on the right. */
|
|
56
|
+
Shdw8 = "shdw8",
|
|
57
|
+
/** OOXML shdw9: Top Left Small Drop Shadow, a smaller top-left outer shadow. */
|
|
58
|
+
Shdw9 = "shdw9",
|
|
59
|
+
/** OOXML shdw10: Top Left Large Drop Shadow, a larger top-left outer shadow. */
|
|
60
|
+
Shdw10 = "shdw10",
|
|
61
|
+
/** OOXML shdw11: Back Left Long Perspective Shadow, a longer back-left perspective shadow. */
|
|
62
|
+
Shdw11 = "shdw11",
|
|
63
|
+
/** OOXML shdw12: Back Right Long Perspective Shadow, a longer back-right perspective shadow. */
|
|
64
|
+
Shdw12 = "shdw12",
|
|
65
|
+
/** OOXML shdw13: Top Left Double Drop Shadow, a double-layer top-left outer shadow. */
|
|
66
|
+
Shdw13 = "shdw13",
|
|
67
|
+
/** OOXML shdw14: Bottom Right Small Drop Shadow, a smaller bottom-right outer shadow. */
|
|
68
|
+
Shdw14 = "shdw14",
|
|
69
|
+
/** OOXML shdw15: Front Left Long Perspective Shadow, a longer front-left perspective shadow. */
|
|
70
|
+
Shdw15 = "shdw15",
|
|
71
|
+
/** OOXML shdw16: Front Right Long Perspective Shadow, a longer front-right perspective shadow. */
|
|
72
|
+
Shdw16 = "shdw16",
|
|
73
|
+
/** OOXML shdw17: 3D Outer Box Shadow, a 3D-style shadow outside the shape box. */
|
|
74
|
+
Shdw17 = "shdw17",
|
|
75
|
+
/** OOXML shdw18: 3D Inner Box Shadow, a 3D-style shadow inside the shape box. */
|
|
76
|
+
Shdw18 = "shdw18",
|
|
77
|
+
/** OOXML shdw19: Back Center Perspective Shadow, a centered perspective shadow behind the shape. */
|
|
78
|
+
Shdw19 = "shdw19",
|
|
79
|
+
/** OOXML shdw20: Front Bottom Shadow, a front-facing shadow below the shape. */
|
|
80
|
+
Shdw20 = "shdw20"
|
|
81
|
+
}
|
|
33
82
|
/**
|
|
34
83
|
* Shape fill type enum
|
|
35
84
|
* Currently, PatternFill and PictureFill are not supported, but we define them for future use, if will be treat as Nofill currently.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BasicShapeEnum, ImageFillModeEnum, ImageSourceTypeEnum, ShapeArrowSizeEnum, ShapeArrowTypeEnum, ShapeFillEnum, ShapeGradientTypeEnum, ShapeLineCapEnum, ShapeLineDashEnum, ShapeLineJoinEnum, ShapeLineTypeEnum, ShapeOperatorEnum, ShapeRenderModeEnum, ShapeSketchTypeEnum, ShapeTypeEnum } from './shape-enum';
|
|
1
|
+
import type { BasicShapeEnum, ImageFillModeEnum, ImageSourceTypeEnum, ShapeArrowSizeEnum, ShapeArrowTypeEnum, ShapeFillEnum, ShapeGradientTypeEnum, ShapeLineCapEnum, ShapeLineDashEnum, ShapeLineJoinEnum, ShapeLineTypeEnum, ShapeOperatorEnum, ShapePresetShadowValEnum, ShapeRenderModeEnum, ShapeSketchTypeEnum, ShapeTypeEnum } from './shape-enum';
|
|
2
2
|
/**
|
|
3
3
|
* GdContext 用来计算 OOXML Shape 的 Geometry Definitions (gd)
|
|
4
4
|
* 包含:
|
|
@@ -104,6 +104,7 @@ export interface IGdContextBase {
|
|
|
104
104
|
lsd32: number;
|
|
105
105
|
}
|
|
106
106
|
export interface IGdContext extends IGdContextBase {
|
|
107
|
+
[key: string]: number | undefined;
|
|
107
108
|
x0?: number;
|
|
108
109
|
x1?: number;
|
|
109
110
|
x2?: number;
|
|
@@ -550,8 +551,16 @@ export interface IShapePath {
|
|
|
550
551
|
/** Parsed path data array (alternative to data string) */
|
|
551
552
|
dataArray?: IPathCommand[];
|
|
552
553
|
}
|
|
554
|
+
export type ShapeTextDirection = 'horz' | 'vert' | 'vert270' | 'wordArtVert' | 'eaVert' | 'mongolianVert' | 'wordArtVertRtl';
|
|
553
555
|
export interface IShapeTextAlign {
|
|
554
556
|
isHorizontal: boolean;
|
|
557
|
+
textDirection?: ShapeTextDirection;
|
|
558
|
+
}
|
|
559
|
+
export interface IShapeTextRectPadding {
|
|
560
|
+
left: number;
|
|
561
|
+
top: number;
|
|
562
|
+
right: number;
|
|
563
|
+
bottom: number;
|
|
555
564
|
}
|
|
556
565
|
export interface IShapeText extends IShapeTextAlign {
|
|
557
566
|
isRichText: false;
|
|
@@ -566,11 +575,36 @@ export interface IShapeText extends IShapeTextAlign {
|
|
|
566
575
|
export interface ICustomShapeTextData extends IShapeTextAlign {
|
|
567
576
|
dataModel?: unknown;
|
|
568
577
|
}
|
|
578
|
+
/**
|
|
579
|
+
* A shape outer-shadow effect. Distances and blur radius use slide drawing
|
|
580
|
+
* units; direction is in degrees where 0 points right and 90 points down.
|
|
581
|
+
*/
|
|
582
|
+
export interface IShapeShadowEffect {
|
|
583
|
+
/** Shadow color as a CSS color string. */
|
|
584
|
+
color: string;
|
|
585
|
+
/** OOXML preset shadow value, when the shadow originated from `<a:prstShdw>`. */
|
|
586
|
+
preset?: ShapePresetShadowValEnum;
|
|
587
|
+
/** Shadow opacity, from 0 (transparent) to 1 (opaque). */
|
|
588
|
+
opacity?: number;
|
|
589
|
+
/** Blur radius in slide drawing units. */
|
|
590
|
+
blurRadius?: number;
|
|
591
|
+
/** Direction angle in degrees, with 0 pointing right and 90 pointing down. */
|
|
592
|
+
direction?: number;
|
|
593
|
+
/** Offset distance from the shape in slide drawing units. */
|
|
594
|
+
distance?: number;
|
|
595
|
+
/** Horizontal shadow scale factor; 1 means 100%. */
|
|
596
|
+
sx?: number;
|
|
597
|
+
/** Vertical shadow scale factor; 1 means 100%. */
|
|
598
|
+
sy?: number;
|
|
599
|
+
/** Whether the shadow rotates together with the shape. */
|
|
600
|
+
rotateWithShape?: boolean;
|
|
601
|
+
}
|
|
569
602
|
/**
|
|
570
603
|
* This interface defines the shape data structure , and this part will save in json
|
|
571
604
|
*/
|
|
572
605
|
export interface IBasicShapeData {
|
|
573
606
|
shapeType?: ShapeTypeEnum;
|
|
607
|
+
isTextBox?: boolean;
|
|
574
608
|
fill?: {
|
|
575
609
|
color?: string;
|
|
576
610
|
fillType?: ShapeFillEnum;
|
|
@@ -580,6 +614,7 @@ export interface IBasicShapeData {
|
|
|
580
614
|
gradientStops?: Array<{
|
|
581
615
|
position: number;
|
|
582
616
|
color: string;
|
|
617
|
+
opacity?: number;
|
|
583
618
|
}>;
|
|
584
619
|
/**
|
|
585
620
|
* Image fill source, can be a URL or base64 data URI. When fillType is 'image', this specifies the image to use for filling the shape.
|
|
@@ -630,7 +665,16 @@ export interface IBasicShapeData {
|
|
|
630
665
|
};
|
|
631
666
|
stroke?: IShapeLineStyle;
|
|
632
667
|
adjustValues?: Record<string, number>;
|
|
668
|
+
isCustom?: boolean;
|
|
669
|
+
customGeometry?: IPresetShapeConfig;
|
|
670
|
+
/** Basic outer shadow effect applied while rendering the shape path. */
|
|
671
|
+
outerShadow?: IShapeShadowEffect;
|
|
633
672
|
shapeText?: IShapeText | ICustomShapeTextData;
|
|
673
|
+
/**
|
|
674
|
+
* Text box inset used to calculate the editable/rendered text rect.
|
|
675
|
+
* Values use the same drawing units as the shape rect.
|
|
676
|
+
*/
|
|
677
|
+
textRectPadding?: IShapeTextRectPadding;
|
|
634
678
|
}
|
|
635
679
|
export interface ICxnShapeData extends IBasicShapeData {
|
|
636
680
|
points?: Array<{
|
|
@@ -656,6 +700,7 @@ export interface IGroupShapeData {
|
|
|
656
700
|
export type IShapeData = IBasicShapeData | ICxnShapeData;
|
|
657
701
|
export interface IShapeJSONData {
|
|
658
702
|
id: string;
|
|
703
|
+
name?: string;
|
|
659
704
|
shapeData: IShapeData;
|
|
660
705
|
shapeType: ShapeTypeEnum;
|
|
661
706
|
}
|
|
@@ -812,6 +857,7 @@ export interface IShapeLineStyle {
|
|
|
812
857
|
color?: string;
|
|
813
858
|
width?: number;
|
|
814
859
|
opacity?: number;
|
|
860
|
+
cornerRadius?: number;
|
|
815
861
|
dashType?: ShapeLineDashEnum;
|
|
816
862
|
capType?: ShapeLineCapEnum;
|
|
817
863
|
lineJoinType?: ShapeLineJoinEnum;
|
|
@@ -824,6 +870,8 @@ export interface IShapeLineStyle {
|
|
|
824
870
|
export interface IShapeModel {
|
|
825
871
|
getBasicShapeType(): BasicShapeEnum;
|
|
826
872
|
getId(): string;
|
|
873
|
+
getName(): string | undefined;
|
|
874
|
+
setName(name?: string): void;
|
|
827
875
|
dispose(): void;
|
|
828
876
|
getShapeData(): IShapeData;
|
|
829
877
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createUniqueShapeName(shapeType: string, usedNames: Iterable<string | undefined | null>): string;
|