@univerjs-pro/engine-shape 0.15.3-insiders.20260131-cbd5fac
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/README.md +232 -0
- package/lib/cjs/index.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/index.js +1 -0
- package/lib/types/index.d.ts +200 -0
- package/lib/types/model/group-shape-model.d.ts +0 -0
- package/lib/types/model/shape-model.d.ts +107 -0
- package/lib/types/perset-shape-config.d.ts +2 -0
- package/lib/types/render-engine/base-shape-context.d.ts +9 -0
- package/lib/types/render-engine/bent-connector-router-util.d.ts +48 -0
- package/lib/types/render-engine/connector-points-util.d.ts +44 -0
- package/lib/types/render-engine/line-shape-render-model.d.ts +135 -0
- package/lib/types/render-engine/point-to-shape-transform.d.ts +13 -0
- package/lib/types/render-engine/shape-context-operator.d.ts +19 -0
- package/lib/types/render-engine/shape-render-model.d.ts +96 -0
- package/lib/types/shape-default.d.ts +27 -0
- package/lib/types/shape-enum.d.ts +314 -0
- package/lib/types/shape-type.d.ts +836 -0
- package/lib/types/shapes/accent-border-callout1-shape.d.ts +6 -0
- package/lib/types/shapes/accent-border-callout2-shape.d.ts +6 -0
- package/lib/types/shapes/accent-border-callout3-shape.d.ts +6 -0
- package/lib/types/shapes/accent-callout1-shape.d.ts +6 -0
- package/lib/types/shapes/accent-callout2-shape.d.ts +6 -0
- package/lib/types/shapes/accent-callout3-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-back-previous-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-beginning-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-blank-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-document-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-end-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-forward-next-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-help-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-home-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-information-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-movie-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-return-shape.d.ts +6 -0
- package/lib/types/shapes/action-button-sound-shape.d.ts +6 -0
- package/lib/types/shapes/arc-shape.d.ts +6 -0
- package/lib/types/shapes/bent-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/bent-connector2-shape.d.ts +7 -0
- package/lib/types/shapes/bent-connector3-shape.d.ts +7 -0
- package/lib/types/shapes/bent-connector4-shape.d.ts +7 -0
- package/lib/types/shapes/bent-connector5-shape.d.ts +7 -0
- package/lib/types/shapes/bent-up-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/bevel-shape.d.ts +6 -0
- package/lib/types/shapes/block-arc-shape.d.ts +6 -0
- package/lib/types/shapes/border-callout1-shape.d.ts +6 -0
- package/lib/types/shapes/border-callout2-shape.d.ts +6 -0
- package/lib/types/shapes/border-callout3-shape.d.ts +6 -0
- package/lib/types/shapes/brace-pair-shape.d.ts +6 -0
- package/lib/types/shapes/bracket-pair-shape.d.ts +6 -0
- package/lib/types/shapes/callout1-shape.d.ts +6 -0
- package/lib/types/shapes/callout2-shape.d.ts +6 -0
- package/lib/types/shapes/callout3-shape.d.ts +6 -0
- package/lib/types/shapes/can-shape.d.ts +6 -0
- package/lib/types/shapes/chart-plus-shape.d.ts +6 -0
- package/lib/types/shapes/chart-star-shape.d.ts +6 -0
- package/lib/types/shapes/chart-x-shape.d.ts +6 -0
- package/lib/types/shapes/chevron-shape.d.ts +6 -0
- package/lib/types/shapes/chord-shape.d.ts +6 -0
- package/lib/types/shapes/circle-shape.d.ts +6 -0
- package/lib/types/shapes/circular-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/cloud-callout-shape.d.ts +6 -0
- package/lib/types/shapes/cloud-callout1-shape.d.ts +6 -0
- package/lib/types/shapes/cloud-shape.d.ts +6 -0
- package/lib/types/shapes/corner-shape.d.ts +6 -0
- package/lib/types/shapes/corner-tabs-shape.d.ts +6 -0
- package/lib/types/shapes/cube-shape.d.ts +6 -0
- package/lib/types/shapes/curved-connector2-shape.d.ts +7 -0
- package/lib/types/shapes/curved-connector3-shape.d.ts +7 -0
- package/lib/types/shapes/curved-connector4-shape.d.ts +7 -0
- package/lib/types/shapes/curved-connector5-shape.d.ts +7 -0
- package/lib/types/shapes/curved-down-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/curved-left-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/curved-right-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/curved-up-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/decagon-shape.d.ts +6 -0
- package/lib/types/shapes/diagonal-stripe-shape.d.ts +6 -0
- package/lib/types/shapes/diamond-shape.d.ts +6 -0
- package/lib/types/shapes/dodecagon-shape.d.ts +6 -0
- package/lib/types/shapes/donut-shape.d.ts +6 -0
- package/lib/types/shapes/double-wave-shape.d.ts +6 -0
- package/lib/types/shapes/down-arrow-callout-shape.d.ts +6 -0
- package/lib/types/shapes/down-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/ellipse-ribbon-shape.d.ts +6 -0
- package/lib/types/shapes/ellipse-ribbon2-shape.d.ts +6 -0
- package/lib/types/shapes/ellipse-shape.d.ts +6 -0
- package/lib/types/shapes/flow-chart-offline-storage-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-alternate-process-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-collate-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-connector-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-data-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-decision-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-delay-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-display-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-document-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-extract-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-internal-storage-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-magnetic-disk-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-magnetic-drum-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-magnetic-tape-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-manual-input-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-manual-operation-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-merge-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-multidocument-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-offpage-connector-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-online-storage-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-or-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-predefined-process-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-preparation-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-process-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-punched-card-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-punched-tape-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-sort-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-summing-junction-shape.d.ts +6 -0
- package/lib/types/shapes/flowchart-terminator-shape.d.ts +6 -0
- package/lib/types/shapes/folded-corner-shape.d.ts +6 -0
- package/lib/types/shapes/frame-shape.d.ts +6 -0
- package/lib/types/shapes/frame2-shape.d.ts +6 -0
- package/lib/types/shapes/funnel-shape.d.ts +6 -0
- package/lib/types/shapes/gear6-shape.d.ts +6 -0
- package/lib/types/shapes/gear9-shape.d.ts +6 -0
- package/lib/types/shapes/half-frame-shape.d.ts +6 -0
- package/lib/types/shapes/heart-shape.d.ts +6 -0
- package/lib/types/shapes/heptagon-shape.d.ts +6 -0
- package/lib/types/shapes/hexagon-shape.d.ts +6 -0
- package/lib/types/shapes/home-plate-shape.d.ts +6 -0
- package/lib/types/shapes/horizontal-scroll-shape.d.ts +6 -0
- package/lib/types/shapes/index.d.ts +3 -0
- package/lib/types/shapes/irregular-seal1-shape.d.ts +6 -0
- package/lib/types/shapes/irregular-seal2-shape.d.ts +6 -0
- package/lib/types/shapes/left-arrow-callout-shape.d.ts +6 -0
- package/lib/types/shapes/left-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/left-brace-shape.d.ts +6 -0
- package/lib/types/shapes/left-bracket-shape.d.ts +6 -0
- package/lib/types/shapes/left-circular-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/left-right-arrow-callout-shape.d.ts +6 -0
- package/lib/types/shapes/left-right-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/left-right-circular-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/left-right-ribbon-shape.d.ts +6 -0
- package/lib/types/shapes/left-right-up-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/left-up-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/lightning-bolt-shape.d.ts +6 -0
- package/lib/types/shapes/line-lnv-shape.d.ts +6 -0
- package/lib/types/shapes/line-shape.d.ts +7 -0
- package/lib/types/shapes/math-divide-shape.d.ts +6 -0
- package/lib/types/shapes/math-equal-shape.d.ts +6 -0
- package/lib/types/shapes/math-minus-shape.d.ts +6 -0
- package/lib/types/shapes/math-multiply-shape.d.ts +6 -0
- package/lib/types/shapes/math-not-equal-shape.d.ts +6 -0
- package/lib/types/shapes/math-plus-shape.d.ts +6 -0
- package/lib/types/shapes/moon-shape.d.ts +6 -0
- package/lib/types/shapes/no-smoking-shape.d.ts +6 -0
- package/lib/types/shapes/non-isosceles-trapezoid.d.ts +6 -0
- package/lib/types/shapes/notched-right-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/octagon-shape.d.ts +6 -0
- package/lib/types/shapes/oval-callout1-shape.d.ts +6 -0
- package/lib/types/shapes/parallelogram-shape.d.ts +6 -0
- package/lib/types/shapes/pentagon-shape.d.ts +6 -0
- package/lib/types/shapes/pie-shape.d.ts +6 -0
- package/lib/types/shapes/pie-wedge-shape.d.ts +6 -0
- package/lib/types/shapes/plaque-shape.d.ts +6 -0
- package/lib/types/shapes/plaque-tabs-shape.d.ts +6 -0
- package/lib/types/shapes/plus-shape.d.ts +6 -0
- package/lib/types/shapes/quad-arrow-callout-shape.d.ts +6 -0
- package/lib/types/shapes/quad-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/rectangle-callout1-shape.d.ts +6 -0
- package/lib/types/shapes/rectangle-shape.d.ts +6 -0
- package/lib/types/shapes/ribbon-shape.d.ts +6 -0
- package/lib/types/shapes/ribbon2-shape.d.ts +6 -0
- package/lib/types/shapes/right-arrow-callout-shape.d.ts +6 -0
- package/lib/types/shapes/right-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/right-brace-shape.d.ts +6 -0
- package/lib/types/shapes/right-bracket-shape.d.ts +6 -0
- package/lib/types/shapes/right-triangle-shape.d.ts +6 -0
- package/lib/types/shapes/round-rectangle-shape.d.ts +6 -0
- package/lib/types/shapes/round-rectangle1-shape.d.ts +6 -0
- package/lib/types/shapes/round-rectangle2-diagonal-shape.d.ts +6 -0
- package/lib/types/shapes/round-rectangle2-shape.d.ts +6 -0
- package/lib/types/shapes/rounded-rectangular-callout1-shape.d.ts +6 -0
- package/lib/types/shapes/smiley-face-shape.d.ts +6 -0
- package/lib/types/shapes/snip-rectangle1-shape.d.ts +6 -0
- package/lib/types/shapes/snip-rectangle2-diagonal-shape.d.ts +6 -0
- package/lib/types/shapes/snip-rectangle2-same-shape.d.ts +6 -0
- package/lib/types/shapes/snip-round-rectangle1-shape.d.ts +6 -0
- package/lib/types/shapes/square-tabs-shape.d.ts +6 -0
- package/lib/types/shapes/star10-shape.d.ts +6 -0
- package/lib/types/shapes/star12-shape.d.ts +6 -0
- package/lib/types/shapes/star16-shape.d.ts +6 -0
- package/lib/types/shapes/star24-shape.d.ts +6 -0
- package/lib/types/shapes/star32-shape.d.ts +6 -0
- package/lib/types/shapes/star4-shape.d.ts +6 -0
- package/lib/types/shapes/star5-shape.d.ts +6 -0
- package/lib/types/shapes/star6-shape.d.ts +6 -0
- package/lib/types/shapes/star7-shape.d.ts +6 -0
- package/lib/types/shapes/star8-shape.d.ts +6 -0
- package/lib/types/shapes/straight-connector1-shape.d.ts +7 -0
- package/lib/types/shapes/striped-right-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/sun-shape.d.ts +6 -0
- package/lib/types/shapes/swoosh-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/teardrop-shape.d.ts +6 -0
- package/lib/types/shapes/text-box-shape.d.ts +6 -0
- package/lib/types/shapes/trapezoid-shape.d.ts +6 -0
- package/lib/types/shapes/triangle-shape.d.ts +6 -0
- package/lib/types/shapes/up-arrow-callout-shape.d.ts +6 -0
- package/lib/types/shapes/up-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/up-down-arrow-callout-shape.d.ts +6 -0
- package/lib/types/shapes/up-down-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/uturn-arrow-shape.d.ts +6 -0
- package/lib/types/shapes/vertical-scroll-shape.d.ts +6 -0
- package/lib/types/shapes/wave-shape.d.ts +6 -0
- package/lib/types/shapes/wedge-ellipse-callout-shape.d.ts +6 -0
- package/lib/types/shapes/wedge-rect-callout-shape.d.ts +6 -0
- package/lib/types/shapes/wedge-round-rect-callout-shape.d.ts +6 -0
- package/lib/types/util/color-util.d.ts +12 -0
- package/lib/types/util/connector-points-util.d.ts +56 -0
- package/lib/types/util/connector-transform.d.ts +119 -0
- package/lib/types/util/shape-util.d.ts +8 -0
- package/lib/umd/index.js +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { IGdContext, IGdContextKey, IPresetShapeConfig, IShapeData, IShapeGdContextKeyPoint, IShapeHitTestResult, IShapeRect, IShapeRenderParameters } from '../shape-type';
|
|
2
|
+
import { BaseShapeContext } from './base-shape-context';
|
|
3
|
+
export declare abstract class BaseShapeRenderModel {
|
|
4
|
+
protected _isLineShape: boolean;
|
|
5
|
+
abstract readonly name: string;
|
|
6
|
+
abstract readonly presetShapeConfig: IPresetShapeConfig;
|
|
7
|
+
private _inverseCache;
|
|
8
|
+
isLineShape(): boolean;
|
|
9
|
+
getConnectorLinePoints(): IShapeGdContextKeyPoint[];
|
|
10
|
+
/**
|
|
11
|
+
* This method tests whether a point (pointX, pointY) hits any interactive parts of the shape,
|
|
12
|
+
* such as connection points or adjustment handles.
|
|
13
|
+
* The point coordinates are in the shape's local coordinate system.
|
|
14
|
+
* @param {number} pointX The x-coordinate of the point to test.
|
|
15
|
+
* @param {number} pointY The y-coordinate of the point to test.
|
|
16
|
+
* @param {BaseShapeContext} shapeContext
|
|
17
|
+
* @returns {IShapeHitTestResult} The result of the hit test.
|
|
18
|
+
*/
|
|
19
|
+
hitTest(pointX: number, pointY: number, shapeContext: BaseShapeContext): IShapeHitTestResult;
|
|
20
|
+
/**
|
|
21
|
+
* Get the text rectangle within the shape
|
|
22
|
+
* @param rect current drawing object rect
|
|
23
|
+
* @param gdRecord The current gdRecord used to calculate text rect, if the shape has transformed, should use the latest gdRecord
|
|
24
|
+
* @returns {IShapeRect} The text rectangle within the shape
|
|
25
|
+
*/
|
|
26
|
+
getTextRect(rect: IShapeRect, gdRecord: Partial<IGdContext>): IShapeRect;
|
|
27
|
+
/**
|
|
28
|
+
* 使用 Canvas API 渲染形状
|
|
29
|
+
*/
|
|
30
|
+
render(canvasContext: CanvasRenderingContext2D, rect: IShapeRect, shapeContext: BaseShapeContext, shapeData: IShapeData, renderOption: IShapeRenderParameters): void;
|
|
31
|
+
private _getDashType;
|
|
32
|
+
private _getCapType;
|
|
33
|
+
private _getJoinType;
|
|
34
|
+
private _getStrokeWidth;
|
|
35
|
+
/**
|
|
36
|
+
* Create a gradient based on the shape's fill configuration
|
|
37
|
+
* @param canvasContext The canvas rendering context
|
|
38
|
+
* @param rect The shape rectangle (note: we're already translated to rect.left, rect.top)
|
|
39
|
+
* @param shapeData The shape data containing gradient configuration
|
|
40
|
+
* @returns CanvasGradient or null if gradient cannot be created
|
|
41
|
+
*/
|
|
42
|
+
private _createGradient;
|
|
43
|
+
/**
|
|
44
|
+
* Create a linear gradient
|
|
45
|
+
*/
|
|
46
|
+
private _createLinearGradient;
|
|
47
|
+
/**
|
|
48
|
+
* Create a radial gradient (center to edges)
|
|
49
|
+
*/
|
|
50
|
+
private _createRadialGradient;
|
|
51
|
+
/**
|
|
52
|
+
* Create an angular (conic) gradient
|
|
53
|
+
* Since Canvas 2D doesn't have native conic gradient, we create a radial approximation
|
|
54
|
+
* or use createConicGradient if available (modern browsers)
|
|
55
|
+
*/
|
|
56
|
+
private _createAngularGradient;
|
|
57
|
+
/**
|
|
58
|
+
* Create a diamond gradient
|
|
59
|
+
* This is approximated using a radial gradient with adjusted parameters
|
|
60
|
+
*/
|
|
61
|
+
private _createDiamondGradient;
|
|
62
|
+
/**
|
|
63
|
+
* Add color stops to a gradient
|
|
64
|
+
*/
|
|
65
|
+
private _addGradientStops;
|
|
66
|
+
private _getFillStyle;
|
|
67
|
+
private _getStrokeStyle;
|
|
68
|
+
private _renderTextBox;
|
|
69
|
+
private _renderCxnPoints;
|
|
70
|
+
private _getValueFromGdRecord;
|
|
71
|
+
/**
|
|
72
|
+
* Check if the adjust handle at the given index has an inverse relationship.
|
|
73
|
+
* Uses cache to avoid recalculating.
|
|
74
|
+
* @param index The index of the adjust handle in ahLst
|
|
75
|
+
* @returns true if inverse relationship exists
|
|
76
|
+
*/
|
|
77
|
+
isInverse(index: number): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Detect if there's an inverse relationship between adj value and position.
|
|
80
|
+
* Analyzes the gd formula chain to find subtract patterns like "r - adj*k" or "b - adj*k".
|
|
81
|
+
* @param adjustInfo The adjust handle info
|
|
82
|
+
* @returns true if inverse relationship is detected
|
|
83
|
+
*/
|
|
84
|
+
private _detectInverseRelationship;
|
|
85
|
+
/**
|
|
86
|
+
* Recursively analyze gd formula to detect inverse relationship.
|
|
87
|
+
* Looking for patterns like: pos = r - f(adj) or pos = b - f(adj)
|
|
88
|
+
*/
|
|
89
|
+
private _analyzeFormulaForInverse;
|
|
90
|
+
/**
|
|
91
|
+
* Check if a gd variable depends on (is derived from) adjName
|
|
92
|
+
*/
|
|
93
|
+
private _dependsOnAdj;
|
|
94
|
+
getGdValue(key: number | IGdContextKey, gdRecord: Partial<IGdContext>): number;
|
|
95
|
+
private _renderAdjustHandles;
|
|
96
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ShapeLineCapEnum, ShapeLineDashEnum, ShapeLineJoinEnum } from './shape-enum';
|
|
2
|
+
export declare const ShapeDefaultConfig: {
|
|
3
|
+
fill: string;
|
|
4
|
+
stroke: string;
|
|
5
|
+
strokeWidth: number;
|
|
6
|
+
cxnPointRadius: number;
|
|
7
|
+
cxnPointFill: string;
|
|
8
|
+
cxnPointStroke: string;
|
|
9
|
+
cxnPointStrokeWidth: number;
|
|
10
|
+
adjHandleSize: number;
|
|
11
|
+
adjHandleFill: string;
|
|
12
|
+
adjHandleStroke: string;
|
|
13
|
+
adjHandleStrokeWidth: number;
|
|
14
|
+
lineDashType: ShapeLineDashEnum;
|
|
15
|
+
lineCapType: ShapeLineCapEnum;
|
|
16
|
+
lineJoinType: ShapeLineJoinEnum;
|
|
17
|
+
shapeText: {
|
|
18
|
+
padding: number;
|
|
19
|
+
fontSize: number;
|
|
20
|
+
fontFamily: string;
|
|
21
|
+
color: string;
|
|
22
|
+
isRichText: boolean;
|
|
23
|
+
bold: boolean;
|
|
24
|
+
italic: boolean;
|
|
25
|
+
underline: boolean;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Basic shape types
|
|
3
|
+
*/
|
|
4
|
+
export declare enum BasicShapeEnum {
|
|
5
|
+
/**
|
|
6
|
+
* Basic Shape
|
|
7
|
+
*/
|
|
8
|
+
BasicShape = 1,
|
|
9
|
+
/**
|
|
10
|
+
* Connect Shape, such as straight connector, bent connector, curved connector
|
|
11
|
+
*/
|
|
12
|
+
ConnectShape = 2,
|
|
13
|
+
/**
|
|
14
|
+
* Group Shape
|
|
15
|
+
*/
|
|
16
|
+
GroupShape = 3
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Shape render mode enum
|
|
20
|
+
* For example, Path, Connection Point, Adjustment Point
|
|
21
|
+
*/
|
|
22
|
+
export declare enum ShapeRenderModeEnum {
|
|
23
|
+
Path = 2,
|
|
24
|
+
Cxn = 4,
|
|
25
|
+
Adj = 8
|
|
26
|
+
}
|
|
27
|
+
export declare enum ShapeDirectionEnum {
|
|
28
|
+
Right = 0,
|
|
29
|
+
Down = 90,
|
|
30
|
+
Left = 180,
|
|
31
|
+
Up = 270
|
|
32
|
+
}
|
|
33
|
+
export declare enum ShapeFillEnum {
|
|
34
|
+
NoFill = 1,
|
|
35
|
+
SolidFil = 2,
|
|
36
|
+
GradientFill = 3,
|
|
37
|
+
PatternFill = 4,
|
|
38
|
+
PictureFill = 5
|
|
39
|
+
}
|
|
40
|
+
export declare enum ShapeGradientTypeEnum {
|
|
41
|
+
Linear = 1,
|
|
42
|
+
Radial = 2,
|
|
43
|
+
Angular = 3,
|
|
44
|
+
Diamond = 4
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Shape line type enum
|
|
48
|
+
* This enum is used to define the line fill type (no line, solid, gradient)
|
|
49
|
+
*/
|
|
50
|
+
export declare enum ShapeLineTypeEnum {
|
|
51
|
+
NoLine = 1,
|
|
52
|
+
SolidLine = 2,
|
|
53
|
+
GradientLine = 3
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Shape operator enum, it used to define the shape geometry
|
|
57
|
+
*/
|
|
58
|
+
export declare enum ShapeOperatorEnum {
|
|
59
|
+
Val = "val",
|
|
60
|
+
Pin = "pin",
|
|
61
|
+
AddSub = "addSub",
|
|
62
|
+
MulDiv = "mulDiv",
|
|
63
|
+
AddDiv = "addDiv",
|
|
64
|
+
Abs = "abs",
|
|
65
|
+
Max = "max",
|
|
66
|
+
Min = "min",
|
|
67
|
+
IfElse = "ifelse",
|
|
68
|
+
Sin = "sin",
|
|
69
|
+
Cos = "cos",
|
|
70
|
+
Tan = "tan",
|
|
71
|
+
Atan2 = "at2",
|
|
72
|
+
Mod = "mod",
|
|
73
|
+
Sqrt = "sqrt",
|
|
74
|
+
Cat2 = "cat2",
|
|
75
|
+
Sat2 = "sat2"
|
|
76
|
+
}
|
|
77
|
+
export declare enum ShapeTypeEnum {
|
|
78
|
+
None = "none",
|
|
79
|
+
Rect = "rect",
|
|
80
|
+
RoundRect = "roundRect",
|
|
81
|
+
Ellipse = "ellipse",
|
|
82
|
+
Diamond = "diamond",
|
|
83
|
+
Triangle = "triangle",
|
|
84
|
+
RightTriangle = "rtTriangle",
|
|
85
|
+
Parallelogram = "parallelogram",
|
|
86
|
+
Trapezoid = "trapezoid",
|
|
87
|
+
Hexagon = "hexagon",// 这个跟Heptagon 不一样的点在于调节点
|
|
88
|
+
Octagon = "octagon",
|
|
89
|
+
Plus = "plus",
|
|
90
|
+
Star5 = "star5",
|
|
91
|
+
Star6 = "star6",
|
|
92
|
+
Star7 = "star7",
|
|
93
|
+
Star8 = "star8",
|
|
94
|
+
Star10 = "star10",
|
|
95
|
+
Star12 = "star12",
|
|
96
|
+
Star16 = "star16",
|
|
97
|
+
Star24 = "star24",
|
|
98
|
+
Star32 = "star32",
|
|
99
|
+
Round1Rect = "round1Rect",
|
|
100
|
+
Round2SameRect = "round2SameRect",
|
|
101
|
+
Round2DiagRect = "round2DiagRect",
|
|
102
|
+
Snip1Rect = "snip1Rect",
|
|
103
|
+
SnipRoundRect = "snipRoundRect",
|
|
104
|
+
Snip2SameRect = "snip2SameRect",
|
|
105
|
+
Snip2DiagRect = "snip2DiagRect",
|
|
106
|
+
Plaque = "plaque",
|
|
107
|
+
Frame = "frame",
|
|
108
|
+
HalfFrame = "halfFrame",
|
|
109
|
+
Corner = "corner",
|
|
110
|
+
DiagStripe = "diagStripe",
|
|
111
|
+
Chord = "chord",
|
|
112
|
+
Arc = "arc",
|
|
113
|
+
LeftCircularArrow = "leftCircularArrow",
|
|
114
|
+
LeftRightCircularArrow = "leftRightCircularArrow",
|
|
115
|
+
SwooshArrow = "swooshArrow",
|
|
116
|
+
LeftRightRibbon = "leftRightRibbon",
|
|
117
|
+
TextBox = "textBox",
|
|
118
|
+
Circle = "circle",// 特例 圆形其实是椭圆的一种,只不过限定了长宽相等 excel没有circle这个形状,只有ellipse
|
|
119
|
+
Heptagon = "heptagon",
|
|
120
|
+
HomePlate = "homePlate",
|
|
121
|
+
RightArrow = "rightArrow",
|
|
122
|
+
LeftArrow = "leftArrow",
|
|
123
|
+
UpArrow = "upArrow",
|
|
124
|
+
DownArrow = "downArrow",
|
|
125
|
+
LeftRightArrow = "leftRightArrow",
|
|
126
|
+
UpDownArrow = "upDownArrow",
|
|
127
|
+
QuadArrow = "quadArrow",
|
|
128
|
+
LeftRightUpArrow = "leftRightUpArrow",
|
|
129
|
+
BentArrow = "bentArrow",
|
|
130
|
+
UturnArrow = "uturnArrow",
|
|
131
|
+
LeftUpArrow = "leftUpArrow",
|
|
132
|
+
BentUpArrow = "bentUpArrow",
|
|
133
|
+
CurvedRightArrow = "curvedRightArrow",
|
|
134
|
+
CurvedLeftArrow = "curvedLeftArrow",
|
|
135
|
+
CurvedUpArrow = "curvedUpArrow",
|
|
136
|
+
CurvedDownArrow = "curvedDownArrow",
|
|
137
|
+
StripedRightArrow = "stripedRightArrow",
|
|
138
|
+
NotchedRightArrow = "notchedRightArrow",
|
|
139
|
+
Pentagon = "pentagon",
|
|
140
|
+
Chevron = "chevron",
|
|
141
|
+
RightArrowCallout = "rightArrowCallout",
|
|
142
|
+
DownArrowCallout = "downArrowCallout",
|
|
143
|
+
LeftArrowCallout = "leftArrowCallout",
|
|
144
|
+
UpArrowCallout = "upArrowCallout",
|
|
145
|
+
LeftRightArrowCallout = "leftRightArrowCallout",
|
|
146
|
+
QuadArrowCallout = "quadArrowCallout",
|
|
147
|
+
CircularArrow = "circularArrow",
|
|
148
|
+
MathPlus = "mathPlus",
|
|
149
|
+
MathMinus = "mathMinus",
|
|
150
|
+
MathMultiply = "mathMultiply",
|
|
151
|
+
MathDivide = "mathDivide",
|
|
152
|
+
MathEqual = "mathEqual",
|
|
153
|
+
MathNotEqual = "mathNotEqual",
|
|
154
|
+
FlowchartProcess = "flowChartProcess",
|
|
155
|
+
FlowchartAlternateProcess = "flowChartAlternateProcess",
|
|
156
|
+
FlowchartDecision = "flowChartDecision",
|
|
157
|
+
FlowChartInputOutput = "flowChartInputOutput",
|
|
158
|
+
FlowchartPredefinedProcess = "flowChartPredefinedProcess",
|
|
159
|
+
FlowchartInternalStorage = "flowChartInternalStorage",
|
|
160
|
+
FlowchartDocument = "flowChartDocument",
|
|
161
|
+
FlowchartMultiDocument = "flowChartMultidocument",
|
|
162
|
+
FlowchartTerminator = "flowChartTerminator",
|
|
163
|
+
FlowchartPreparation = "flowChartPreparation",
|
|
164
|
+
FlowchartManualInput = "flowChartManualInput",
|
|
165
|
+
FlowchartManualOperation = "flowChartManualOperation",
|
|
166
|
+
FlowchartConnector = "flowChartConnector",
|
|
167
|
+
FlowchartOffPageConnector = "flowChartOffpageConnector",
|
|
168
|
+
FlowchartPunchedCard = "flowChartPunchedCard",
|
|
169
|
+
FlowchartPunchedTape = "flowChartPunchedTape",
|
|
170
|
+
FlowchartSummingJunction = "flowChartSummingJunction",
|
|
171
|
+
FlowchartOr = "flowChartOr",
|
|
172
|
+
FlowchartCollate = "flowChartCollate",
|
|
173
|
+
FlowchartSort = "flowChartSort",
|
|
174
|
+
FlowchartExtract = "flowChartExtract",
|
|
175
|
+
FlowchartMerge = "flowChartMerge",
|
|
176
|
+
FlowchartOnlineStorage = "flowChartOnlineStorage",
|
|
177
|
+
FlowchartDelay = "flowChartDelay",
|
|
178
|
+
FlowchartMagneticTape = "flowChartMagneticTape",
|
|
179
|
+
FlowchartMagneticDisk = "flowChartMagneticDisk",
|
|
180
|
+
FlowchartMagneticDrum = "flowChartMagneticDrum",
|
|
181
|
+
FlowchartDisplay = "flowChartDisplay",
|
|
182
|
+
WedgeRectCallout = "wedgeRectCallout",
|
|
183
|
+
WedgeRoundRectCallout = "wedgeRoundRectCallout",
|
|
184
|
+
WedgeEllipseCallout = "wedgeEllipseCallout",
|
|
185
|
+
CloudCallout = "cloudCallout",
|
|
186
|
+
BorderCallout1 = "borderCallout1",
|
|
187
|
+
BorderCallout2 = "borderCallout2",
|
|
188
|
+
BorderCallout3 = "borderCallout3",
|
|
189
|
+
AccentCallout1 = "accentCallout1",
|
|
190
|
+
AccentCallout2 = "accentCallout2",
|
|
191
|
+
AccentCallout3 = "accentCallout3",
|
|
192
|
+
Callout1 = "callout1",
|
|
193
|
+
Callout2 = "callout2",
|
|
194
|
+
Callout3 = "callout3",
|
|
195
|
+
AccentBorderCallout1 = "accentBorderCallout1",
|
|
196
|
+
AccentBorderCallout2 = "accentBorderCallout2",
|
|
197
|
+
AccentBorderCallout3 = "accentBorderCallout3",
|
|
198
|
+
Ribbon = "ribbon",
|
|
199
|
+
Ribbon2 = "ribbon2",
|
|
200
|
+
EllipseRibbon = "ellipseRibbon",
|
|
201
|
+
EllipseRibbon2 = "ellipseRibbon2",
|
|
202
|
+
VerticalScroll = "verticalScroll",
|
|
203
|
+
HorizontalScroll = "horizontalScroll",
|
|
204
|
+
Wave = "wave",
|
|
205
|
+
DoubleWave = "doubleWave",
|
|
206
|
+
Cube = "cube",
|
|
207
|
+
Can = "can",
|
|
208
|
+
LightningBolt = "lightningBolt",
|
|
209
|
+
Heart = "heart",
|
|
210
|
+
Sun = "sun",
|
|
211
|
+
Moon = "moon",
|
|
212
|
+
SmileyFace = "smileyFace",
|
|
213
|
+
IrregularSeal1 = "irregularSeal1",
|
|
214
|
+
IrregularSeal2 = "irregularSeal2",
|
|
215
|
+
FoldedCorner = "folderCorner",
|
|
216
|
+
Bevel = "bevel",
|
|
217
|
+
Donut = "donut",
|
|
218
|
+
NoSmoking = "noSmoking",
|
|
219
|
+
BlockArc = "blockArc",
|
|
220
|
+
Teardrop = "teardrop",
|
|
221
|
+
PieWedge = "pieWedge",
|
|
222
|
+
Pie = "pie",
|
|
223
|
+
Funnel = "funnel",
|
|
224
|
+
Gear6 = "gear6",
|
|
225
|
+
Gear9 = "gear9",
|
|
226
|
+
Decagon = "decagon",
|
|
227
|
+
Dodecagon = "dodecagon",
|
|
228
|
+
CornerTabs = "cornerTabs",
|
|
229
|
+
LeftBrace = "leftBrace",
|
|
230
|
+
RightBrace = "rightBrace",
|
|
231
|
+
LeftBracket = "leftBracket",
|
|
232
|
+
RightBracket = "rightBracket",
|
|
233
|
+
ActionButtonBackPrevious = "actionButtonBackPrevious",
|
|
234
|
+
ActionButtonForwardNext = "actionButtonForwardNext",
|
|
235
|
+
ActionButtonBeginning = "actionButtonBeginning",
|
|
236
|
+
ActionButtonEnd = "actionButtonEnd",
|
|
237
|
+
ActionButtonHome = "actionButtonHome",
|
|
238
|
+
ActionButtonInformation = "actionButtonInformation",
|
|
239
|
+
ActionButtonReturn = "actionButtonReturn",
|
|
240
|
+
ActionButtonMovie = "actionButtonMovie",
|
|
241
|
+
ActionButtonDocument = "actionButtonDocument",
|
|
242
|
+
ActionButtonSound = "actionButtonSound",
|
|
243
|
+
ActionButtonHelp = "actionButtonHelp",
|
|
244
|
+
ActionButtonBlank = "actionButtonBlank",
|
|
245
|
+
BracePair = "bracePair",
|
|
246
|
+
BracketPair = "bracketPair",
|
|
247
|
+
ChartPlus = "chartPlus",
|
|
248
|
+
ChartStar = "chartStar",
|
|
249
|
+
ChartX = "chartX",
|
|
250
|
+
Cloud = "cloud",
|
|
251
|
+
FlowChartOfflineStorage = "flowChartOfflineStorage",
|
|
252
|
+
LineInv = "lineInv",
|
|
253
|
+
NonIsoscelesTrapezoid = "nonIsoscelesTrapezoid",
|
|
254
|
+
PlaqueTabs = "plaqueTabs",
|
|
255
|
+
SquareTabs = "squareTabs",
|
|
256
|
+
Star4 = "star4",
|
|
257
|
+
UpDownArrowCallout = "upDownArrowCallout",
|
|
258
|
+
Line = "line",
|
|
259
|
+
StraightConnector1 = "straightConnector1",
|
|
260
|
+
BentConnector2 = "bentConnector2",
|
|
261
|
+
BentConnector3 = "bentConnector3",
|
|
262
|
+
BentConnector4 = "bentConnector4",
|
|
263
|
+
BentConnector5 = "bentConnector5",
|
|
264
|
+
CurvedConnector2 = "curvedConnector2",
|
|
265
|
+
CurvedConnector3 = "curvedConnector3",
|
|
266
|
+
CurvedConnector4 = "curvedConnector4",
|
|
267
|
+
CurvedConnector5 = "curvedConnector5"
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Shape line style enums
|
|
271
|
+
* This enum is used define basic shape stroke style or line shape stroke style
|
|
272
|
+
*/
|
|
273
|
+
export declare enum ShapeLineDashEnum {
|
|
274
|
+
Solid = 1,
|
|
275
|
+
RoundDot = 2,
|
|
276
|
+
SquareDot = 3,
|
|
277
|
+
Dash = 4,
|
|
278
|
+
DashDot = 5,
|
|
279
|
+
LongDash = 6,
|
|
280
|
+
LongDashDot = 7,
|
|
281
|
+
LongDashDotDot = 8
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* The line cap type of shape line style or basic shape line stroke style
|
|
285
|
+
*/
|
|
286
|
+
export declare enum ShapeLineCapEnum {
|
|
287
|
+
Flat = 1,
|
|
288
|
+
Round = 2,
|
|
289
|
+
Square = 3
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* The line join type of shape line style or basic shape line stroke style
|
|
293
|
+
*/
|
|
294
|
+
export declare enum ShapeLineJoinEnum {
|
|
295
|
+
Miter = 1,
|
|
296
|
+
Round = 2,
|
|
297
|
+
Bevel = 3
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* The arrow type of connector line shape
|
|
301
|
+
*/
|
|
302
|
+
export declare enum ShapeArrowTypeEnum {
|
|
303
|
+
None = 0,
|
|
304
|
+
Arrow = 1,
|
|
305
|
+
OpenArrow = 2,
|
|
306
|
+
DiamondArrow = 3,
|
|
307
|
+
StealthArrow = 4,
|
|
308
|
+
OvalArrow = 5
|
|
309
|
+
}
|
|
310
|
+
export declare enum ShapeArrowSizeEnum {
|
|
311
|
+
Small = 1,
|
|
312
|
+
Medium = 2,
|
|
313
|
+
Large = 3
|
|
314
|
+
}
|