presenter 0.7.5 → 0.8.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/export.js +26 -26
- package/dist/export.js.map +1 -1
- package/dist/export.mjs +2599 -2566
- package/dist/export.mjs.map +1 -1
- package/dist/extras/IFrame.d.ts +2 -2
- package/dist/objects/Circle.d.ts +3 -3
- package/dist/objects/Image.d.ts +1 -1
- package/dist/objects/Path.d.ts +2 -2
- package/dist/objects/Polygon.d.ts +3 -3
- package/dist/objects/Rectangle.d.ts +4 -4
- package/dist/presenter.js +2 -2
- package/dist/presenter.js.map +1 -1
- package/dist/presenter.mjs +971 -939
- package/dist/presenter.mjs.map +1 -1
- package/dist/renderer/browser-canvas/utils/text/getTextUnitMeasurements.d.ts +6 -1
- package/dist/types/TextStyle.d.ts +2 -0
- package/dist/utils/objects/circle/getCircleInsetFillPath.d.ts +1 -1
- package/dist/utils/objects/rectangle/getRectangleInsetFillPath.d.ts +1 -1
- package/dist/utils/objects/rectangle/getRoundedRectanglePath.d.ts +1 -1
- package/dist/utils/objects/text/getTextScriptVariant.d.ts +8 -0
- package/package.json +1 -1
|
@@ -2,4 +2,9 @@ import { Size } from '../../../../types/Size';
|
|
|
2
2
|
import { TextStyle } from '../../../../types/TextStyle';
|
|
3
3
|
import { TextUnit } from '../../../../types/TextUnit';
|
|
4
4
|
import { UnifiedCanvasContext } from '../../types/UnifiedCanvasContext';
|
|
5
|
-
export
|
|
5
|
+
export interface TextUnitMeasurement extends Size {
|
|
6
|
+
readonly baselineShift: number;
|
|
7
|
+
readonly bottom: number;
|
|
8
|
+
readonly top: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function getTextUnitMeasurements(textUnits: TextUnit[][], style: TextStyle, ctx: UnifiedCanvasContext): TextUnitMeasurement[][];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Circle } from '../../../objects/Circle';
|
|
2
2
|
import { UnifiedPath2D } from '../../../renderer/browser-canvas/types/UnifiedPath2D';
|
|
3
3
|
/**
|
|
4
|
-
* Returns a circle path that is smaller than the original by half the
|
|
4
|
+
* Returns a circle path that is smaller than the original by half the stroke width.
|
|
5
5
|
* This is used as a clip region when drawing semi-transparent shapes.
|
|
6
6
|
*/
|
|
7
7
|
export declare function getCircleInsetFillPath(circle: Circle, createPath: () => UnifiedPath2D): UnifiedPath2D | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Rectangle } from '../../../objects/Rectangle';
|
|
2
2
|
import { UnifiedPath2D } from '../../../renderer/browser-canvas/types/UnifiedPath2D';
|
|
3
3
|
/**
|
|
4
|
-
* Returns a rectangle path that is smaller than the original by half the
|
|
4
|
+
* Returns a rectangle path that is smaller than the original by half the stroke width
|
|
5
5
|
* on each side. This is used as a clip region when drawing semi-transparent shapes.
|
|
6
6
|
*/
|
|
7
7
|
export declare function getRectangleInsetFillPath(rectangle: Rectangle, createPath: () => UnifiedPath2D): UnifiedPath2D | undefined;
|
|
@@ -2,4 +2,4 @@ import { UnifiedPath2D } from '../../../renderer/browser-canvas/types/UnifiedPat
|
|
|
2
2
|
import { PathWithLength } from '../../../types/PathWithLength';
|
|
3
3
|
import { Position } from '../../../types/Position';
|
|
4
4
|
import { Size } from '../../../types/Size';
|
|
5
|
-
export declare function getRoundedRectanglePath(origin: Position, size: Size,
|
|
5
|
+
export declare function getRoundedRectanglePath(origin: Position, size: Size, cornerRadius: number, createPath: () => UnifiedPath2D, overshoot?: number): PathWithLength;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TextStyle } from '../../../types/TextStyle';
|
|
2
|
+
export interface TextScriptVariant {
|
|
3
|
+
readonly baselineShift: number;
|
|
4
|
+
readonly fontSize: number;
|
|
5
|
+
readonly isSubscript: boolean;
|
|
6
|
+
readonly isSuperscript: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function getTextScriptVariant(textStyle: TextStyle): TextScriptVariant;
|