@antv/g-lite 1.0.70 → 1.1.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/dist/AbstractRenderer.d.ts +49 -50
- package/dist/Canvas.d.ts +149 -150
- package/dist/camera/Camera.d.ts +279 -280
- package/dist/camera/Landmark.d.ts +23 -24
- package/dist/camera/index.d.ts +3 -4
- package/dist/camera/interfaces.d.ts +194 -195
- package/dist/components/Cullable.d.ts +12 -13
- package/dist/components/Geometry.d.ts +11 -12
- package/dist/components/RBushNode.d.ts +11 -12
- package/dist/components/Renderable.d.ts +27 -28
- package/dist/components/Sortable.d.ts +25 -26
- package/dist/components/Transform.d.ts +31 -32
- package/dist/components/index.d.ts +6 -7
- package/dist/css/CSS.d.ts +87 -88
- package/dist/css/CSSProperty.d.ts +43 -44
- package/dist/css/CSSStyleValuePool.d.ts +19 -20
- package/dist/css/StyleValueRegistry.d.ts +54 -53
- package/dist/css/cssom/CSSColorValue.d.ts +23 -24
- package/dist/css/cssom/CSSGradientValue.d.ts +31 -32
- package/dist/css/cssom/CSSKeywordValue.d.ts +15 -16
- package/dist/css/cssom/CSSMathOperator.d.ts +11 -12
- package/dist/css/cssom/CSSNumericSumValue.d.ts +7 -8
- package/dist/css/cssom/CSSNumericValue.d.ts +28 -29
- package/dist/css/cssom/CSSRGB.d.ts +25 -26
- package/dist/css/cssom/CSSStyleValue.d.ts +45 -46
- package/dist/css/cssom/index.d.ts +16 -17
- package/dist/css/cssom/types.d.ts +38 -39
- package/dist/css/index.d.ts +11 -12
- package/dist/css/interfaces.d.ts +136 -137
- package/dist/css/parser/color.d.ts +22 -23
- package/dist/css/parser/dimension.d.ts +46 -47
- package/dist/css/parser/filter.d.ts +7 -8
- package/dist/css/parser/gradient.d.ts +4 -5
- package/dist/css/parser/index.d.ts +15 -16
- package/dist/css/parser/numeric.d.ts +24 -25
- package/dist/css/parser/path.d.ts +5 -6
- package/dist/css/parser/points.d.ts +23 -24
- package/dist/css/parser/transform-origin.d.ts +8 -9
- package/dist/css/parser/transform.d.ts +15 -16
- package/dist/css/parser/types.d.ts +2 -3
- package/dist/css/properties/CSSPropertyAngle.d.ts +13 -14
- package/dist/css/properties/CSSPropertyClipPath.d.ts +9 -9
- package/dist/css/properties/CSSPropertyColor.d.ts +18 -19
- package/dist/css/properties/CSSPropertyFilter.d.ts +7 -8
- package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts +20 -21
- package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts +16 -17
- package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts +26 -27
- package/dist/css/properties/CSSPropertyLocalPosition.d.ts +13 -14
- package/dist/css/properties/CSSPropertyMarker.d.ts +5 -6
- package/dist/css/properties/CSSPropertyNumber.d.ts +12 -13
- package/dist/css/properties/CSSPropertyOffsetDistance.d.ts +13 -14
- package/dist/css/properties/CSSPropertyOpacity.d.ts +14 -15
- package/dist/css/properties/CSSPropertyPath.d.ts +27 -28
- package/dist/css/properties/CSSPropertyPoints.d.ts +19 -20
- package/dist/css/properties/CSSPropertyShadowBlur.d.ts +4 -5
- package/dist/css/properties/CSSPropertyText.d.ts +7 -8
- package/dist/css/properties/CSSPropertyTextTransform.d.ts +11 -12
- package/dist/css/properties/CSSPropertyTransform.d.ts +42 -43
- package/dist/css/properties/CSSPropertyTransformOrigin.d.ts +13 -14
- package/dist/css/properties/CSSPropertyZIndex.d.ts +11 -12
- package/dist/css/properties/index.d.ts +20 -21
- package/dist/display-objects/Circle.d.ts +20 -21
- package/dist/display-objects/CustomElement.d.ts +24 -25
- package/dist/display-objects/DisplayObject.d.ts +273 -274
- package/dist/display-objects/Ellipse.d.ts +22 -23
- package/dist/display-objects/Group.d.ts +29 -30
- package/dist/display-objects/HTML.d.ts +41 -42
- package/dist/display-objects/Image.d.ts +26 -27
- package/dist/display-objects/Line.d.ts +60 -61
- package/dist/display-objects/Path.d.ts +123 -134
- package/dist/display-objects/Polygon.d.ts +49 -50
- package/dist/display-objects/Polyline.d.ts +48 -49
- package/dist/display-objects/Rect.d.ts +27 -28
- package/dist/display-objects/Text.d.ts +180 -181
- package/dist/display-objects/constants.d.ts +12 -0
- package/dist/display-objects/index.d.ts +13 -14
- package/dist/dom/CustomElementRegistry.d.ts +15 -16
- package/dist/dom/CustomEvent.d.ts +15 -16
- package/dist/dom/Document.d.ts +77 -78
- package/dist/dom/Element.d.ts +206 -208
- package/dist/dom/EventTarget.d.ts +40 -41
- package/dist/dom/FederatedEvent.d.ts +147 -148
- package/dist/dom/FederatedMouseEvent.d.ts +52 -53
- package/dist/dom/FederatedPointerEvent.d.ts +87 -88
- package/dist/dom/FederatedWheelEvent.d.ts +18 -22
- package/dist/dom/MutationEvent.d.ts +15 -16
- package/dist/dom/Node.d.ts +138 -139
- package/dist/dom/index.d.ts +12 -13
- package/dist/dom/interfaces.d.ts +440 -441
- package/dist/global-runtime.d.ts +35 -36
- package/dist/index.d.ts +15 -15
- package/dist/index.esm.js +15091 -14804
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +15168 -14857
- package/dist/index.js.map +1 -0
- package/dist/index.umd.min.js +2 -1
- package/dist/index.umd.min.js.map +1 -0
- package/dist/plugins/CullingPlugin.d.ts +17 -18
- package/dist/plugins/DirtyCheckPlugin.d.ts +8 -9
- package/dist/plugins/EventPlugin.d.ts +26 -27
- package/dist/plugins/FrustumCullingStrategy.d.ts +21 -22
- package/dist/plugins/PrepareRendererPlugin.d.ts +11 -12
- package/dist/services/ContextService.d.ts +28 -29
- package/dist/services/EventService.d.ts +82 -83
- package/dist/services/OffscreenCanvasCreator.d.ts +15 -16
- package/dist/services/RenderingContext.d.ts +26 -27
- package/dist/services/RenderingService.d.ts +112 -113
- package/dist/services/SceneGraphSelector.d.ts +23 -24
- package/dist/services/SceneGraphService.d.ts +127 -128
- package/dist/services/TextService.d.ts +47 -48
- package/dist/services/aabb/CircleUpdater.d.ts +8 -9
- package/dist/services/aabb/EllipseUpdater.d.ts +8 -9
- package/dist/services/aabb/LineUpdater.d.ts +8 -9
- package/dist/services/aabb/PathUpdater.d.ts +8 -9
- package/dist/services/aabb/PolylineUpdater.d.ts +8 -9
- package/dist/services/aabb/RectUpdater.d.ts +8 -9
- package/dist/services/aabb/TextUpdater.d.ts +23 -24
- package/dist/services/aabb/index.d.ts +8 -9
- package/dist/services/aabb/interfaces.d.ts +12 -13
- package/dist/services/index.d.ts +11 -12
- package/dist/services/interfaces.d.ts +48 -49
- package/dist/shapes/AABB.d.ts +33 -34
- package/dist/shapes/Frustum.d.ts +16 -17
- package/dist/shapes/Plane.d.ts +14 -15
- package/dist/shapes/Point.d.ts +11 -12
- package/dist/shapes/Rectangle.d.ts +12 -13
- package/dist/shapes/index.d.ts +5 -6
- package/dist/types.d.ts +327 -328
- package/dist/utils/assert.d.ts +12 -13
- package/dist/utils/canvas.d.ts +6 -7
- package/dist/utils/dom.d.ts +11 -11
- package/dist/utils/error.d.ts +3 -4
- package/dist/utils/event.d.ts +35 -36
- package/dist/utils/gradient.d.ts +106 -107
- package/dist/utils/index.d.ts +15 -15
- package/dist/utils/math.d.ts +36 -40
- package/dist/utils/memoize.d.ts +7 -8
- package/dist/utils/path.d.ts +24 -29
- package/dist/utils/pointer-events.d.ts +2 -3
- package/dist/utils/raf.d.ts +14 -15
- package/dist/utils/string.d.ts +5 -6
- package/dist/utils/tapable/AsyncParallelHook.d.ts +6 -7
- package/dist/utils/tapable/AsyncSeriesWaterfallHook.d.ts +6 -7
- package/dist/utils/tapable/Hook.d.ts +1 -2
- package/dist/utils/tapable/SyncHook.d.ts +6 -7
- package/dist/utils/tapable/SyncWaterfallHook.d.ts +6 -7
- package/dist/utils/tapable/index.d.ts +4 -5
- package/dist/utils/text.d.ts +2 -3
- package/dist/utils/transform-mat4.d.ts +4 -0
- package/package.json +18 -10
- package/dist/AbstractRenderer.d.ts.map +0 -1
- package/dist/Canvas.d.ts.map +0 -1
- package/dist/camera/Camera.d.ts.map +0 -1
- package/dist/camera/Landmark.d.ts.map +0 -1
- package/dist/camera/index.d.ts.map +0 -1
- package/dist/camera/interfaces.d.ts.map +0 -1
- package/dist/components/Cullable.d.ts.map +0 -1
- package/dist/components/Geometry.d.ts.map +0 -1
- package/dist/components/RBushNode.d.ts.map +0 -1
- package/dist/components/Renderable.d.ts.map +0 -1
- package/dist/components/Sortable.d.ts.map +0 -1
- package/dist/components/Transform.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/css/CSS.d.ts.map +0 -1
- package/dist/css/CSSProperty.d.ts.map +0 -1
- package/dist/css/CSSStyleValuePool.d.ts.map +0 -1
- package/dist/css/StyleValueRegistry.d.ts.map +0 -1
- package/dist/css/cssom/CSSColorValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSGradientValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSKeywordValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSMathOperator.d.ts.map +0 -1
- package/dist/css/cssom/CSSNumericSumValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSNumericValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSRGB.d.ts.map +0 -1
- package/dist/css/cssom/CSSStyleValue.d.ts.map +0 -1
- package/dist/css/cssom/index.d.ts.map +0 -1
- package/dist/css/cssom/types.d.ts.map +0 -1
- package/dist/css/index.d.ts.map +0 -1
- package/dist/css/interfaces.d.ts.map +0 -1
- package/dist/css/parser/color.d.ts.map +0 -1
- package/dist/css/parser/dimension.d.ts.map +0 -1
- package/dist/css/parser/filter.d.ts.map +0 -1
- package/dist/css/parser/gradient.d.ts.map +0 -1
- package/dist/css/parser/index.d.ts.map +0 -1
- package/dist/css/parser/numeric.d.ts.map +0 -1
- package/dist/css/parser/path.d.ts.map +0 -1
- package/dist/css/parser/points.d.ts.map +0 -1
- package/dist/css/parser/transform-origin.d.ts.map +0 -1
- package/dist/css/parser/transform.d.ts.map +0 -1
- package/dist/css/parser/types.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyAngle.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyClipPath.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyColor.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyFilter.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyLocalPosition.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyMarker.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyNumber.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyOffsetDistance.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyOpacity.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyPath.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyPoints.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyShadowBlur.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyText.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyTextTransform.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyTransform.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyTransformOrigin.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyZIndex.d.ts.map +0 -1
- package/dist/css/properties/index.d.ts.map +0 -1
- package/dist/display-objects/Circle.d.ts.map +0 -1
- package/dist/display-objects/CustomElement.d.ts.map +0 -1
- package/dist/display-objects/DisplayObject.d.ts.map +0 -1
- package/dist/display-objects/Ellipse.d.ts.map +0 -1
- package/dist/display-objects/Group.d.ts.map +0 -1
- package/dist/display-objects/HTML.d.ts.map +0 -1
- package/dist/display-objects/Image.d.ts.map +0 -1
- package/dist/display-objects/Line.d.ts.map +0 -1
- package/dist/display-objects/Path.d.ts.map +0 -1
- package/dist/display-objects/Polygon.d.ts.map +0 -1
- package/dist/display-objects/Polyline.d.ts.map +0 -1
- package/dist/display-objects/Rect.d.ts.map +0 -1
- package/dist/display-objects/Text.d.ts.map +0 -1
- package/dist/display-objects/index.d.ts.map +0 -1
- package/dist/dom/CustomElementRegistry.d.ts.map +0 -1
- package/dist/dom/CustomEvent.d.ts.map +0 -1
- package/dist/dom/Document.d.ts.map +0 -1
- package/dist/dom/Element.d.ts.map +0 -1
- package/dist/dom/EventTarget.d.ts.map +0 -1
- package/dist/dom/FederatedEvent.d.ts.map +0 -1
- package/dist/dom/FederatedMouseEvent.d.ts.map +0 -1
- package/dist/dom/FederatedPointerEvent.d.ts.map +0 -1
- package/dist/dom/FederatedWheelEvent.d.ts.map +0 -1
- package/dist/dom/MutationEvent.d.ts.map +0 -1
- package/dist/dom/Node.d.ts.map +0 -1
- package/dist/dom/index.d.ts.map +0 -1
- package/dist/dom/interfaces.d.ts.map +0 -1
- package/dist/global-runtime.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.umd.js +0 -22112
- package/dist/plugins/CullingPlugin.d.ts.map +0 -1
- package/dist/plugins/DirtyCheckPlugin.d.ts.map +0 -1
- package/dist/plugins/EventPlugin.d.ts.map +0 -1
- package/dist/plugins/FrustumCullingStrategy.d.ts.map +0 -1
- package/dist/plugins/PrepareRendererPlugin.d.ts.map +0 -1
- package/dist/services/ContextService.d.ts.map +0 -1
- package/dist/services/EventService.d.ts.map +0 -1
- package/dist/services/OffscreenCanvasCreator.d.ts.map +0 -1
- package/dist/services/RenderingContext.d.ts.map +0 -1
- package/dist/services/RenderingService.d.ts.map +0 -1
- package/dist/services/SceneGraphSelector.d.ts.map +0 -1
- package/dist/services/SceneGraphService.d.ts.map +0 -1
- package/dist/services/TextService.d.ts.map +0 -1
- package/dist/services/aabb/CircleUpdater.d.ts.map +0 -1
- package/dist/services/aabb/EllipseUpdater.d.ts.map +0 -1
- package/dist/services/aabb/LineUpdater.d.ts.map +0 -1
- package/dist/services/aabb/PathUpdater.d.ts.map +0 -1
- package/dist/services/aabb/PolylineUpdater.d.ts.map +0 -1
- package/dist/services/aabb/RectUpdater.d.ts.map +0 -1
- package/dist/services/aabb/TextUpdater.d.ts.map +0 -1
- package/dist/services/aabb/index.d.ts.map +0 -1
- package/dist/services/aabb/interfaces.d.ts.map +0 -1
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/interfaces.d.ts.map +0 -1
- package/dist/shapes/AABB.d.ts.map +0 -1
- package/dist/shapes/Frustum.d.ts.map +0 -1
- package/dist/shapes/Plane.d.ts.map +0 -1
- package/dist/shapes/Point.d.ts.map +0 -1
- package/dist/shapes/Rectangle.d.ts.map +0 -1
- package/dist/shapes/index.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/assert.d.ts.map +0 -1
- package/dist/utils/canvas.d.ts.map +0 -1
- package/dist/utils/dom.d.ts.map +0 -1
- package/dist/utils/error.d.ts.map +0 -1
- package/dist/utils/event.d.ts.map +0 -1
- package/dist/utils/gradient.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/math.d.ts.map +0 -1
- package/dist/utils/memoize.d.ts.map +0 -1
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/pointer-events.d.ts.map +0 -1
- package/dist/utils/raf.d.ts.map +0 -1
- package/dist/utils/string.d.ts.map +0 -1
- package/dist/utils/tapable/AsyncParallelHook.d.ts.map +0 -1
- package/dist/utils/tapable/AsyncSeriesWaterfallHook.d.ts.map +0 -1
- package/dist/utils/tapable/Hook.d.ts.map +0 -1
- package/dist/utils/tapable/SyncHook.d.ts.map +0 -1
- package/dist/utils/tapable/SyncWaterfallHook.d.ts.map +0 -1
- package/dist/utils/tapable/index.d.ts.map +0 -1
- package/dist/utils/text.d.ts.map +0 -1
|
@@ -1,49 +1,48 @@
|
|
|
1
|
-
import type { DisplayObjectConfig } from '../dom';
|
|
2
|
-
import { Point } from '../shapes';
|
|
3
|
-
import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
|
|
4
|
-
import type { DisplayObject } from './DisplayObject';
|
|
5
|
-
import { Polygon } from './Polygon';
|
|
6
|
-
export interface PolylineStyleProps extends BaseStyleProps {
|
|
7
|
-
points: [number, number][];
|
|
8
|
-
/**
|
|
9
|
-
* marker will be positioned at the first point
|
|
10
|
-
*/
|
|
11
|
-
markerStart?: DisplayObject;
|
|
12
|
-
/**
|
|
13
|
-
* marker will be positioned at the last point
|
|
14
|
-
*/
|
|
15
|
-
markerEnd?: DisplayObject;
|
|
16
|
-
markerMid?: DisplayObject;
|
|
17
|
-
/**
|
|
18
|
-
* offset relative to original position
|
|
19
|
-
*/
|
|
20
|
-
markerStartOffset?: number;
|
|
21
|
-
/**
|
|
22
|
-
* offset relative to original position
|
|
23
|
-
*/
|
|
24
|
-
markerEndOffset?: number;
|
|
25
|
-
}
|
|
26
|
-
export interface ParsedPolylineStyleProps extends ParsedBaseStyleProps {
|
|
27
|
-
points: {
|
|
28
|
-
points: [number, number][];
|
|
29
|
-
segments: [number, number][];
|
|
30
|
-
totalLength: number;
|
|
31
|
-
};
|
|
32
|
-
markerStart?: DisplayObject;
|
|
33
|
-
markerMid?: DisplayObject;
|
|
34
|
-
markerEnd?: DisplayObject;
|
|
35
|
-
markerStartOffset?: number;
|
|
36
|
-
markerEndOffset?: number;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Polyline inherits the marker-related capabilities of Polygon.
|
|
40
|
-
*/
|
|
41
|
-
export declare class Polyline extends Polygon {
|
|
42
|
-
constructor({ style, ...rest }?: DisplayObjectConfig<PolylineStyleProps>);
|
|
43
|
-
getTotalLength(): number;
|
|
44
|
-
getPointAtLength(distance: number, inWorldSpace?: boolean): Point;
|
|
45
|
-
getPoint(ratio: number, inWorldSpace?: boolean): Point;
|
|
46
|
-
getStartTangent(): number[][];
|
|
47
|
-
getEndTangent(): number[][];
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=Polyline.d.ts.map
|
|
1
|
+
import type { DisplayObjectConfig } from '../dom';
|
|
2
|
+
import { Point } from '../shapes';
|
|
3
|
+
import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
|
|
4
|
+
import type { DisplayObject } from './DisplayObject';
|
|
5
|
+
import { Polygon } from './Polygon';
|
|
6
|
+
export interface PolylineStyleProps extends BaseStyleProps {
|
|
7
|
+
points: [number, number][];
|
|
8
|
+
/**
|
|
9
|
+
* marker will be positioned at the first point
|
|
10
|
+
*/
|
|
11
|
+
markerStart?: DisplayObject | null;
|
|
12
|
+
/**
|
|
13
|
+
* marker will be positioned at the last point
|
|
14
|
+
*/
|
|
15
|
+
markerEnd?: DisplayObject | null;
|
|
16
|
+
markerMid?: DisplayObject | null;
|
|
17
|
+
/**
|
|
18
|
+
* offset relative to original position
|
|
19
|
+
*/
|
|
20
|
+
markerStartOffset?: number;
|
|
21
|
+
/**
|
|
22
|
+
* offset relative to original position
|
|
23
|
+
*/
|
|
24
|
+
markerEndOffset?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface ParsedPolylineStyleProps extends ParsedBaseStyleProps {
|
|
27
|
+
points: {
|
|
28
|
+
points: [number, number][];
|
|
29
|
+
segments: [number, number][];
|
|
30
|
+
totalLength: number;
|
|
31
|
+
};
|
|
32
|
+
markerStart?: DisplayObject | null;
|
|
33
|
+
markerMid?: DisplayObject | null;
|
|
34
|
+
markerEnd?: DisplayObject | null;
|
|
35
|
+
markerStartOffset?: number;
|
|
36
|
+
markerEndOffset?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Polyline inherits the marker-related capabilities of Polygon.
|
|
40
|
+
*/
|
|
41
|
+
export declare class Polyline extends Polygon {
|
|
42
|
+
constructor({ style, ...rest }?: DisplayObjectConfig<PolylineStyleProps>);
|
|
43
|
+
getTotalLength(): number;
|
|
44
|
+
getPointAtLength(distance: number, inWorldSpace?: boolean): Point;
|
|
45
|
+
getPoint(ratio: number, inWorldSpace?: boolean): Point;
|
|
46
|
+
getStartTangent(): number[][];
|
|
47
|
+
getEndTangent(): number[][];
|
|
48
|
+
}
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import type { DisplayObjectConfig } from '../dom';
|
|
2
|
-
import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
|
|
3
|
-
import { DisplayObject } from './DisplayObject';
|
|
4
|
-
export interface RectStyleProps extends BaseStyleProps {
|
|
5
|
-
x?: number | string;
|
|
6
|
-
y?: number | string;
|
|
7
|
-
z?: number;
|
|
8
|
-
width: number | string;
|
|
9
|
-
height: number | string;
|
|
10
|
-
isBillboard?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* top-left, top-right, bottom-right, bottom-left
|
|
13
|
-
*/
|
|
14
|
-
radius?: number | string | number[];
|
|
15
|
-
}
|
|
16
|
-
export interface ParsedRectStyleProps extends ParsedBaseStyleProps {
|
|
17
|
-
x?: number;
|
|
18
|
-
y?: number;
|
|
19
|
-
z?: number;
|
|
20
|
-
width: number;
|
|
21
|
-
height: number;
|
|
22
|
-
isBillboard?: boolean;
|
|
23
|
-
radius?: [number, number, number, number];
|
|
24
|
-
}
|
|
25
|
-
export declare class Rect extends DisplayObject<RectStyleProps, ParsedRectStyleProps> {
|
|
26
|
-
constructor({ style, ...rest }?: DisplayObjectConfig<RectStyleProps>);
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=Rect.d.ts.map
|
|
1
|
+
import type { DisplayObjectConfig } from '../dom';
|
|
2
|
+
import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
|
|
3
|
+
import { DisplayObject } from './DisplayObject';
|
|
4
|
+
export interface RectStyleProps extends BaseStyleProps {
|
|
5
|
+
x?: number | string;
|
|
6
|
+
y?: number | string;
|
|
7
|
+
z?: number;
|
|
8
|
+
width: number | string;
|
|
9
|
+
height: number | string;
|
|
10
|
+
isBillboard?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* top-left, top-right, bottom-right, bottom-left
|
|
13
|
+
*/
|
|
14
|
+
radius?: number | string | number[];
|
|
15
|
+
}
|
|
16
|
+
export interface ParsedRectStyleProps extends ParsedBaseStyleProps {
|
|
17
|
+
x?: number;
|
|
18
|
+
y?: number;
|
|
19
|
+
z?: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
isBillboard?: boolean;
|
|
23
|
+
radius?: [number, number, number, number];
|
|
24
|
+
}
|
|
25
|
+
export declare class Rect extends DisplayObject<RectStyleProps, ParsedRectStyleProps> {
|
|
26
|
+
constructor({ style, ...rest }?: DisplayObjectConfig<RectStyleProps>);
|
|
27
|
+
}
|
|
@@ -1,181 +1,180 @@
|
|
|
1
|
-
import { CSSGlobalKeywords, CSSRGB } from '../css';
|
|
2
|
-
import type { DisplayObjectConfig } from '../dom/interfaces';
|
|
3
|
-
import type { TextMetrics } from '../services';
|
|
4
|
-
import type { BaseStyleProps, ParsedBaseStyleProps, TextDecorationStyle, TextOverflow, TextDecorationLine } from '../types';
|
|
5
|
-
import { DisplayObject } from './DisplayObject';
|
|
6
|
-
import type { Path } from './Path';
|
|
7
|
-
export interface TextStyleProps extends BaseStyleProps {
|
|
8
|
-
x?: number | string;
|
|
9
|
-
y?: number | string;
|
|
10
|
-
z?: number | string;
|
|
11
|
-
/**
|
|
12
|
-
* Always face the camera.
|
|
13
|
-
*/
|
|
14
|
-
isBillboard?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Whether the size of the sprite is attenuated by the camera depth. (Perspective camera only.)
|
|
17
|
-
*/
|
|
18
|
-
sizeAttenuation?: boolean;
|
|
19
|
-
text: number | string;
|
|
20
|
-
/**
|
|
21
|
-
* The text-align property sets the horizontal alignment of the inline-level content.
|
|
22
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-align
|
|
23
|
-
*/
|
|
24
|
-
textAlign?: CSSGlobalKeywords | 'start' | 'center' | 'middle' | 'end' | 'left' | 'right';
|
|
25
|
-
/**
|
|
26
|
-
* It specifies the current text baseline used when drawing text.
|
|
27
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textBaseline
|
|
28
|
-
*/
|
|
29
|
-
textBaseline?: CSSGlobalKeywords | 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';
|
|
30
|
-
/**
|
|
31
|
-
* The text-overflow property sets how hidden overflow content is signaled to users.
|
|
32
|
-
* It can be clipped, display an ellipsis ('…'), or display a custom string.
|
|
33
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow#values
|
|
34
|
-
*/
|
|
35
|
-
textOverflow?: TextOverflow | string;
|
|
36
|
-
/**
|
|
37
|
-
* Borrow from CanvasKit ParagraphStyle.
|
|
38
|
-
*/
|
|
39
|
-
maxLines?: number;
|
|
40
|
-
/**
|
|
41
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/textPath
|
|
42
|
-
*/
|
|
43
|
-
textPath?: Path;
|
|
44
|
-
/**
|
|
45
|
-
* The side attribute determines the side of a path the text is placed on (relative to the path direction).
|
|
46
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/side
|
|
47
|
-
*/
|
|
48
|
-
textPathSide?: 'left' | 'right';
|
|
49
|
-
/**
|
|
50
|
-
* The startOffset attribute defines an offset from the start of the path for the initial current text position along the path after converting the path to the \<textPath\> element's coordinate system.
|
|
51
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/startOffset
|
|
52
|
-
*/
|
|
53
|
-
textPathStartOffset?: number | string;
|
|
54
|
-
/**
|
|
55
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-line
|
|
56
|
-
*/
|
|
57
|
-
textDecorationLine?: TextDecorationLine;
|
|
58
|
-
/**
|
|
59
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-color
|
|
60
|
-
*/
|
|
61
|
-
textDecorationColor?: string;
|
|
62
|
-
/**
|
|
63
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-style
|
|
64
|
-
*/
|
|
65
|
-
textDecorationStyle?: TextDecorationStyle;
|
|
66
|
-
/**
|
|
67
|
-
* The font-style property sets whether a font should be styled with a normal, italic, or oblique face from its font-family.
|
|
68
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
|
|
69
|
-
*/
|
|
70
|
-
fontStyle?: CSSGlobalKeywords | 'normal' | 'italic' | 'oblique';
|
|
71
|
-
/**
|
|
72
|
-
* The font-size property sets the size of the font.
|
|
73
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
|
|
74
|
-
*/
|
|
75
|
-
fontSize?: number | string;
|
|
76
|
-
/**
|
|
77
|
-
* The font-family property specifies a prioritized list of one or more font family names and/or generic family names for the selected element.
|
|
78
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
|
|
79
|
-
*/
|
|
80
|
-
fontFamily?: string;
|
|
81
|
-
/**
|
|
82
|
-
* The font-weight property sets the weight (or boldness) of the font. The weights available depend on the font-family that is currently set.
|
|
83
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
|
|
84
|
-
*/
|
|
85
|
-
fontWeight?: CSSGlobalKeywords | 'normal' | 'bold' | 'bolder' | 'lighter' | number;
|
|
86
|
-
/**
|
|
87
|
-
* The font-variant shorthand property allows you to set all the font variants for a font.
|
|
88
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant
|
|
89
|
-
*/
|
|
90
|
-
fontVariant?: CSSGlobalKeywords | 'normal' | 'small-caps' | string;
|
|
91
|
-
/**
|
|
92
|
-
* The line-height property sets the height of a line box.
|
|
93
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
|
|
94
|
-
*/
|
|
95
|
-
lineHeight?: number | string;
|
|
96
|
-
/**
|
|
97
|
-
* It specifies the spacing between letters when drawing text.
|
|
98
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/letterSpacing
|
|
99
|
-
*/
|
|
100
|
-
letterSpacing?: number | string;
|
|
101
|
-
/**
|
|
102
|
-
* The white-space property sets how white space inside an element is handled.
|
|
103
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
|
|
104
|
-
*/
|
|
105
|
-
/**
|
|
106
|
-
* There is no "CSS leading" property
|
|
107
|
-
* @see https://css-tricks.com/how-to-tame-line-height-in-css/
|
|
108
|
-
*/
|
|
109
|
-
leading?: number;
|
|
110
|
-
/**
|
|
111
|
-
* The overflow-wrap CSS property applies to inline elements,
|
|
112
|
-
* setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.
|
|
113
|
-
*
|
|
114
|
-
* The overflow-wrap property acts in the same way as the non-standard property word-wrap.
|
|
115
|
-
* The word-wrap property is now treated by browsers as an alias of the standard property.
|
|
116
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap
|
|
117
|
-
*/
|
|
118
|
-
wordWrap?: boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Max width of overflowing box.
|
|
121
|
-
*/
|
|
122
|
-
wordWrapWidth?: number;
|
|
123
|
-
/**
|
|
124
|
-
* The dx attribute indicates a shift along the x-axis on the position of an element or its content.
|
|
125
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/dx
|
|
126
|
-
*/
|
|
127
|
-
dx?: number | string;
|
|
128
|
-
/**
|
|
129
|
-
* The dy attribute indicates a shift along the y-axis on the position of an element or its content.
|
|
130
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/dy
|
|
131
|
-
*/
|
|
132
|
-
dy?: number | string;
|
|
133
|
-
}
|
|
134
|
-
export interface ParsedTextStyleProps extends ParsedBaseStyleProps {
|
|
135
|
-
x: number;
|
|
136
|
-
y: number;
|
|
137
|
-
z?: number;
|
|
138
|
-
isBillboard?: boolean;
|
|
139
|
-
sizeAttenuation?: boolean;
|
|
140
|
-
text: string;
|
|
141
|
-
textAlign?: 'start' | 'center' | 'middle' | 'end' | 'left' | 'right';
|
|
142
|
-
textBaseline?: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';
|
|
143
|
-
fontStyle?: 'normal' | 'italic' | 'oblique';
|
|
144
|
-
fontSize?: number;
|
|
145
|
-
fontFamily?: string;
|
|
146
|
-
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | number;
|
|
147
|
-
fontVariant?: 'normal' | 'small-caps' | string;
|
|
148
|
-
lineHeight?: number;
|
|
149
|
-
letterSpacing?: number;
|
|
150
|
-
leading?: number;
|
|
151
|
-
wordWrap?: boolean;
|
|
152
|
-
wordWrapWidth?: number;
|
|
153
|
-
maxLines?: number;
|
|
154
|
-
textOverflow?: TextOverflow | string;
|
|
155
|
-
isOverflowing?: boolean;
|
|
156
|
-
textPath?: Path;
|
|
157
|
-
textDecorationLine?: TextDecorationLine;
|
|
158
|
-
textDecorationColor?: CSSRGB;
|
|
159
|
-
textDecorationStyle?: TextDecorationStyle | string;
|
|
160
|
-
textPathSide?: 'left' | 'right';
|
|
161
|
-
textPathStartOffset?: number;
|
|
162
|
-
metrics?: TextMetrics;
|
|
163
|
-
dx?: number;
|
|
164
|
-
dy?: number;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* <text> @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextElement
|
|
168
|
-
*/
|
|
169
|
-
export declare class Text extends DisplayObject<TextStyleProps, ParsedTextStyleProps> {
|
|
170
|
-
/**
|
|
171
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement#constants
|
|
172
|
-
*/
|
|
173
|
-
constructor({ style, ...rest }?: DisplayObjectConfig<TextStyleProps>);
|
|
174
|
-
/**
|
|
175
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement
|
|
176
|
-
*/
|
|
177
|
-
getComputedTextLength(): number;
|
|
178
|
-
getLineBoundingRects(): import("..").Rectangle[];
|
|
179
|
-
isOverflowing(): boolean;
|
|
180
|
-
}
|
|
181
|
-
//# sourceMappingURL=Text.d.ts.map
|
|
1
|
+
import { CSSGlobalKeywords, CSSRGB } from '../css';
|
|
2
|
+
import type { DisplayObjectConfig } from '../dom/interfaces';
|
|
3
|
+
import type { TextMetrics } from '../services';
|
|
4
|
+
import type { BaseStyleProps, ParsedBaseStyleProps, TextDecorationStyle, TextOverflow, TextDecorationLine } from '../types';
|
|
5
|
+
import { DisplayObject } from './DisplayObject';
|
|
6
|
+
import type { Path } from './Path';
|
|
7
|
+
export interface TextStyleProps extends BaseStyleProps {
|
|
8
|
+
x?: number | string;
|
|
9
|
+
y?: number | string;
|
|
10
|
+
z?: number | string;
|
|
11
|
+
/**
|
|
12
|
+
* Always face the camera.
|
|
13
|
+
*/
|
|
14
|
+
isBillboard?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the size of the sprite is attenuated by the camera depth. (Perspective camera only.)
|
|
17
|
+
*/
|
|
18
|
+
sizeAttenuation?: boolean;
|
|
19
|
+
text: number | string;
|
|
20
|
+
/**
|
|
21
|
+
* The text-align property sets the horizontal alignment of the inline-level content.
|
|
22
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-align
|
|
23
|
+
*/
|
|
24
|
+
textAlign?: CSSGlobalKeywords | 'start' | 'center' | 'middle' | 'end' | 'left' | 'right';
|
|
25
|
+
/**
|
|
26
|
+
* It specifies the current text baseline used when drawing text.
|
|
27
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textBaseline
|
|
28
|
+
*/
|
|
29
|
+
textBaseline?: CSSGlobalKeywords | 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';
|
|
30
|
+
/**
|
|
31
|
+
* The text-overflow property sets how hidden overflow content is signaled to users.
|
|
32
|
+
* It can be clipped, display an ellipsis ('…'), or display a custom string.
|
|
33
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow#values
|
|
34
|
+
*/
|
|
35
|
+
textOverflow?: TextOverflow | string;
|
|
36
|
+
/**
|
|
37
|
+
* Borrow from CanvasKit ParagraphStyle.
|
|
38
|
+
*/
|
|
39
|
+
maxLines?: number;
|
|
40
|
+
/**
|
|
41
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Element/textPath
|
|
42
|
+
*/
|
|
43
|
+
textPath?: Path;
|
|
44
|
+
/**
|
|
45
|
+
* The side attribute determines the side of a path the text is placed on (relative to the path direction).
|
|
46
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/side
|
|
47
|
+
*/
|
|
48
|
+
textPathSide?: 'left' | 'right';
|
|
49
|
+
/**
|
|
50
|
+
* The startOffset attribute defines an offset from the start of the path for the initial current text position along the path after converting the path to the \<textPath\> element's coordinate system.
|
|
51
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/startOffset
|
|
52
|
+
*/
|
|
53
|
+
textPathStartOffset?: number | string;
|
|
54
|
+
/**
|
|
55
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-line
|
|
56
|
+
*/
|
|
57
|
+
textDecorationLine?: TextDecorationLine;
|
|
58
|
+
/**
|
|
59
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-color
|
|
60
|
+
*/
|
|
61
|
+
textDecorationColor?: string;
|
|
62
|
+
/**
|
|
63
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-style
|
|
64
|
+
*/
|
|
65
|
+
textDecorationStyle?: TextDecorationStyle;
|
|
66
|
+
/**
|
|
67
|
+
* The font-style property sets whether a font should be styled with a normal, italic, or oblique face from its font-family.
|
|
68
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-style
|
|
69
|
+
*/
|
|
70
|
+
fontStyle?: CSSGlobalKeywords | 'normal' | 'italic' | 'oblique';
|
|
71
|
+
/**
|
|
72
|
+
* The font-size property sets the size of the font.
|
|
73
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
|
|
74
|
+
*/
|
|
75
|
+
fontSize?: number | string;
|
|
76
|
+
/**
|
|
77
|
+
* The font-family property specifies a prioritized list of one or more font family names and/or generic family names for the selected element.
|
|
78
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
|
|
79
|
+
*/
|
|
80
|
+
fontFamily?: string;
|
|
81
|
+
/**
|
|
82
|
+
* The font-weight property sets the weight (or boldness) of the font. The weights available depend on the font-family that is currently set.
|
|
83
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
|
|
84
|
+
*/
|
|
85
|
+
fontWeight?: CSSGlobalKeywords | 'normal' | 'bold' | 'bolder' | 'lighter' | number;
|
|
86
|
+
/**
|
|
87
|
+
* The font-variant shorthand property allows you to set all the font variants for a font.
|
|
88
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant
|
|
89
|
+
*/
|
|
90
|
+
fontVariant?: CSSGlobalKeywords | 'normal' | 'small-caps' | string;
|
|
91
|
+
/**
|
|
92
|
+
* The line-height property sets the height of a line box.
|
|
93
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
|
|
94
|
+
*/
|
|
95
|
+
lineHeight?: number | string;
|
|
96
|
+
/**
|
|
97
|
+
* It specifies the spacing between letters when drawing text.
|
|
98
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/letterSpacing
|
|
99
|
+
*/
|
|
100
|
+
letterSpacing?: number | string;
|
|
101
|
+
/**
|
|
102
|
+
* The white-space property sets how white space inside an element is handled.
|
|
103
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
|
|
104
|
+
*/
|
|
105
|
+
/**
|
|
106
|
+
* There is no "CSS leading" property
|
|
107
|
+
* @see https://css-tricks.com/how-to-tame-line-height-in-css/
|
|
108
|
+
*/
|
|
109
|
+
leading?: number;
|
|
110
|
+
/**
|
|
111
|
+
* The overflow-wrap CSS property applies to inline elements,
|
|
112
|
+
* setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.
|
|
113
|
+
*
|
|
114
|
+
* The overflow-wrap property acts in the same way as the non-standard property word-wrap.
|
|
115
|
+
* The word-wrap property is now treated by browsers as an alias of the standard property.
|
|
116
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap
|
|
117
|
+
*/
|
|
118
|
+
wordWrap?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Max width of overflowing box.
|
|
121
|
+
*/
|
|
122
|
+
wordWrapWidth?: number;
|
|
123
|
+
/**
|
|
124
|
+
* The dx attribute indicates a shift along the x-axis on the position of an element or its content.
|
|
125
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/dx
|
|
126
|
+
*/
|
|
127
|
+
dx?: number | string;
|
|
128
|
+
/**
|
|
129
|
+
* The dy attribute indicates a shift along the y-axis on the position of an element or its content.
|
|
130
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/dy
|
|
131
|
+
*/
|
|
132
|
+
dy?: number | string;
|
|
133
|
+
}
|
|
134
|
+
export interface ParsedTextStyleProps extends ParsedBaseStyleProps {
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
z?: number;
|
|
138
|
+
isBillboard?: boolean;
|
|
139
|
+
sizeAttenuation?: boolean;
|
|
140
|
+
text: string;
|
|
141
|
+
textAlign?: 'start' | 'center' | 'middle' | 'end' | 'left' | 'right';
|
|
142
|
+
textBaseline?: 'top' | 'hanging' | 'middle' | 'alphabetic' | 'ideographic' | 'bottom';
|
|
143
|
+
fontStyle?: 'normal' | 'italic' | 'oblique';
|
|
144
|
+
fontSize?: number;
|
|
145
|
+
fontFamily?: string;
|
|
146
|
+
fontWeight?: 'normal' | 'bold' | 'bolder' | 'lighter' | number;
|
|
147
|
+
fontVariant?: 'normal' | 'small-caps' | string;
|
|
148
|
+
lineHeight?: number;
|
|
149
|
+
letterSpacing?: number;
|
|
150
|
+
leading?: number;
|
|
151
|
+
wordWrap?: boolean;
|
|
152
|
+
wordWrapWidth?: number;
|
|
153
|
+
maxLines?: number;
|
|
154
|
+
textOverflow?: TextOverflow | string;
|
|
155
|
+
isOverflowing?: boolean;
|
|
156
|
+
textPath?: Path;
|
|
157
|
+
textDecorationLine?: TextDecorationLine;
|
|
158
|
+
textDecorationColor?: CSSRGB;
|
|
159
|
+
textDecorationStyle?: TextDecorationStyle | string;
|
|
160
|
+
textPathSide?: 'left' | 'right';
|
|
161
|
+
textPathStartOffset?: number;
|
|
162
|
+
metrics?: TextMetrics;
|
|
163
|
+
dx?: number;
|
|
164
|
+
dy?: number;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* <text> @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextElement
|
|
168
|
+
*/
|
|
169
|
+
export declare class Text extends DisplayObject<TextStyleProps, ParsedTextStyleProps> {
|
|
170
|
+
/**
|
|
171
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement#constants
|
|
172
|
+
*/
|
|
173
|
+
constructor({ style, ...rest }?: DisplayObjectConfig<TextStyleProps>);
|
|
174
|
+
/**
|
|
175
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement
|
|
176
|
+
*/
|
|
177
|
+
getComputedTextLength(): number;
|
|
178
|
+
getLineBoundingRects(): import("..").Rectangle[];
|
|
179
|
+
isOverflowing(): boolean;
|
|
180
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AbsoluteArray } from '@antv/util';
|
|
2
|
+
import { Rectangle } from '../shapes';
|
|
3
|
+
export declare const EMPTY_PARSED_PATH: {
|
|
4
|
+
absolutePath: AbsoluteArray;
|
|
5
|
+
hasArc: boolean;
|
|
6
|
+
segments: any[];
|
|
7
|
+
polygons: any[];
|
|
8
|
+
polylines: any[];
|
|
9
|
+
curve: any;
|
|
10
|
+
totalLength: number;
|
|
11
|
+
rect: Rectangle;
|
|
12
|
+
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
export * from './Circle';
|
|
2
|
-
export * from './CustomElement';
|
|
3
|
-
export * from './DisplayObject';
|
|
4
|
-
export * from './Ellipse';
|
|
5
|
-
export * from './Group';
|
|
6
|
-
export * from './HTML';
|
|
7
|
-
export * from './Image';
|
|
8
|
-
export * from './Line';
|
|
9
|
-
export * from './Path';
|
|
10
|
-
export * from './Polygon';
|
|
11
|
-
export * from './Polyline';
|
|
12
|
-
export * from './Rect';
|
|
13
|
-
export * from './Text';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './Circle';
|
|
2
|
+
export * from './CustomElement';
|
|
3
|
+
export * from './DisplayObject';
|
|
4
|
+
export * from './Ellipse';
|
|
5
|
+
export * from './Group';
|
|
6
|
+
export * from './HTML';
|
|
7
|
+
export * from './Image';
|
|
8
|
+
export * from './Line';
|
|
9
|
+
export * from './Path';
|
|
10
|
+
export * from './Polygon';
|
|
11
|
+
export * from './Polyline';
|
|
12
|
+
export * from './Rect';
|
|
13
|
+
export * from './Text';
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import type { DisplayObject } from '../display-objects';
|
|
2
|
-
/**
|
|
3
|
-
* canvas.customElements
|
|
4
|
-
*
|
|
5
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry
|
|
6
|
-
*/
|
|
7
|
-
export declare class CustomElementRegistry {
|
|
8
|
-
private registry;
|
|
9
|
-
constructor();
|
|
10
|
-
define<T extends DisplayObject>(name: string, constructor: new (...args: any[]) => T): void;
|
|
11
|
-
/**
|
|
12
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/get
|
|
13
|
-
*/
|
|
14
|
-
get<T extends DisplayObject>(name: string): new (...args: any[]) => T;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=CustomElementRegistry.d.ts.map
|
|
1
|
+
import type { DisplayObject } from '../display-objects';
|
|
2
|
+
/**
|
|
3
|
+
* canvas.customElements
|
|
4
|
+
*
|
|
5
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry
|
|
6
|
+
*/
|
|
7
|
+
export declare class CustomElementRegistry {
|
|
8
|
+
private registry;
|
|
9
|
+
constructor();
|
|
10
|
+
define<T extends DisplayObject>(name: string, constructor: new (...args: any[]) => T): void;
|
|
11
|
+
/**
|
|
12
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/get
|
|
13
|
+
*/
|
|
14
|
+
get<T extends DisplayObject>(name: string): new (...args: any[]) => T;
|
|
15
|
+
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { FederatedEvent } from './FederatedEvent';
|
|
2
|
-
/**
|
|
3
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/Events/Creating_and_triggering_events
|
|
4
|
-
*
|
|
5
|
-
* @example
|
|
6
|
-
const event = new CustomEvent('build', { detail: { prop1: 'xx' } });
|
|
7
|
-
circle.addEventListener('build', (e) => {
|
|
8
|
-
e.target; // circle
|
|
9
|
-
e.detail; // { prop1: 'xx' }
|
|
10
|
-
});
|
|
1
|
+
import { FederatedEvent } from './FederatedEvent';
|
|
2
|
+
/**
|
|
3
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/Events/Creating_and_triggering_events
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
const event = new CustomEvent('build', { detail: { prop1: 'xx' } });
|
|
7
|
+
circle.addEventListener('build', (e) => {
|
|
8
|
+
e.target; // circle
|
|
9
|
+
e.detail; // { prop1: 'xx' }
|
|
10
|
+
});
|
|
11
11
|
|
|
12
|
-
circle.dispatchEvent(event);
|
|
13
|
-
*/
|
|
14
|
-
export declare class CustomEvent extends FederatedEvent {
|
|
15
|
-
constructor(eventName: string, object?: object);
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=CustomEvent.d.ts.map
|
|
12
|
+
circle.dispatchEvent(event);
|
|
13
|
+
*/
|
|
14
|
+
export declare class CustomEvent extends FederatedEvent {
|
|
15
|
+
constructor(eventName: string, object?: object);
|
|
16
|
+
}
|