@mindfusion/drawing 4.3.0 → 4.4.0

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/drawing.d.mts DELETED
@@ -1,2955 +0,0 @@
1
- declare module "Drawing/Point" {
2
- /**
3
- * @namespace MindFusion.Drawing
4
- */
5
- /**.
6
- * @class Represents a point.
7
- */
8
- export class Point {
9
- /**
10
- * For internal use only.
11
- * @private
12
- */
13
- private static distance;
14
- /**
15
- * For internal use only.
16
- * @private
17
- */
18
- private static angleBetween;
19
- /**
20
- * For internal use only.
21
- * @private
22
- */
23
- private static addVector;
24
- static middle(p1: any, p2: any): Point;
25
- /**
26
- * Initializes a new instance of the Point class with the specified X and Y coordinates.
27
- * @constructor
28
- * @param {Number} x The X-coordinate of the Point.
29
- * @param {Number} y The Y-coordinate of the Point.
30
- */
31
- constructor(x: number, y: number);
32
- set x(arg: number);
33
- /**
34
- * Gets or sets the x-coordinate of the point.
35
- * @type {Number}
36
- * @summary The x-coordinate of the point.
37
- */
38
- get x(): number;
39
- set y(arg: number);
40
- /**
41
- * Gets or sets the y-coordinate of the point.
42
- * @type {Number}
43
- * @summary The y-coordinate of the point.
44
- */
45
- get y(): number;
46
- type: any;
47
- _x: number;
48
- _y: number;
49
- /**
50
- * For internal use only.
51
- * @private
52
- */
53
- private getType;
54
- /**
55
- * Gets a value indicating whether this Point is empty.
56
- * @returns {Boolean} true if both x and y are 0; otherwise, false.
57
- */
58
- empty(): boolean;
59
- /**
60
- * Calculate the distance from this point to another one.
61
- * For internal use only.
62
- * @private
63
- */
64
- private distance;
65
- /**
66
- * For internal use only.
67
- * @private
68
- */
69
- private angleBetween;
70
- /**
71
- * For internal use only.
72
- * @private
73
- */
74
- private addVector;
75
- /**
76
- * For internal use only.
77
- * @private
78
- */
79
- private newWithOffset;
80
- offset(x: any, y: any): void;
81
- /**
82
- * Specifies whether this Point contains the same coordinates as the specified point.
83
- * @param {Point} [point] The Point to test.
84
- * @returns {Boolean} true if point is a Point and has the same coordinates as this Point.
85
- */
86
- equals(point?: Point): boolean;
87
- /**
88
- * For internal use only.
89
- * @private
90
- */
91
- private clone;
92
- toJson(): {
93
- x: number;
94
- y: number;
95
- };
96
- manhDistance(p: any): number;
97
- }
98
- }
99
- declare module "Drawing/Enum" {
100
- /**
101
- * Specifies visibility for components.
102
- */
103
- export type Visibility = number;
104
- export namespace Visibility {
105
- const Hidden: number;
106
- const Collapsed: number;
107
- const Visible: number;
108
- }
109
- /**
110
- * Specifies alignment of components.
111
- */
112
- export type LayoutAlignment = number;
113
- export namespace LayoutAlignment {
114
- const Near: number;
115
- const Center: number;
116
- const Far: number;
117
- const Stretch: number;
118
- }
119
- /**
120
- * Specifies the dash pattern of lines.
121
- */
122
- export type DashStyle = number;
123
- export namespace DashStyle {
124
- const Solid: number;
125
- const Dash: number;
126
- const Dot: number;
127
- const DashDot: number;
128
- const DashDotDot: number;
129
- const Custom: number;
130
- function apply(context: any, dashStyle: any): void;
131
- }
132
- /**
133
- * Specifies the position and alignment of a picture in a node, or that of the background image.
134
- */
135
- export type ImageAlign = number;
136
- export namespace ImageAlign {
137
- const Center_1: number;
138
- export { Center_1 as Center };
139
- export const Fit: number;
140
- const Stretch_1: number;
141
- export { Stretch_1 as Stretch };
142
- export const Tile: number;
143
- export const TopLeft: number;
144
- export const BottomLeft: number;
145
- export const TopRight: number;
146
- export const BottomRight: number;
147
- export const TopCenter: number;
148
- export const BottomCenter: number;
149
- export const MiddleLeft: number;
150
- export const MiddleRight: number;
151
- export const FitLeft: number;
152
- export const FitTop: number;
153
- export const FitRight: number;
154
- export const FitBottom: number;
155
- }
156
- /**
157
- * Specifies font style attributes.
158
- */
159
- export type FontStyle = number;
160
- export namespace FontStyle {
161
- const Regular: number;
162
- const Bold: number;
163
- const Italic: number;
164
- const Underline: number;
165
- const Strikeout: number;
166
- }
167
- /**
168
- * Specifies how to join consecutive line or curve segments in a figure.
169
- */
170
- export type LineJoin = number;
171
- export namespace LineJoin {
172
- const Miter: number;
173
- const Bevel: number;
174
- const Round: number;
175
- }
176
- /**
177
- * Specifies the alignment of a text string relative to its layout rectangle.
178
- */
179
- export type StringAlignment = number;
180
- export namespace StringAlignment {
181
- const Near_1: number;
182
- export { Near_1 as Near };
183
- const Center_2: number;
184
- export { Center_2 as Center };
185
- const Far_1: number;
186
- export { Far_1 as Far };
187
- }
188
- /**
189
- * Specifies the alignment of a graphics element relative to its layout rectangle.
190
- */
191
- export type Alignment = number;
192
- export namespace Alignment {
193
- const Near_2: number;
194
- export { Near_2 as Near };
195
- const Center_3: number;
196
- export { Center_3 as Center };
197
- const Far_2: number;
198
- export { Far_2 as Far };
199
- }
200
- /**
201
- * @class Encapsulates text layout information.
202
- * @property {StringAlignment} alignment Gets or sets the horizontal alignment of the text.
203
- * @property {StringAlignment} lineAlignment Gets or sets the vertical alignment of the text.
204
- */
205
- export class StringFormat {
206
- set alignment(arg: any);
207
- get alignment(): any;
208
- _alignment: any;
209
- set lineAlignment(arg: any);
210
- get lineAlignment(): any;
211
- _lineAlignment: any;
212
- }
213
- }
214
- declare module "Drawing/ComponentBase" {
215
- /**
216
- * @class A base class for components in CompositeNode visual tree.
217
- */
218
- export class ComponentBase {
219
- _visibility: number;
220
- set visibility(arg: number);
221
- /**
222
- * Gets or sets the visibility of this component.
223
- * @type {Visibility}
224
- * @summary A member of the Visibility enumeration.
225
- */
226
- get visibility(): number;
227
- set gridRow(arg: number);
228
- /**
229
- * Gets or sets the index of the grid row this component is contained in.
230
- * @type {Number}
231
- * @summary The grid row index.
232
- */
233
- get gridRow(): number;
234
- _gridRow: any;
235
- set gridColumn(arg: number);
236
- /**
237
- * Gets or sets the index of the grid column this component is contained in.
238
- * @type {Number}
239
- * @summary The grid column index.
240
- */
241
- get gridColumn(): number;
242
- _gridColumn: any;
243
- set horizontalAlignment(arg: number);
244
- /**
245
- * Gets or sets the component's horizontal alignment.
246
- * @type {LayoutAlignment}
247
- * @summary A member of the LayoutAlignment enumeration.
248
- */
249
- get horizontalAlignment(): number;
250
- _horizontalAlignment: any;
251
- set verticalAlignment(arg: number);
252
- /**
253
- * Gets or sets the component's vertical alignment.
254
- * @type {LayoutAlignment}
255
- * @summary A member of the LayoutAlignment enumeration.
256
- */
257
- get verticalAlignment(): number;
258
- _verticalAlignment: any;
259
- }
260
- }
261
- declare module "Drawing/Matrix" {
262
- export class Matrix {
263
- static fromValues(values: any): Matrix;
264
- elements: number[];
265
- matrix(): number[];
266
- isIdentity(): boolean;
267
- clone(): Matrix;
268
- translate(x: any, y: any): void;
269
- scale(sx: any, sy: any): void;
270
- scaleAtCenter(sx: any, sy: any, rect: any): void;
271
- rotate(angle: any): void;
272
- /**
273
- * Applies a clockwise rotation about the specified pivot point.
274
- * @param {Number} angle The angle of rotation.
275
- * @param {Number|Point} x The Y-coordinate of the pivot point.
276
- * @param {Number} [y] The Y-coordinate of the pivot point.
277
- */
278
- rotateAt(angle: number, x: number | Point, y?: number): void;
279
- invert(): Matrix;
280
- transformPoint(point: any): void;
281
- transformPoints(points: any): void;
282
- transformRect(rect: any): Rect;
283
- svgMatrix(): string;
284
- }
285
- import { Point } from "Drawing/Point";
286
- import { Rect } from "Drawing/Rect";
287
- }
288
- declare module "Drawing/GraphicsUnit" {
289
- /**
290
- * @namespace MindFusion.Drawing
291
- */
292
- /**
293
- * @class Specifies the unit of measure for length and size properties.
294
- */
295
- export class GraphicsUnit {
296
- /**
297
- * Specifies the world coordinate system unit as the unit of measure.
298
- * @type {Number}
299
- * @summary For internal use.
300
- */
301
- static get World(): number;
302
- /**
303
- * Specifies the display unit as the unit of measure.
304
- * @type {Number}
305
- * @summary Defines 100 DPI resolution.
306
- */
307
- static get Display(): number;
308
- /**
309
- * Specifies the pixel unit as the unit of measure.
310
- * @type {Number}
311
- * @summary Defines 96 DPI resolution.
312
- */
313
- static get Pixel(): number;
314
- /**
315
- * Specifies a printer's point as the unit of measure.
316
- * @type {Number}
317
- * @summary Defines 72 DPI resolution.
318
- */
319
- static get Point(): number;
320
- /**
321
- * Specifies the inch as the unit of measure.
322
- * @type {Number}
323
- * @summary Defines 1 DPI resolution.
324
- */
325
- static get Inch(): number;
326
- /**
327
- * Specifies the document unit as the unit of measure.
328
- * @type {Number}
329
- * @summary Defines 300 DPI resolution.
330
- */
331
- static get Document(): number;
332
- /**
333
- * Specifies the millimeter as the unit of measure.
334
- * @type {Number}
335
- * @summary Defines 25.4 DPI resolution.
336
- */
337
- static get Millimeter(): number;
338
- /**
339
- * Specifies the WpfPoint unit as the unit of measure.
340
- * @type {Number}
341
- * @summary Defines 96 DPI resolution.
342
- */
343
- static get WpfPoint(): number;
344
- /**
345
- * Specifies the world coordinate system unit as the unit of measure.
346
- * @type {Number}
347
- * @summary For internal use.
348
- */
349
- static get Percent(): number;
350
- /**
351
- * Specifies the centimeter as the unit of measure.
352
- * @type {Number}
353
- * @summary Defines 2.54 DPI resolution.
354
- */
355
- static get Centimeter(): number;
356
- static unitsPerInch(unit: any): 1 | 100 | 300 | 25.4 | 72 | 96 | 2.54;
357
- static convert(amount: any, sourceUnit: any, targetUnit: any): number;
358
- static getPixel(unit: any): number;
359
- static getMillimeter(unit: any): number;
360
- static getStandardDivisions(unit: any): 8 | 10;
361
- }
362
- }
363
- declare module "Drawing/DistanceToSegment" {
364
- /**
365
- * @namespace MindFusion.Drawing
366
- */
367
- export class DistanceToSegment {
368
- constructor(p: any, a: any, b: any);
369
- p: any;
370
- a: any;
371
- b: any;
372
- distanceToSegment(): number;
373
- distanceToSegmentSquared(): number;
374
- distanceSq(pt1: any, pt2: any): number;
375
- distanceToLineSquared(p: any, a: any, b: any): number;
376
- }
377
- }
378
- declare module "Drawing/Geometry" {
379
- export class Geometry {
380
- /**
381
- * Converts cartesian coordinates to the corresponding polar coordinates,
382
- * using the specified point as a center of the coordinate system.
383
- * @param {Point} center The center of the coordinate system.
384
- * @param {Point} point The cartesian coordinate to convert.
385
- * @returns {PolarCoords} The converted coordinate.
386
- */
387
- static cartesianToPolar(center: Point, point: Point): PolarCoords;
388
- static cartesianToPolarDegrees(center: any, point: any): PolarCoords;
389
- /**
390
- * Converts polar coordinates to the corresponding cartesian coordinates,
391
- * using the specified point as a center of the coordinate system.
392
- * @param {Point} center The center of the coordinate system.
393
- * @param {PolarCoords | Number} polar The polar coordinate to convert.
394
- * @param {Number} [r] The polar coordinate to convert.
395
- * @returns {Point} The converted coordinate.
396
- */
397
- static polarToCartesian(center: Point, polar: PolarCoords | number, r?: number): Point;
398
- static polarToCartesianDegrees(center: any, polar: any): Point;
399
- static rotatePoint(point: any, pivot: any, angle: any): Point;
400
- static distance(p1: any, p2: any): number;
401
- static radianToDegree(radian: any): number;
402
- static degreeToRadian(degree: any): number;
403
- static getBoundingBox(points: any): Rect;
404
- static polylineIntersectsRect(points: any, rect: any): boolean;
405
- static polylinesIntersect(points1: any, points2: any): boolean;
406
- static getEllipseIntr(rcBox: any, pt1: any, pt2: any): any;
407
- static calcAngle(s1p1: any, s1p2: any, s2p1: any, s2p2: any): number;
408
- }
409
- import { Point } from "Drawing/Point";
410
- class PolarCoords {
411
- constructor(a: any, r: any);
412
- _a: any;
413
- _r: any;
414
- set a(arg: any);
415
- get a(): any;
416
- set r(arg: any);
417
- get r(): any;
418
- }
419
- import { Rect } from "Drawing/Rect";
420
- export {};
421
- }
422
- declare module "Drawing/Color" {
423
- /**
424
- * @class Represents a color.
425
- */
426
- export class Color {
427
- /**
428
- * Initializes a new instance of the Color class.
429
- * @param {String} value A string representation of the color.
430
- */
431
- constructor(value: string);
432
- toString(): any;
433
- /**
434
- * Creates a Color instance from alpha, red, green and blue values.
435
- * @param {Number} alpha The alpha value.
436
- * @param {Number} red The red value.
437
- * @param {Number} green The green value.
438
- * @param {Number} blue The blue value.
439
- * @returns {Color} The new Color instance.
440
- */
441
- static fromArgb(a: number, r: number, g: number, b: number): Color;
442
- /**
443
- * Creates a Color instance from red, green and blue values.
444
- * @param {Number} red The red value.
445
- * @param {Number} green The green value.
446
- * @param {Number} blue The blue value.
447
- * @returns {Color} The new Color instance.
448
- */
449
- static fromArgb(r: number, g: number, b: number): Color;
450
- private static parse;
451
- private static checkKnownColor;
452
- private static hexToRgb;
453
- private static stringToRgb;
454
- private static rgbToString;
455
- private static stringToHex;
456
- value: string;
457
- R: number;
458
- G: number;
459
- B: number;
460
- A: number;
461
- rgbValue: string;
462
- /**
463
- * The list of color names as defined by the CSS specification.
464
- */
465
- static knownColors: {
466
- AliceBlue: string;
467
- AntiqueWhite: string;
468
- Aqua: string;
469
- Aquamarine: string;
470
- Azure: string;
471
- Beige: string;
472
- Bisque: string;
473
- Black: string;
474
- BlanchedAlmond: string;
475
- Blue: string;
476
- BlueViolet: string;
477
- Brown: string;
478
- BurlyWood: string;
479
- CadetBlue: string;
480
- Chartreuse: string;
481
- Chocolate: string;
482
- Coral: string;
483
- CornflowerBlue: string;
484
- Cornsilk: string;
485
- Crimson: string;
486
- Cyan: string;
487
- DarkBlue: string;
488
- DarkCyan: string;
489
- DarkGoldenRod: string;
490
- DarkGray: string;
491
- DarkGrey: string;
492
- DarkGreen: string;
493
- DarkKhaki: string;
494
- DarkMagenta: string;
495
- DarkOliveGreen: string;
496
- DarkOrange: string;
497
- DarkOrchid: string;
498
- DarkRed: string;
499
- DarkSalmon: string;
500
- DarkSeaGreen: string;
501
- DarkSlateBlue: string;
502
- DarkSlateGray: string;
503
- DarkSlateGrey: string;
504
- DarkTurquoise: string;
505
- DarkViolet: string;
506
- DeepPink: string;
507
- DeepSkyBlue: string;
508
- DimGray: string;
509
- DimGrey: string;
510
- DodgerBlue: string;
511
- Feldspar: string;
512
- FireBrick: string;
513
- FloralWhite: string;
514
- ForestGreen: string;
515
- Fuchsia: string;
516
- Gainsboro: string;
517
- GhostWhite: string;
518
- Gold: string;
519
- GoldenRod: string;
520
- Gray: string;
521
- Grey: string;
522
- Green: string;
523
- GreenYellow: string;
524
- HoneyDew: string;
525
- HotPink: string;
526
- IndianRed: string;
527
- Indigo: string;
528
- Ivory: string;
529
- Khaki: string;
530
- Lavender: string;
531
- LavenderBlush: string;
532
- LawnGreen: string;
533
- LemonChiffon: string;
534
- LightBlue: string;
535
- LightCoral: string;
536
- LightCyan: string;
537
- LightGoldenRodYellow: string;
538
- LightGray: string;
539
- LightGrey: string;
540
- LightGreen: string;
541
- LightPink: string;
542
- LightSalmon: string;
543
- LightSeaGreen: string;
544
- LightSkyBlue: string;
545
- LightSlateBlue: string;
546
- LightSlateGray: string;
547
- LightSlateGrey: string;
548
- LightSteelBlue: string;
549
- lightyellow: string;
550
- Lime: string;
551
- LimeGreen: string;
552
- Linen: string;
553
- Magenta: string;
554
- Maroon: string;
555
- MediumAquaMarine: string;
556
- MediumBlue: string;
557
- MediumOrchid: string;
558
- MediumPurple: string;
559
- MediumSeaGreen: string;
560
- MediumSlateBlue: string;
561
- MediumSpringGreen: string;
562
- MediumTurquoise: string;
563
- MediumVioletRed: string;
564
- MidnightBlue: string;
565
- MintCream: string;
566
- MistyRose: string;
567
- Moccasin: string;
568
- NavajoWhite: string;
569
- Navy: string;
570
- OldLace: string;
571
- Olive: string;
572
- OliveDrab: string;
573
- Orange: string;
574
- OrangeRed: string;
575
- Orchid: string;
576
- PaleGoldenRod: string;
577
- PaleGreen: string;
578
- PaleTurquoise: string;
579
- PaleVioletRed: string;
580
- PapayaWhip: string;
581
- PeachPuff: string;
582
- Peru: string;
583
- Pink: string;
584
- Plum: string;
585
- PowderBlue: string;
586
- Purple: string;
587
- Red: string;
588
- RosyBrown: string;
589
- RoyalBlue: string;
590
- SaddleBrown: string;
591
- Salmon: string;
592
- SandyBrown: string;
593
- SeaGreen: string;
594
- SeaShell: string;
595
- Sienna: string;
596
- Silver: string;
597
- SkyBlue: string;
598
- SlateBlue: string;
599
- SlateGray: string;
600
- SlateGrey: string;
601
- Snow: string;
602
- SpringGreen: string;
603
- SteelBlue: string;
604
- Tan: string;
605
- Teal: string;
606
- Thistle: string;
607
- Tomato: string;
608
- Turquoise: string;
609
- Violet: string;
610
- VioletRed: string;
611
- Wheat: string;
612
- White: string;
613
- WhiteSmoke: string;
614
- Yellow: string;
615
- YellowGreen: string;
616
- Transparent: string;
617
- };
618
- }
619
- }
620
- declare module "Drawing/Brush" {
621
- /**
622
- * @namespace MindFusion.Drawing
623
- */
624
- /**
625
- * Copyright (c) 2015-2022, MindFusion LLC - Bulgaria.
626
- *
627
- * This source code is provided to you as part of the MindFusion software components
628
- * package you have purchased. You may use the source code to trace and/or fix
629
- * problems or customize the library as needed for your application. To get permission
630
- * to use the source code in any other way, please contact us at support@mindfusion.eu.
631
- */
632
- import { Rect } from "Drawing/Rect";
633
- import { Color } from "Drawing/Color";
634
- /**
635
- * @class Represents a brush.
636
- * @property {Color} color Gets or sets the color of this Brush object.
637
- */
638
- export class Brush {
639
- /**
640
- * Initializes a new instance of the Brush class.
641
- * @param {Color | string} color The color of this brush.
642
- */
643
- constructor(color: Color | string);
644
- /**
645
- * Creates a copy of this brush.
646
- * @returns {Brush} The copy of this brush.
647
- */
648
- clone(): Brush;
649
- /**
650
- * Applies the brush properties to a CanvasRenderingContext2D drawing object.
651
- * @param {CanvasRenderingContext2D} context The CanvasRenderingContext2D drawing object.
652
- */
653
- apply(context: CanvasRenderingContext2D, bounds?: Rect): void;
654
- /**
655
- * Returns a JSON object describing this brush.
656
- * @returns {Object} The object describing this brush.
657
- * @remarks Used for backward compatibility with the JSLib class.
658
- */
659
- toObject(): Object;
660
- /**
661
- * Returns a Brush from a JSON object or string describing this brush.
662
- * @returns {Brush} The brush object.
663
- * @remarks Used for backward compatibility with the JSLib class.
664
- */
665
- static fromObject(obj: any): Brush;
666
- /**
667
- * Determines whether the specified object is equal to this Brush.
668
- * @param {Object} The object to compare with.
669
- * @returns {Boolean} true if the specified object is equal to this Brush; otherwise, false.
670
- */
671
- equals(obj: any): boolean;
672
- private m_color;
673
- /**
674
- * Gets the color of this brush.
675
- * @returns {Color} The color of this brush.
676
- */
677
- get color(): Color;
678
- /**
679
- * Sets the color of this brush.
680
- * @param {Color} value The color of this brush.
681
- */
682
- set color(value: Color);
683
- }
684
- /**
685
- * @class Represents a linear gradient brush.
686
- * @property {Color} startColor Gets or sets the start color of the gradient.
687
- * @property {Color} endColor Gets or sets the end color of the gradient.
688
- * @property {Number} angle Gets or sets angle of gradient rotation.
689
- */
690
- export class LinearGradientBrush extends Brush {
691
- /**
692
- * Initializes a new instance of the Brush class.
693
- * @param {Color | string} startColor The starting color of the gradient.
694
- * @param {Color | string} endColor The ending color of the gradient.
695
- * @param {Number} [angle] The angle of the gradient.
696
- * @param {Rect} [bounds] The bounds of the gradient.
697
- */
698
- constructor(startColor: Color | string, endColor: Color | string, angle?: number, bounds?: Rect);
699
- /**
700
- * Creates a copy of this brush.
701
- * @returns {LinearGradientBrush} The copy of this brush.
702
- */
703
- clone(): LinearGradientBrush;
704
- /**
705
- * Applies the brush properties to a CanvasRenderingContext2D drawing object.
706
- * @param {CanvasRenderingContext2D} context The CanvasRenderingContext2D drawing object.
707
- * @param {Rect} bounds The bounds of the gradient.
708
- */
709
- apply(context: CanvasRenderingContext2D, bounds: Rect): void;
710
- /**
711
- * Returns a JSON object describing this brush.
712
- * @returns {Object} The object describing this brush.
713
- * @remarks Used for backward compatibility with the JSLib class.
714
- */
715
- toObject(): Object;
716
- /**
717
- * Returns a LinearGradientBrush from a JSON object or string describing this brush.
718
- * @returns {LinearGradientBrush} The brush object.
719
- * @remarks Used for backward compatibility with the JSLib class.
720
- */
721
- static fromObject(obj: any): Brush;
722
- /**
723
- * Determines whether the specified object is equal to this LinearGradientBrush.
724
- * @param {Object} The object to compare with.
725
- * @returns {Boolean} true if the specified object is equal to this LinearGradientBrush; otherwise, false.
726
- */
727
- equals(obj: any): boolean;
728
- private m_startColor;
729
- /**
730
- * Gets the starting color of the gradient.
731
- * @returns {Color} The starting color of the gradient.
732
- */
733
- get startColor(): Color;
734
- /**
735
- * Sets the starting color of the gradient.
736
- * @param {Color} value The starting color of the gradient.
737
- */
738
- set startColor(value: Color);
739
- private m_endColor;
740
- /**
741
- * Gets the ending color of the gradient.
742
- * @returns {Color} The ending color of the gradient.
743
- */
744
- get endColor(): Color;
745
- /**
746
- * Sets the ending color of the gradient.
747
- * @param {Color} value The ending color of the gradient.
748
- */
749
- set endColor(value: Color);
750
- /**
751
- * Gets the angle of the gradient.
752
- * @returns {Color} The angle of the gradient.
753
- */
754
- get angle(): number;
755
- /**
756
- * Sets the angle of the gradient.
757
- * @param {Color} value The angle of the gradient.
758
- */
759
- set angle(value: number);
760
- private m_bounds;
761
- private m_angle;
762
- private m_colorStops;
763
- }
764
- }
765
- declare module "Drawing/DrawingUtils" {
766
- /**
767
- * @class Contains drawing-related helper functions.
768
- */
769
- export class DrawingUtils {
770
- static getLineWidth(context: any, strokeThickness: any): number;
771
- static applyLineWidth(context: any, strokeThickness: any): void;
772
- static applyLineDash(context: any, strokeThickness: any, strokeDashStyle: any, strokeDashArray: any, strokeDashOffset: any): void;
773
- /**
774
- * For internal use only.
775
- * @private
776
- */
777
- private static getRectPtPercent;
778
- /**
779
- * Returns the smallest possible rectangle containing both of the specified rectangles.
780
- * @param {Rect} rect1 The first rectangle.
781
- * @param {Rect} rect2 The second rectangle.
782
- * @returns {Rect} A Rect instance that represents the union of the specified arguments.
783
- */
784
- static unionRects(rect1: Rect, rect2: Rect): Rect;
785
- /**
786
- * For internal use only.
787
- * @private
788
- */
789
- private static normalizeRect;
790
- /**
791
- * Creates and returns an enlarged copy of a Rect instance.
792
- * @param {Rect} rect The Rect instance to inflate.
793
- * @param {Number} x The amount to inflate horizontally.
794
- * @param {Number} y The amount to inflate vertically.
795
- * @returns {Rect} The inflated Rect.
796
- */
797
- static inflate(rect: Rect, x: number, y: number): Rect;
798
- /**
799
- * Calculates the shortest distance from the specified point to the specified line.
800
- */
801
- static distToLine(point: any, p1: any, p2: any): number;
802
- /**
803
- * Calculates the shortest distance from the specified point to the specified polyline,
804
- * also returning the index of the segment the point is closest to.
805
- */
806
- static distToPolyline(point: any, ppoints: any, npoints: any, refSegment: any): number;
807
- static distToBezier(pt: any, bezier: any, refSegment: any): number;
808
- static calcBezierCoef(a0: any, a1: any, a2: any, a3: any, b0: any, b1: any, b2: any, b3: any, u: any, s: any, z: any, x4: any, y4: any): any[];
809
- /**
810
- * Returns the middle point of the segment defined by the specified points.
811
- */
812
- static midPoint(pt1: any, pt2: any): Point;
813
- /**
814
- * Determines whether the specified line segments intersect.
815
- * @param {Point} p1 The start of the first line segment.
816
- * @param {Point} p2 The end of the first line segment.
817
- * @param {Point} p3 The start of the second line segment.
818
- * @param {Point} p4 The end of the second line segment.
819
- * @returns {Boolean} true if the segments intersect, false if not.
820
- */
821
- static intersect(p1: Point, p2: Point, p3: Point, p4: Point): boolean;
822
- /**
823
- * For internal use only.
824
- * @private
825
- */
826
- private static ccw;
827
- /**
828
- * For internal use only.
829
- * @private
830
- */
831
- private static getIntersectionPoint;
832
- /**
833
- * Checks whether the segments defined by the specified point pairs intersect and returns the intersection point.
834
- * @param {Point} p1 The start of the first segment.
835
- * @param {Point} p2 The end of the first segment.
836
- * @param {Point} p3 The start of the second segment.
837
- * @param {Point} p4 The end of the second segment.
838
- * @returns {Boolean} true if the segments intersect, false if not.
839
- */
840
- static getSegmentIntersection(s1: any, s2: any, l1: any, l2: any): boolean;
841
- /**
842
- * Checks whether the specified rectangle contains the specified point.
843
- * @param {Point} point The point to check.
844
- * @param {Array} polygon An array with the points that define the polygon.
845
- * @returns {Boolean} true if the polygon contains the specified point, false if not.
846
- */
847
- static pointInPolygon(point: Point, polygon: any[]): boolean;
848
- /**
849
- * Checks whether the specified ellipse contains the specified point.
850
- * @param {Point} point The point to check.
851
- * @param {Rect} rect The bounds of the ellipse.
852
- * @returns {Boolean} true if the ellipse contains the specified point, false if not.
853
- */
854
- static pointInEllipse(point: Point, rect: Rect): boolean;
855
- /**
856
- * Checks whether the specified circle contains the specified point.
857
- * @param {Point} point The point to check.
858
- * @param {Point} center The center of the circle.
859
- * @param {Number} radius The radius of the circle.
860
- * @returns {Boolean} true if the circle contains the specified point, false if not.
861
- */
862
- static pointInCircle(point: Point, center: Point, radius: number): boolean;
863
- /**
864
- * Calculates the bounding rect of the specified polyline.
865
- * @param {Array} points An array of points.
866
- * @returns {Rect} The bounding rect.
867
- */
868
- static getPointsBounds(points: any[]): Rect;
869
- /**
870
- * For internal use only.
871
- * @private
872
- */
873
- private static getPolygonIntersection;
874
- /**
875
- * For internal use only.
876
- * @private
877
- */
878
- private static getClosestSegmentPoint;
879
- static pointAlongLengthPos(lengthPos: any, segments: any): any;
880
- static pointAlongLength(lengthFactor: any, segments: any): any;
881
- /**
882
- * For internal use only.
883
- * @private
884
- */
885
- private static getLength;
886
- /**
887
- * For internal use only.
888
- * @private
889
- */
890
- private static getLeftVector;
891
- /**
892
- * For internal use only.
893
- * @private
894
- */
895
- private static symmetricPoint;
896
- /**
897
- * Checks if the specified rectangle and circle intersect.
898
- * @param {Point} point The center of the circle.
899
- * @param {Rect} rect The rectangle.
900
- * @param {Number} rad The radius of the circle.
901
- * @returns {Boolean} true if the rectangle and the circle intersect; otherwise, false.
902
- */
903
- static checkIntersect(point: Point, rect: Rect, rad: number): boolean;
904
- /**
905
- * Calculates the minimum distance between a given point and a given rectangle.
906
- * @param {Point} point The point.
907
- * @param {Rect} rect The rectangle.
908
- * @returns {Number} The minimum distance.
909
- */
910
- static minDistToRect(point: Point, rect: Rect): number;
911
- /**
912
- * Returns the point that lies on the outline of a rectangle and is nearest to the given point.
913
- * @param {Point} point The point to consider.
914
- * @param {Rect} rect The rectangle to consider.
915
- * @returns {Number} The nearest point.
916
- */
917
- static distToRectPoint(point: Point, rect: Rect): number;
918
- /**
919
- * For internal use only.
920
- * @private
921
- */
922
- private static distToRectSelect;
923
- /**
924
- * For internal use only.
925
- * @private
926
- */
927
- private static equalEpsilon;
928
- /**
929
- * For internal use only.
930
- * @private
931
- */
932
- private static pointEqualEpsilon;
933
- /**
934
- * For internal use only.
935
- * @private
936
- */
937
- private static mid;
938
- /**
939
- * For internal use only.
940
- * @private
941
- */
942
- private static closer;
943
- /**
944
- * For internal use only.
945
- * @private
946
- */
947
- private static swap;
948
- /**
949
- * For internal use only.
950
- * @private
951
- */
952
- private static sort;
953
- /**
954
- * For internal use only.
955
- * @private
956
- */
957
- private static betweenOrEqual;
958
- /**
959
- * For internal use only.
960
- * @private
961
- */
962
- private static betweenOrEqualSorted;
963
- /**
964
- * For internal use only.
965
- * @private
966
- */
967
- private static subtract;
968
- /**
969
- * For internal use only.
970
- * @private
971
- */
972
- private static offsetPointCollection;
973
- /**
974
- * For internal use only.
975
- * @private
976
- */
977
- private static rectPtFromPercent;
978
- /**
979
- * For internal use only.
980
- * @private
981
- */
982
- private static setRect;
983
- /**
984
- * For internal use only.
985
- * @private
986
- */
987
- private static getLineHitTest;
988
- /**
989
- * For internal use only.
990
- * @private
991
- */
992
- private static DistanceSq;
993
- static distance(point1: any, point2: any): number;
994
- /**
995
- * Converts the specified value from degrees to radians.
996
- * @param {Number} degrees The degrees to convert.
997
- * @returns {Number} The converted angle.
998
- */
999
- static radians(degrees: number): number;
1000
- /**
1001
- * Converts the specified value from radians to degrees.
1002
- * @param {Number} radians The radians to convert.
1003
- * @returns {Number} The converted angle.
1004
- */
1005
- static degrees(radians: number): number;
1006
- /**
1007
- * For internal use only.
1008
- * @private
1009
- */
1010
- private static rotatePointAt;
1011
- /**
1012
- * For internal use only.
1013
- * @private
1014
- */
1015
- private static rotatePointsAt;
1016
- /**
1017
- * Returns the center of the specified rectangle.
1018
- * @param {Rect} rect The rectangle.
1019
- * @returns {Point} The center.
1020
- */
1021
- static getCenter(rect: Rect): Point;
1022
- static rotatePoint(pointToRotate: any, centerPoint: any, angleInDegrees: any): Point;
1023
- static rotateRect(rect: any, pivot: any, angle: any): any;
1024
- static rotateSize(size: any, angle: any): any;
1025
- /**
1026
- * For internal use only.
1027
- * @private
1028
- */
1029
- private static getBrush;
1030
- /**
1031
- * For internal use only.
1032
- * @private
1033
- */
1034
- private static getBrushColor;
1035
- static opacityBrush(brush: any, opacity: any): any;
1036
- static nearestPointBezierParam(bezier: any, target: any, steps: any): number;
1037
- static bezierPoint(points: any, t: any): Point;
1038
- static symmetricPt(pt: any, ptCenter: any): Point;
1039
- static splitBezier(bezier: any, t: any): any[][];
1040
- static subBezier(p1: any, p2: any, p3: any, p4: any, t: any): any[];
1041
- static getBezierPt(points: any, segment: any, t: any): Point;
1042
- /**
1043
- * Approximates a Bezier curve with the given quality and by a series of line segments.
1044
- * @param {Array} points A list of Bezier control points.
1045
- * @param {Number} quality Specifies the approximation quality.
1046
- * @param {Number} start Specifies the start point index.
1047
- * @returns {Array} A list of points that approximate the curve as a series of straight line segments.
1048
- */
1049
- static approximateBezier(points: any[], quality: number, start: number): any[];
1050
- /**
1051
- * For internal use only.
1052
- * @private
1053
- */
1054
- private static addCubicBezierPoints;
1055
- /**
1056
- * For internal use only.
1057
- * @private
1058
- */
1059
- private static addQuadraticBezierPoints;
1060
- /**
1061
- * For internal use only.
1062
- * @private
1063
- */
1064
- private static addArcPoints;
1065
- /**
1066
- * For internal use only.
1067
- * @private
1068
- */
1069
- private static getApproximatingContext;
1070
- static arcToBezierCurves(x: any, y: any, w: any, h: any, a: any, sw: any): Point[];
1071
- static arcSegmentToBezier(x: any, y: any, w: any, h: any, s: any, e: any): Point[];
1072
- static newRect(center: any, size: any): Rect;
1073
- /**
1074
- * For internal use only.
1075
- * @private
1076
- */
1077
- private static offset1;
1078
- /**
1079
- * For internal use only.
1080
- * @private
1081
- */
1082
- private static offset;
1083
- /**
1084
- * For internal use only.
1085
- * @private
1086
- */
1087
- private static sign;
1088
- static getFitTextStep(currUnit: any): number;
1089
- static formatString(...args: any[]): any;
1090
- static colorStringToHex(string: any): string;
1091
- static readHexColor(color: any): any;
1092
- static parseColor(value: any): {
1093
- red: number;
1094
- green: number;
1095
- blue: number;
1096
- };
1097
- static hexToRgb(value: any): {
1098
- red: number;
1099
- green: number;
1100
- blue: number;
1101
- };
1102
- static stringToRgb(string: any): {
1103
- red: number;
1104
- green: number;
1105
- blue: number;
1106
- alpha: number;
1107
- };
1108
- static rgbToString(r: any, g: any, b: any, a: any): any;
1109
- static checkKnownColor(value: any): any;
1110
- static get knownColors(): {
1111
- aliceblue: string;
1112
- antiquewhite: string;
1113
- aqua: string;
1114
- aquamarine: string;
1115
- azure: string;
1116
- beige: string;
1117
- bisque: string;
1118
- black: string;
1119
- blanchedalmond: string;
1120
- blue: string;
1121
- blueviolet: string;
1122
- brown: string;
1123
- burlywood: string;
1124
- cadetblue: string;
1125
- chartreuse: string;
1126
- chocolate: string;
1127
- coral: string;
1128
- cornflowerblue: string;
1129
- cornsilk: string;
1130
- crimson: string;
1131
- cyan: string;
1132
- darkblue: string;
1133
- darkcyan: string;
1134
- darkgoldenrod: string;
1135
- darkgray: string;
1136
- darkgreen: string;
1137
- darkkhaki: string;
1138
- darkmagenta: string;
1139
- darkolivegreen: string;
1140
- darkorange: string;
1141
- darkorchid: string;
1142
- darkred: string;
1143
- darksalmon: string;
1144
- darkseagreen: string;
1145
- darkslateblue: string;
1146
- darkslategray: string;
1147
- darkslategrey: string;
1148
- darkturquoise: string;
1149
- darkviolet: string;
1150
- deeppink: string;
1151
- deepskyblue: string;
1152
- dimgray: string;
1153
- dodgerblue: string;
1154
- feldspar: string;
1155
- firebrick: string;
1156
- floralwhite: string;
1157
- forestgreen: string;
1158
- fuchsia: string;
1159
- gainsboro: string;
1160
- ghostwhite: string;
1161
- gold: string;
1162
- goldenrod: string;
1163
- gray: string;
1164
- grey: string;
1165
- green: string;
1166
- greenyellow: string;
1167
- honeydew: string;
1168
- hotpink: string;
1169
- indianred: string;
1170
- indigo: string;
1171
- ivory: string;
1172
- khaki: string;
1173
- lavender: string;
1174
- lavenderblush: string;
1175
- lawngreen: string;
1176
- lemonchiffon: string;
1177
- lightblue: string;
1178
- lightcoral: string;
1179
- lightcyan: string;
1180
- lightgoldenrodyellow: string;
1181
- lightgray: string;
1182
- lightgrey: string;
1183
- lightgreen: string;
1184
- lightpink: string;
1185
- lightsalmon: string;
1186
- lightseagreen: string;
1187
- lightskyblue: string;
1188
- lightslateblue: string;
1189
- lightslategray: string;
1190
- lightslategrey: string;
1191
- lightsteelblue: string;
1192
- lightyellow: string;
1193
- lime: string;
1194
- limegreen: string;
1195
- linen: string;
1196
- magenta: string;
1197
- maroon: string;
1198
- mediumaquamarine: string;
1199
- mediumblue: string;
1200
- mediumorchid: string;
1201
- mediumpurple: string;
1202
- mediumseagreen: string;
1203
- mediumslateblue: string;
1204
- mediumspringgreen: string;
1205
- mediumturquoise: string;
1206
- mediumvioletred: string;
1207
- midnightblue: string;
1208
- mintcream: string;
1209
- mistyrose: string;
1210
- moccasin: string;
1211
- navajowhite: string;
1212
- navy: string;
1213
- oldlace: string;
1214
- olive: string;
1215
- olivedrab: string;
1216
- orange: string;
1217
- orangered: string;
1218
- orchid: string;
1219
- palegoldenrod: string;
1220
- palegreen: string;
1221
- paleturquoise: string;
1222
- palevioletred: string;
1223
- papayawhip: string;
1224
- peachpuff: string;
1225
- peru: string;
1226
- pink: string;
1227
- plum: string;
1228
- powderblue: string;
1229
- purple: string;
1230
- red: string;
1231
- rosybrown: string;
1232
- royalblue: string;
1233
- saddlebrown: string;
1234
- salmon: string;
1235
- sandybrown: string;
1236
- seagreen: string;
1237
- seashell: string;
1238
- sienna: string;
1239
- silver: string;
1240
- skyblue: string;
1241
- slateblue: string;
1242
- slategray: string;
1243
- snow: string;
1244
- springgreen: string;
1245
- steelblue: string;
1246
- tan: string;
1247
- teal: string;
1248
- thistle: string;
1249
- tomato: string;
1250
- turquoise: string;
1251
- violet: string;
1252
- violetred: string;
1253
- wheat: string;
1254
- white: string;
1255
- whitesmoke: string;
1256
- yellow: string;
1257
- yellowgreen: string;
1258
- };
1259
- }
1260
- import { Rect } from "Drawing/Rect";
1261
- import { Point } from "Drawing/Point";
1262
- }
1263
- declare module "Drawing/Size" {
1264
- /**
1265
- * @namespace MindFusion.Drawing
1266
- */
1267
- /**
1268
- * @class Represents the size of 2D object.
1269
- */
1270
- export class Size {
1271
- static copy(size: any): Size;
1272
- /**
1273
- * Initializes a new instance of the Size class with the specified width and height.
1274
- * @constructor
1275
- * @param {Number} width Specifies width.
1276
- * @param {Number} height Specifies height.
1277
- */
1278
- constructor(width: number, height: number);
1279
- _width: number;
1280
- _height: number;
1281
- set width(arg: number);
1282
- /**
1283
- * Gets or sets the size width.
1284
- * @type {Number}
1285
- * @summary The size width.
1286
- */
1287
- get width(): number;
1288
- set height(arg: number);
1289
- /**
1290
- * Gets or sets the size height.
1291
- * @type {Number}
1292
- * @summary The size height.
1293
- */
1294
- get height(): number;
1295
- /**
1296
- * Gets a value indicating whether this Size is empty.
1297
- * @returns {Boolean} true if both width and height are 0; otherwise, false.
1298
- */
1299
- empty(): boolean;
1300
- toJson(): {
1301
- width: number;
1302
- height: number;
1303
- };
1304
- }
1305
- }
1306
- declare module "Drawing/Rect" {
1307
- /**
1308
- * @class Represents a rectangle.
1309
- * @augments ComponentBase
1310
- */
1311
- export class Rect extends ComponentBase {
1312
- /**
1313
- * Creates a Rect object with the specified edge locations.
1314
- * @param {Number} l The x-coordinate of the upper-left corner of this Rect.
1315
- * @param {Number} t The y-coordinate of the upper-left corner of this Rect.
1316
- * @param {Number} r The x-coordinate of the lower-right corner of this Rect.
1317
- * @param {Number} b The y-coordinate of the lower-right corner of this Rect.
1318
- * @returns {Rect} A rectangle with the specified coordinates.
1319
- */
1320
- static fromLTRB(l: number, t: number, r: number, b: number): Rect;
1321
- /**
1322
- * For internal use only.
1323
- * @private
1324
- */
1325
- private static fromArgs;
1326
- /**
1327
- * For internal use only.
1328
- * @private
1329
- */
1330
- private static fromPoints;
1331
- /**
1332
- * For internal use only.
1333
- * @private
1334
- */
1335
- private static fromCenterAndSize;
1336
- /**
1337
- * For internal use only.
1338
- * @private
1339
- */
1340
- private static fromPositionAndSize;
1341
- /**
1342
- * For internal use only.
1343
- * @private
1344
- */
1345
- private static fromVertex;
1346
- /**
1347
- * For internal use only.
1348
- * @private
1349
- */
1350
- private static boundingRect;
1351
- /**
1352
- * Initializes a new instance of the Rect class.
1353
- * @constructor
1354
- * @param {Number|Point} x The X-coordinate of the top left corner of the rectangle.
1355
- * @param {Number|Size} y The Y-coordinate of the top left corner of the rectangle.
1356
- * @param {Number} [width] The width of the rectangle.
1357
- * @param {Number} [height] The height of the rectangle.
1358
- */
1359
- constructor(x: number | Point, y: number | Size, width?: number, height?: number);
1360
- _x: number;
1361
- _y: number | Size;
1362
- _width: number;
1363
- _height: number;
1364
- transform: Matrix;
1365
- type: any;
1366
- pen: string;
1367
- strokeThickness: number;
1368
- brush: string;
1369
- set x(arg: number);
1370
- /**
1371
- * Gets or sets the x-coordinate of the upper-left corner of the rectangle.
1372
- * @type {Number}
1373
- * @summary The x-coordinate of the upper-left corner of the rectangle.
1374
- */
1375
- get x(): number;
1376
- set y(arg: number);
1377
- /**
1378
- * Gets or sets the y-coordinate of the upper-left corner of the rectangle.
1379
- * @type {Number}
1380
- * @summary The y-coordinate of the upper-left corner of the rectangle.
1381
- */
1382
- get y(): number;
1383
- set width(arg: number);
1384
- /**
1385
- * Gets or sets the width of the rectangle.
1386
- * @type {Number}
1387
- * @summary The width of the rectangle.
1388
- */
1389
- get width(): number;
1390
- set height(arg: number);
1391
- /**
1392
- * Gets or sets the height of the rectangle.
1393
- * @type {Number}
1394
- * @summary The height of the rectangle.
1395
- */
1396
- get height(): number;
1397
- /**
1398
- * For internal use only.
1399
- * @private
1400
- */
1401
- private getType;
1402
- /**
1403
- * Gets a value indicating whether this Rect is empty.
1404
- * @returns {Boolean} true if both width and height are 0; otherwise, false.
1405
- */
1406
- isEmpty(): boolean;
1407
- /**
1408
- * Gets the x-coordinate that is the sum of x and width values of this Rect.
1409
- * @returns {Number} The x-coordinate that is the sum of x and width of this rectangle.
1410
- */
1411
- right(): number;
1412
- /**
1413
- * Gets the x-coordinate of the left edge of this Rect object.
1414
- * @returns {Number} The x-coordinate of the left edge of this Rect object.
1415
- */
1416
- left(): number;
1417
- /**
1418
- * Gets the y-coordinate that is the sum of the y and height property values of this Rect object.
1419
- * @returns {Number} The y-coordinate that is the sum of y and height of this Rect.
1420
- */
1421
- bottom(): number;
1422
- /**
1423
- * Gets the y-coordinate of the top edge of this Rect object.
1424
- * @return {Number} The y-coordinate of the top edge of this Rect object.
1425
- */
1426
- top(): number;
1427
- /**
1428
- * Gets the center of this Rect object.
1429
- * @returns {Point} The center, which is a Point with x that is the sum of x
1430
- * and half of width and with y that is the sum of y and half of height.
1431
- */
1432
- center(): Point;
1433
- centerX(): number;
1434
- centerY(): number;
1435
- /**
1436
- * Gets the top-left edge of this Rect.
1437
- * @returns {Point} The top-left edge of this Rect.
1438
- */
1439
- topLeft(): Point;
1440
- /**
1441
- * Gets the top-right edge of this Rect object.
1442
- * @returns {Point} The top-right edge, which is a Point
1443
- * with x that is the sum of x and width and with y equal to y.
1444
- */
1445
- topRight(): Point;
1446
- /**
1447
- * Gets the top-middle of this Rect object.
1448
- * @returns {Point} The top-middle coordinate, which is a Point
1449
- * with x that is the sum of x and half of width and with y equal to y.
1450
- */
1451
- topMiddle(): Point;
1452
- /**
1453
- * Gets the bottom-left edge of this Rect object.
1454
- * @returns {Point} The bottom-left edge, which is a Point
1455
- * with x that is equal to x and with y that is the sum of y and height.
1456
- */
1457
- bottomLeft(): Point;
1458
- /**
1459
- * Gets the bottom-right edge of this Rect object.
1460
- * @returns {Point} The bottom-right edge, which is a Point
1461
- * with x that is the sum of x and width and with y that is the sum of y and height.
1462
- */
1463
- bottomRight(): Point;
1464
- adjusted(l: any, t: any, r: any, b: any): Rect;
1465
- /**
1466
- * Checks if this Rect intersects with the specified rect.
1467
- * @param {Rect} rect The other Rect.
1468
- * @returns {Boolean} true if this Rect and the specified Rect intersect; otherwise, false.
1469
- */
1470
- intersectsWith(rect: Rect): boolean;
1471
- intersectsInc(rect: any): boolean;
1472
- /**
1473
- * Determines if the rectangular region represented by rect is entirely contained within this Rect object.
1474
- * @param {Rect} rect The Rect to test.
1475
- * @returns {Boolean} true if the rectangular region represented by rect is entirely contained within this Rect;
1476
- * otherwise, false.
1477
- */
1478
- contains(rect: Rect): boolean;
1479
- /**
1480
- * Determines if the specified point is contained within this Rect object.
1481
- * @param {Point} point The point to check.
1482
- * @returns {Boolean} true if point is contained within the Rect; otherwise, false.
1483
- */
1484
- containsPoint(point: Point): boolean;
1485
- /**
1486
- * Returns a Rect object representing the union of the current rectangle with
1487
- * the specified rectangle.
1488
- * @param {Rect} rect The rectangle to union.
1489
- * @returns {Rect} A Rect object that bounds the union of the two rectangles.
1490
- */
1491
- union(rect: Rect): Rect;
1492
- /**
1493
- * Returns a Rect object representing the intersection of the current rectangle
1494
- * with the specified rectangle.
1495
- * @param {Rect} rect The rectangle to intersect.
1496
- * @returns {Rect} A Rect object representing the intersection of the two rectangles.
1497
- */
1498
- intersect(rect: Rect): Rect;
1499
- /**
1500
- * Creates a Rect object identical to the current object.
1501
- * @returns {Rect} The newly created Rect object.
1502
- */
1503
- clone(): Rect;
1504
- toJson(): {
1505
- x: number;
1506
- y: number;
1507
- width: number;
1508
- height: number;
1509
- };
1510
- /**
1511
- * For internal use only.
1512
- * @private
1513
- */
1514
- private draw;
1515
- drawShadow(context: any): void;
1516
- /**
1517
- * For internal use only.
1518
- * @private
1519
- */
1520
- private drawPath;
1521
- setClip(context: any): void;
1522
- /**
1523
- * For internal use only.
1524
- * @private
1525
- */
1526
- private getBounds;
1527
- /**
1528
- * For internal use only.
1529
- * @private
1530
- */
1531
- private setBounds;
1532
- /**
1533
- * Sets the top-left edge of this Rect object.
1534
- * @param {Point} point The top-left edge of the Rect.
1535
- */
1536
- setLocation(point: Point): void;
1537
- /**
1538
- * Sets the center of this Rect object.
1539
- * @param {Point} point The center of this Rect.
1540
- */
1541
- setCenter(point: Point): void;
1542
- inflate(halfIncrement: any): Rect;
1543
- offset(x: any, y: any): void;
1544
- scale(sx: any, sy: any): void;
1545
- scaleCentered(sx: any, sy: any): void;
1546
- /**
1547
- * For internal use only.
1548
- * @private
1549
- */
1550
- private getCornerPoints;
1551
- /**
1552
- * For internal use only.
1553
- * @private
1554
- */
1555
- private getSizeRect;
1556
- /**
1557
- * Specifies whether this Rect contains the same coordinates as the specified rectangle.
1558
- * @param {Rect} rect The Rect to test.
1559
- * @returns {Boolean} true if rect has the same coordinates as this Rect.
1560
- */
1561
- equals(rect: Rect): boolean;
1562
- sameSize(rect: any): boolean;
1563
- getSize(): Size;
1564
- createSvgElement(svgdoc: any): any;
1565
- expandToInt(): void;
1566
- }
1567
- export namespace Rect {
1568
- const empty: Rect;
1569
- }
1570
- import { ComponentBase } from "Drawing/ComponentBase";
1571
- import { Size } from "Drawing/Size";
1572
- import { Matrix } from "Drawing/Matrix";
1573
- import { Point } from "Drawing/Point";
1574
- }
1575
- declare module "Drawing/Arc" {
1576
- export class Arc {
1577
- constructor(x: any, y: any, radius: any, startAngle: any, endAngle: any, anticlockwise: any);
1578
- x: any;
1579
- y: any;
1580
- radius: any;
1581
- startAngle: any;
1582
- endAngle: any;
1583
- anticlockwise: any;
1584
- center: Point;
1585
- pen: string;
1586
- getType(): any;
1587
- draw(context: any): void;
1588
- containsPoint(point: any): boolean;
1589
- inflate(halfIncrement: any): Arc;
1590
- createSvgElement(svgdoc: any): any;
1591
- getRepaintBounds(rect: any): Rect;
1592
- }
1593
- import { Point } from "Drawing/Point";
1594
- import { Rect } from "Drawing/Rect";
1595
- }
1596
- declare module "Drawing/Bezier" {
1597
- export class Bezier {
1598
- static fromPoints(points: any, start: any): Bezier;
1599
- constructor(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any, x4: any, y4: any);
1600
- x1: any;
1601
- y1: any;
1602
- x2: any;
1603
- y2: any;
1604
- x3: any;
1605
- y3: any;
1606
- x4: any;
1607
- y4: any;
1608
- pen: string;
1609
- strokeThickness: number;
1610
- /**
1611
- * For internal use only.
1612
- * @private
1613
- */
1614
- private draw;
1615
- drawShadow(context: any): void;
1616
- /**
1617
- * For internal use only.
1618
- * @private
1619
- */
1620
- private addToContext;
1621
- createSvgElement(svgdoc: any): any;
1622
- }
1623
- }
1624
- declare module "Drawing/Border3D" {
1625
- /**
1626
- * @class Represents a 3D border.
1627
- */
1628
- export class Border3D {
1629
- /**
1630
- * Initializes a new instance of the Border3D class.
1631
- * @constructor
1632
- * @param {Rect} rect A Rect instance containing the border coordinates.
1633
- */
1634
- constructor(rect: Rect);
1635
- rect: Rect;
1636
- transform: Matrix;
1637
- type: any;
1638
- /**
1639
- * For internal use only.
1640
- * @private
1641
- */
1642
- private getType;
1643
- /**
1644
- * For internal use only.
1645
- * @private
1646
- */
1647
- private draw;
1648
- createSvgElement(svgdoc: any): any;
1649
- }
1650
- import { Rect } from "Drawing/Rect";
1651
- import { Matrix } from "Drawing/Matrix";
1652
- }
1653
- declare module "Drawing/Vector" {
1654
- /**
1655
- * @class Represents displacement in 2D space.
1656
- */
1657
- export class Vector {
1658
- static fromPoints(point1: any, point2: any): Vector;
1659
- static dot(vector1: any, vector2: any): number;
1660
- static multiplyScalar(vector: any, value: any): Vector;
1661
- static divideScalar(vector: any, value: any): Vector;
1662
- static add(vector1: any, vector2: any): Vector;
1663
- static sub(vector1: any, vector2: any): Vector;
1664
- /**
1665
- * Initializes a new instance of the Vector class with the specified X and Y coordinates.
1666
- * @constructor
1667
- * @param {Number} x The X-coordinate of the Vector.
1668
- * @param {Number} y The Y-coordinate of the Vector.
1669
- */
1670
- constructor(x: number, y: number);
1671
- /**
1672
- * The x-coordinate of the vector.
1673
- */
1674
- x: number;
1675
- /**
1676
- * The y-coordinate of the vector.
1677
- */
1678
- y: number;
1679
- type: any;
1680
- /**
1681
- * For internal use only.
1682
- * @private
1683
- */
1684
- private getType;
1685
- /**
1686
- * For internal use only.
1687
- * @private
1688
- */
1689
- private clone;
1690
- length(): number;
1691
- lengthSquared(): number;
1692
- negate(): Vector;
1693
- normalize(): Vector;
1694
- toPoint(): Point;
1695
- }
1696
- import { Point } from "Drawing/Point";
1697
- }
1698
- declare module "Drawing/CardinalSpline" {
1699
- export class CardinalSpline {
1700
- constructor(points: any, from: any, to: any);
1701
- splinePoints: any[];
1702
- /**
1703
- * A pen defining the stroke of the curve.
1704
- */
1705
- pen: string;
1706
- strokeThickness: number;
1707
- symmetricPoint(point: any, center: any): Point;
1708
- CatmullRomToBezier(p: any, alpha: any): any[];
1709
- /**
1710
- * For internal use only.
1711
- * @private
1712
- */
1713
- private draw;
1714
- drawShadow(context: any): void;
1715
- /**
1716
- * For internal use only.
1717
- * @private
1718
- */
1719
- private addToContext;
1720
- createSvgElement(svgdoc: any): any;
1721
- }
1722
- import { Point } from "Drawing/Point";
1723
- }
1724
- declare module "Drawing/Circle" {
1725
- export class Circle {
1726
- static fromPoints(points: any): Circle;
1727
- static fromThreePoints(p1: any, p2: any, p3: any): Circle;
1728
- static fromTwoPoints(p1: any, p2: any): Circle;
1729
- constructor(x: any, y: any, r: any);
1730
- x: any;
1731
- y: any;
1732
- r: any;
1733
- }
1734
- }
1735
- declare module "Drawing/Component" {
1736
- /**
1737
- * @class Represents components in CompositeNode visual tree.
1738
- * @augments ComponentBase
1739
- */
1740
- export class Component extends ComponentBase {
1741
- arrange(x: any, y: any, w: any, h: any): void;
1742
- x: any;
1743
- y: any;
1744
- actualWidth: any;
1745
- actualHeight: any;
1746
- effectiveMeasuredWidth(): any;
1747
- effectiveMeasuredHeight(): any;
1748
- add(value1: any, value2: any): any;
1749
- max(value1: any, value2: any): any;
1750
- hitTest(point: any): Component;
1751
- createSvgElement(svgdoc: any): any;
1752
- }
1753
- import { ComponentBase } from "Drawing/ComponentBase";
1754
- }
1755
- declare module "Drawing/PathParser" {
1756
- export class PathParser {
1757
- static parse(commands: any, renderer: any): void;
1758
- }
1759
- }
1760
- declare module "Drawing/Path" {
1761
- /**
1762
- * @class Represents a path.
1763
- * @augments ComponentBase
1764
- */
1765
- export class Path extends ComponentBase {
1766
- static fromPoints(points: any): Path;
1767
- /**
1768
- * Initializes a new instance of the Path class.
1769
- * @constructor
1770
- * @param {String} [pathString] A string representing the path figures.
1771
- */
1772
- constructor(pathString?: string);
1773
- shapeImpl: any;
1774
- builder: any[];
1775
- path: string;
1776
- _brush: any;
1777
- _pen: any;
1778
- _text: string;
1779
- positionX: number;
1780
- positionY: number;
1781
- minX: number;
1782
- minY: number;
1783
- maxX: number;
1784
- maxY: number;
1785
- strokeThickness: number;
1786
- lineJoin: string;
1787
- transform: Matrix;
1788
- svgPath: string;
1789
- commands: string[];
1790
- /**
1791
- * For internal use only.
1792
- * @private
1793
- */
1794
- private setBounds;
1795
- bounds: any;
1796
- /**
1797
- * Begins a path or resets the current path.
1798
- */
1799
- init(): void;
1800
- /**
1801
- * Creates a Path object identical to the current object.
1802
- * @returns {Path} The newly created Path object.
1803
- */
1804
- clone(): Path;
1805
- /**
1806
- * For internal use only.
1807
- * @private
1808
- */
1809
- private getType;
1810
- /**
1811
- * Gets a value indicating whether this Path is empty.
1812
- * @returns {Boolean} true if the path does not contain any figures; otherwise, false.
1813
- */
1814
- empty(): boolean;
1815
- /**
1816
- * For internal use only.
1817
- * @private
1818
- */
1819
- private parse;
1820
- /**
1821
- * For internal use only.
1822
- * @private
1823
- */
1824
- private addToContext;
1825
- /**
1826
- * For internal use only.
1827
- * @private
1828
- */
1829
- private draw;
1830
- drawShadow(context: any): void;
1831
- /**
1832
- * Ends the path definition.
1833
- */
1834
- done(): void;
1835
- /**
1836
- * Moves the path to the specified location.
1837
- * @param {Number} x The x-coordinate of the point.
1838
- * @param {Number} y The y-coordinate of the point.
1839
- */
1840
- moveTo(x: number, y: number): void;
1841
- /**
1842
- * Draws a line from the current point to the specified location.
1843
- * @param {Number} x The x-coordinate of the point.
1844
- * @param {Number} y The y-coordinate of the point.
1845
- */
1846
- lineTo(x: number, y: number): void;
1847
- /**
1848
- * Draws a cubic bezier curve.
1849
- * @param {Number} x1 The x-coordinate of the first bezier control point.
1850
- * @param {Number} y1 The y-coordinate of the first bezier control point.
1851
- * @param {Number} x2 The x-coordinate of the second bezier control point.
1852
- * @param {Number} y2 The y-coordinate of the second bezier control point.
1853
- * @param {Number} x3 The x-coordinate of the ending point.
1854
- * @param {Number} y3 The y-coordinate of the ending point.
1855
- */
1856
- bezierTo(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void;
1857
- /**
1858
- * Draws an arc.
1859
- * @param {Number} x The x-coordinate of the center of the circle.
1860
- * @param {Number} y The y-coordinate of the center of the circle.
1861
- * @param {Number} radius The radius of the circle
1862
- * @param {Number} startAngle The starting angle in radians.
1863
- * @param {Number} endAngle The ending angle in radians.
1864
- * @param {Boolean} anticlockwise Specifies whether the drawing should be counterclockwise or clockwise.
1865
- */
1866
- arcTo(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean): void;
1867
- /**
1868
- * Draws a quadratic bezier curve.
1869
- * @param {Number} x1 The x-coordinate of the bezier control point.
1870
- * @param {Number} y1 The y-coordinate of the bezier control point.
1871
- * @param {Number} x The x-coordinate of the ending point.
1872
- * @param {Number} y The y-coordinate of the ending point.
1873
- */
1874
- quadraticCurveTo(x1: number, y1: number, x: number, y: number): void;
1875
- addLine(p1: any, p2: any): void;
1876
- /**
1877
- * Adds a rectangle figure to the path.
1878
- * @param {Number} x The x-coordinate of the rectangle.
1879
- * @param {Number} y The y-coordinate of the rectangle.
1880
- * @param {Number} width The width of the rectangle.
1881
- * @param {Number} height The height of the rectangle.
1882
- */
1883
- addRect(x: number, y: number, width: number, height: number): void;
1884
- /**
1885
- * Adds a round rectangle figure to the path.
1886
- * For internal use only.
1887
- * @private
1888
- */
1889
- private addRoundRect;
1890
- roundRect(x1: any, y1: any, x2: any, y2: any, radius: any): void;
1891
- /**
1892
- * Adds an ellipse figure to the path.
1893
- * @param {Number} x The x-coordinate of the center of the ellipse.
1894
- * @param {Number} y The y-coordinate of the center of the ellipse.
1895
- * @param {Number} width The width of the ellipse.
1896
- * @param {Number} height The height of the ellipse.
1897
- */
1898
- addEllipse(x: number, y: number, width: number, height: number): void;
1899
- ellipse(x: any, y: any, width: any, height: any): void;
1900
- /**
1901
- * Closes the path.
1902
- */
1903
- close(): void;
1904
- set brush(arg: any);
1905
- /**
1906
- * Gets or sets the brush used to fill a closed path.
1907
- * @type {Object}
1908
- * @summary A color string or an object literal specifying gradient.
1909
- */
1910
- get brush(): any;
1911
- set pen(arg: any);
1912
- /**
1913
- * Gets or sets the pen used to draw the path.
1914
- * @type {Object}
1915
- * @summary A color string.
1916
- */
1917
- get pen(): any;
1918
- set text(arg: string);
1919
- /**
1920
- * Gets or sets the text displayed inside this path.
1921
- * @type {String}
1922
- * @summary A string containing path's text.
1923
- */
1924
- get text(): string;
1925
- /**
1926
- * For internal use only.
1927
- * @private
1928
- */
1929
- private create;
1930
- /**
1931
- * Gets the bounding rect of the path.
1932
- * @returns {Rect} The bounding rect.
1933
- */
1934
- getBounds(): Rect;
1935
- /**
1936
- * For internal use only.
1937
- * @private
1938
- */
1939
- private expandRect;
1940
- updatePosition(): void;
1941
- updatePathDefinition(): void;
1942
- createSvgElement(svgdoc: any): any;
1943
- }
1944
- import { ComponentBase } from "Drawing/ComponentBase";
1945
- import { Matrix } from "Drawing/Matrix";
1946
- import { Rect } from "Drawing/Rect";
1947
- }
1948
- declare module "Drawing/Container" {
1949
- /**
1950
- * @class Represents container components in drawing tree.
1951
- * @augments Component
1952
- */
1953
- export class Container extends Component {
1954
- constructor(x: any, y: any);
1955
- content: any[];
1956
- draw(context: any, drawShadows: any, shadowsOnly: any): void;
1957
- invalidParent: any;
1958
- drawChildren(context: any, drawShadows: any, shadowsOnly: any): void;
1959
- removedFromDiagram(): void;
1960
- setParentComponent(value: any): void;
1961
- parentComponent: any;
1962
- invalidate(force: any): void;
1963
- }
1964
- import { Component } from "Drawing/Component";
1965
- }
1966
- declare module "Drawing/Ellipse" {
1967
- /**
1968
- * @class Represents an Ellipse.
1969
- * @augments ComponentBase
1970
- */
1971
- export class Ellipse extends ComponentBase {
1972
- /**
1973
- * Initializes a new instance of the Ellipse class.
1974
- * @constructor
1975
- * @param {Number} x The X-coordinate of the top left corner of the Ellipse.
1976
- * @param {Number} y The Y-coordinate of the top left corner of the Ellipse.
1977
- * @param {Number} width The width of the Ellipse.
1978
- * @param {Number} height The height of the Ellipse.
1979
- */
1980
- constructor(x: number, y: number, width: number, height: number, ...args: any[]);
1981
- _x: number;
1982
- _y: number;
1983
- _width: number;
1984
- _height: number;
1985
- transform: Matrix;
1986
- pen: string;
1987
- brush: string;
1988
- set x(arg: number);
1989
- /**
1990
- * Gets or sets the x-coordinate of the upper-left corner of the ellipse.
1991
- * @type {Number}
1992
- * @summary The x-coordinate of the upper-left corner of the ellipse.
1993
- */
1994
- get x(): number;
1995
- set y(arg: number);
1996
- /**
1997
- * Gets or sets the y-coordinate of the upper-left corner of the ellipse.
1998
- * @type {Number}
1999
- * @summary The x-coordinate of the upper-left corner of the ellipse.
2000
- */
2001
- get y(): number;
2002
- set width(arg: number);
2003
- /**
2004
- * Gets or sets the width of the ellipse.
2005
- * @type {Number}
2006
- * @summary The width of the ellipse.
2007
- */
2008
- get width(): number;
2009
- set height(arg: number);
2010
- /**
2011
- * Gets or sets the height of the ellipse.
2012
- * @type {Number}
2013
- * @summary The height of the ellipse.
2014
- */
2015
- get height(): number;
2016
- /**
2017
- * Creates a Ellipse object identical to the current object.
2018
- * @returns {Ellipse} The newly created Ellipse object.
2019
- */
2020
- clone(): Ellipse;
2021
- toJson(): {
2022
- x: number;
2023
- y: number;
2024
- width: number;
2025
- height: number;
2026
- };
2027
- /**
2028
- * For internal use only.
2029
- * @private
2030
- */
2031
- private draw;
2032
- /**
2033
- * For internal use only.
2034
- * @private
2035
- */
2036
- private getBounds;
2037
- createSvgElement(svgdoc: any): any;
2038
- }
2039
- import { ComponentBase } from "Drawing/ComponentBase";
2040
- import { Matrix } from "Drawing/Matrix";
2041
- }
2042
- declare module "Drawing/Font" {
2043
- /**
2044
- * @class Represents a font.
2045
- */
2046
- export class Font {
2047
- /**
2048
- * Returns a Font from a JSON object or string describing this font.
2049
- * @returns {Font} The font object.
2050
- */
2051
- static fromObject(obj: any): Font;
2052
- /**
2053
- * @private
2054
- */
2055
- private static copy;
2056
- /**
2057
- * @private
2058
- */
2059
- private static get defaultFont();
2060
- /**
2061
- * Initializes a new instance of the Font class with the specified attributes.
2062
- * @constructor
2063
- * @param {String} name The font name.
2064
- * @param {Number} [size] The font size.
2065
- * @param {Boolean | FontStyle} [bold] true if this font is bold, or false otherwise.
2066
- * @param {Boolean} [italic] true if this font is italic, or false otherwise.
2067
- * @param {Boolean} [underline] true if this font is underlined, or false otherwise.
2068
- */
2069
- constructor(name: string, size?: number, bold?: boolean | FontStyle, italic?: boolean, underline?: boolean);
2070
- _name: string;
2071
- _size: number;
2072
- _fontStyle: number | boolean;
2073
- set fontStyle(arg: number);
2074
- /**
2075
- * Gets or sets the style of this font.
2076
- * @type {FontStyle}
2077
- * @summary A member of the FontStyle enumeration.
2078
- */
2079
- get fontStyle(): number;
2080
- set name(arg: string);
2081
- /**
2082
- * Gets or sets the name of this font.
2083
- * @type {String}
2084
- * @summary A string containing font name.
2085
- */
2086
- get name(): string;
2087
- set size(arg: number);
2088
- /**
2089
- * Gets or sets the size of this font.
2090
- * @type {Number}
2091
- * @summary The font size.
2092
- */
2093
- get size(): number;
2094
- /**
2095
- * Gets whether the font is bold.
2096
- * @type {Boolean}
2097
- * @summary true if Bold flag is set in fontStyle, or false otherwise.
2098
- */
2099
- get bold(): boolean;
2100
- /**
2101
- * Gets whether the font is italic.
2102
- * @type {Boolean}
2103
- * @summary true if Italic flag is set in fontStyle, or false otherwise.
2104
- */
2105
- get italic(): boolean;
2106
- /**
2107
- * Gets whether the font is underlined.
2108
- * @type {Boolean}
2109
- * @summary true if Underline flag is set in fontStyle, or false otherwise.
2110
- */
2111
- get underline(): boolean;
2112
- toJson(): {
2113
- name: string;
2114
- size: number;
2115
- bold: boolean;
2116
- italic: boolean;
2117
- underline: boolean;
2118
- };
2119
- toString(scale: any): string;
2120
- /**
2121
- * Returns a JSON object describing this font.
2122
- * @returns {Object} The object describing this font.
2123
- */
2124
- toObject(): any;
2125
- /**
2126
- * Applies the font properties to a CanvasRenderingContext2D drawing object.
2127
- * @param {CanvasRenderingContext2D} context The CanvasRenderingContext2D drawing object.
2128
- */
2129
- apply(context: CanvasRenderingContext2D): void;
2130
- }
2131
- import { FontStyle } from "Drawing/Enum";
2132
- }
2133
- declare module "Drawing/Gradient" {
2134
- /**
2135
- * @namespace MindFusion.Drawing
2136
- */
2137
- export class Gradient {
2138
- constructor(col1: any, col2: any, ang: any);
2139
- color1: any;
2140
- color2: any;
2141
- angle: any;
2142
- }
2143
- }
2144
- declare module "Drawing/Image" {
2145
- /**
2146
- * @class Represents an image.
2147
- * @augments ComponentBase
2148
- */
2149
- export class Image extends ComponentBase {
2150
- /**
2151
- * Initializes a new instance of the Image class.
2152
- * @constructor
2153
- * @param {Rect} bounds The bounds of the image.
2154
- */
2155
- constructor(bounds: Rect);
2156
- loaded: boolean;
2157
- /**
2158
- * The image to be displayed.
2159
- */
2160
- image: any;
2161
- /**
2162
- * The object's bounds.
2163
- */
2164
- bounds: Rect;
2165
- transform: Matrix;
2166
- clipPath: Path;
2167
- type: any;
2168
- imageAlign: number;
2169
- /**
2170
- * For internal use only.
2171
- * @private
2172
- */
2173
- private getType;
2174
- /**
2175
- * For internal use only.
2176
- * @private
2177
- */
2178
- private setBounds;
2179
- rotationAngle: any;
2180
- getBounds(): Rect;
2181
- /**
2182
- * For internal use only.
2183
- * @private
2184
- */
2185
- private draw;
2186
- applyDiagramTransform(context: any, imgDocRect: any): any;
2187
- measure(maxWidth: any, maxHeight: any): void;
2188
- desiredWidth: number;
2189
- desiredHeight: number;
2190
- effectiveMeasuredWidth(): number;
2191
- effectiveMeasuredHeight(): number;
2192
- getImageRect(parentRect: any, imgSize: any): Rect;
2193
- set defaultProperty(arg: any);
2194
- get defaultProperty(): any;
2195
- get defaultValue(): string;
2196
- createSvgElement(svgdoc: any): any;
2197
- }
2198
- import { ComponentBase } from "Drawing/ComponentBase";
2199
- import { Rect } from "Drawing/Rect";
2200
- import { Matrix } from "Drawing/Matrix";
2201
- import { Path } from "Drawing/Path";
2202
- }
2203
- declare module "Drawing/Line" {
2204
- export class Line {
2205
- constructor(x1: any, y1: any, x2: any, y2: any);
2206
- x1: any;
2207
- y1: any;
2208
- x2: any;
2209
- y2: any;
2210
- transform: Matrix;
2211
- _pen: string;
2212
- strokeThickness: number;
2213
- draw(context: any, drawShadow: any): void;
2214
- drawShadow(context: any): void;
2215
- setBounds(point1: any, point2: any): void;
2216
- set pen(arg: any);
2217
- /**
2218
- * Gets or sets the stroke color used to draw this line.
2219
- * @type {Object}
2220
- * @summary A color string.
2221
- */
2222
- get pen(): any;
2223
- createSvgElement(svgdoc: any): any;
2224
- }
2225
- import { Matrix } from "Drawing/Matrix";
2226
- }
2227
- declare module "Drawing/Shadow" {
2228
- /**
2229
- * @namespace MindFusion.Drawing
2230
- */
2231
- export class Shadow {
2232
- constructor(color: any, offsetX: any, offsetY: any);
2233
- color: any;
2234
- offsetX: any;
2235
- offsetY: any;
2236
- apply(context: any): void;
2237
- createSvgElement(svgdoc: any): any;
2238
- }
2239
- }
2240
- declare module "Drawing/Thickness" {
2241
- /**
2242
- * @class Describes the thickness of a rectangular frame.
2243
- */
2244
- export class Thickness {
2245
- static copy(size: any): Thickness;
2246
- /**
2247
- * Initializes a new instance of the Thickness class with the specified widths.
2248
- * @constructor
2249
- * @param {Number} left Specifies the width of the left side of the frame.
2250
- * @param {Number} [top] Specifies the width of the top side of the frame.
2251
- * @param {Number} [right] Specifies the width of the right side of the frame.
2252
- * @param {Number} [bottom] Specifies the width of the bottom side of the frame.
2253
- * @param {Boolean} [isRelative] A flag indicating whether the thickness properties are expressed as relative or absolute quantities.
2254
- */
2255
- constructor(left: number, top?: number, right?: number, bottom?: number, isRelative?: boolean);
2256
- set left(arg: number);
2257
- /**
2258
- * Gets or sets the width of the left side of the frame.
2259
- * @type {Number}
2260
- * @summary The width of the left side of the frame.
2261
- */
2262
- get left(): number;
2263
- set top(arg: number);
2264
- /**
2265
- * Gets or sets the width of the top side of the frame.
2266
- * @type {Number}
2267
- * @summary The width of the top side of the frame.
2268
- */
2269
- get top(): number;
2270
- set right(arg: number);
2271
- /**
2272
- * Gets or sets the width of the right side of the frame.
2273
- * @type {Number}
2274
- * @summary The width of the right side of the frame.
2275
- */
2276
- get right(): number;
2277
- set bottom(arg: number);
2278
- /**
2279
- * Gets or sets the width of the bottom side of the frame.
2280
- * @type {Number}
2281
- * @summary The width of the bottom side of the frame.
2282
- */
2283
- get bottom(): number;
2284
- set isRelative(arg: boolean);
2285
- /**
2286
- * Gets or sets a flag indicating whether the thickness properties are expressed as relative or absolute quantities.
2287
- * @type {Boolean}
2288
- * @summary true if the thickness is relative, or false otherwise.
2289
- */
2290
- get isRelative(): boolean;
2291
- /**
2292
- * Applies the current thickness to the specified rectangle by deflating the rectangle.
2293
- * @param {Rect} rect The rectangle to deflate.
2294
- */
2295
- applyTo(rect: Rect): void;
2296
- /**
2297
- * Applies the current thickness to the specified rectangle by inflating the rectangle.
2298
- * @param {Rect} rect The rectangle to inflate.
2299
- */
2300
- addToRect(rect: Rect): void;
2301
- add(thickness: any): Thickness;
2302
- /**
2303
- * Converts the current thickness to absolute value relative to the specified size.
2304
- */
2305
- toAbsolute(size: any): Thickness;
2306
- toJson(): {
2307
- left: number;
2308
- top: number;
2309
- right: number;
2310
- bottom: number;
2311
- isRelative: boolean;
2312
- };
2313
- empty(): boolean;
2314
- _left: number;
2315
- _right: number;
2316
- _top: number;
2317
- _bottom: number;
2318
- /**
2319
- * @private
2320
- */
2321
- private width;
2322
- /**
2323
- * @private
2324
- */
2325
- private height;
2326
- _isRelative: boolean;
2327
- }
2328
- import { Rect } from "Drawing/Rect";
2329
- }
2330
- declare module "Drawing/Text" {
2331
- /**
2332
- * @class Represents a text container.
2333
- * @augments ComponentBase
2334
- */
2335
- export class Text extends ComponentBase {
2336
- /**
2337
- * For internal use only.
2338
- * @private
2339
- */
2340
- private static wrapText;
2341
- /**
2342
- * For internal use only.
2343
- * @private
2344
- */
2345
- private static wrapLine;
2346
- /**
2347
- * For internal use only.
2348
- * @private
2349
- */
2350
- private static getMinWidth;
2351
- /**
2352
- * Initializes a new instance of the Text class.
2353
- * @constructor
2354
- * @param {String} text The text to be displayed in the container.
2355
- * @param {Rect} bounds The bounds of the container.
2356
- */
2357
- constructor(text: string, bounds: Rect);
2358
- set text(arg: string);
2359
- /**
2360
- * Gets or sets the text to render.
2361
- * @type {String}
2362
- * @summary The text.
2363
- */
2364
- get text(): string;
2365
- bounds: Rect;
2366
- x: number;
2367
- y: number;
2368
- width: number;
2369
- height: number;
2370
- clipPath: Path;
2371
- set textAlignment(arg: number);
2372
- /**
2373
- * Gets or sets the horizontal alignment of this text.
2374
- * @type {Alignment}
2375
- * @summary A member of the Alignment enumeration.
2376
- */
2377
- get textAlignment(): number;
2378
- set lineAlignment(arg: number);
2379
- /**
2380
- * Gets or sets the vertical alignment of this text.
2381
- * @type {Alignment}
2382
- * @summary A member of the Alignment enumeration.
2383
- */
2384
- get lineAlignment(): number;
2385
- baseline: string;
2386
- padding: Thickness;
2387
- type: any;
2388
- pen: string;
2389
- lines: any;
2390
- set font(arg: Font);
2391
- /**
2392
- * Gets or sets the font used to render text.
2393
- * @type {Font}
2394
- * @summary The font of the text.
2395
- */
2396
- get font(): Font;
2397
- /**
2398
- * For internal use only.
2399
- * @private
2400
- */
2401
- private getType;
2402
- /**
2403
- * Creates a Text object identical to the current object.
2404
- * @returns {Text} The newly created Text object.
2405
- */
2406
- clone(): Text;
2407
- /**
2408
- * For internal use only.
2409
- * @private
2410
- */
2411
- private getLines;
2412
- /**
2413
- * For internal use only.
2414
- * @private
2415
- */
2416
- private draw;
2417
- scale: any;
2418
- lineHeight: number;
2419
- layoutRect: Rect;
2420
- /**
2421
- * For internal use only.
2422
- * @private
2423
- */
2424
- private drawLines;
2425
- /**
2426
- * For internal use only.
2427
- * @private
2428
- */
2429
- private getRotatedBounds;
2430
- /**
2431
- * Sets a value indicating the bounding rectangle of the text container.
2432
- * @param {Rect} bounds The bounding rectangle.
2433
- * @param {Number} [angle] The rotation angle to be applied to the bounding rectangle.
2434
- * @param {Point} [pivot] The center point of the rotation.
2435
- */
2436
- setBounds(bounds: Rect, angle?: number, pivot?: Point): void;
2437
- _rotationAngle: number;
2438
- _rotationPivot: Point;
2439
- /**
2440
- * Gets a value indicating the bounding rectangle of the text container.
2441
- * @returns {Rect} The bounding rectangle.
2442
- */
2443
- getBounds(): Rect;
2444
- /**
2445
- * Gets a value indicating the rotation of the text container.
2446
- * @type {Number}
2447
- * @summary The angle.
2448
- */
2449
- get rotationAngle(): number;
2450
- _font: any;
2451
- _text: any;
2452
- rotationTransform(rect: any): Matrix;
2453
- drawStyledText(context: any, sequences: any, layoutRect: any, halign: any, valign: any): void;
2454
- parseStyledText(text: any): any[];
2455
- cachedText: any;
2456
- cachedSequences: any[];
2457
- collectSequences(node: any, sequences: any, currentFormat: any): void;
2458
- createSequence(text: any, format: any): {
2459
- text: any;
2460
- italic: boolean;
2461
- bold: boolean;
2462
- underline: any;
2463
- scriptOffset: any;
2464
- link: any;
2465
- color: any;
2466
- size: any;
2467
- };
2468
- addToFormat(specifier: any, format: any): void;
2469
- removeFromFormat(specifier: any, format: any): void;
2470
- drawUnderline(context: any, x: any, y: any, length: any): void;
2471
- getStyledLines(context: any, sequences: any, width: any): ({
2472
- remaining: any;
2473
- advance: number;
2474
- text: any;
2475
- dx: any;
2476
- dy: any;
2477
- } | {
2478
- remaining: string;
2479
- advance: any;
2480
- text: any;
2481
- dx: any;
2482
- dy: any;
2483
- })[][];
2484
- findWhitespace(text: any, start: any): any;
2485
- fitInLine(context: any, text: any, x: any, y: any, maxX: any, lineStart: any): {
2486
- remaining: any;
2487
- advance: number;
2488
- text: any;
2489
- dx: any;
2490
- dy: any;
2491
- } | {
2492
- remaining: string;
2493
- advance: any;
2494
- text: any;
2495
- dx: any;
2496
- dy: any;
2497
- };
2498
- fitInLineWrapByChar(context: any, text: any, x: any, y: any, maxX: any, lineStart: any): {
2499
- remaining: any;
2500
- advance: number;
2501
- text: any;
2502
- dx: any;
2503
- dy: any;
2504
- } | {
2505
- remaining: string;
2506
- advance: any;
2507
- text: any;
2508
- dx: any;
2509
- dy: any;
2510
- };
2511
- applyFormat(context: any, sequence: any): void;
2512
- measurePlainText(context: any, maxWidth: any): Size;
2513
- measureStyledText(context: any, maxWidth: any): Size;
2514
- _textAlignment: any;
2515
- _lineAlignment: any;
2516
- set defaultProperty(arg: string);
2517
- get defaultProperty(): string;
2518
- get defaultValue(): string;
2519
- measure(maxWidth: any, maxHeight: any): Size;
2520
- desiredWidth: any;
2521
- desiredHeight: any;
2522
- effectiveMeasuredWidth(): any;
2523
- effectiveMeasuredHeight(): any;
2524
- createSvgElement(svgdoc: any): any;
2525
- }
2526
- export namespace Text {
2527
- const LineBreak: {};
2528
- }
2529
- import { ComponentBase } from "Drawing/ComponentBase";
2530
- import { Rect } from "Drawing/Rect";
2531
- import { Path } from "Drawing/Path";
2532
- import { Thickness } from "Drawing/Thickness";
2533
- import { Font } from "Drawing/Font";
2534
- import { Point } from "Drawing/Point";
2535
- import { Matrix } from "Drawing/Matrix";
2536
- import { Size } from "Drawing/Size";
2537
- }
2538
- declare module "Drawing/Video" {
2539
- /**
2540
- * @class A component that displays video stream.
2541
- * @augments ComponentBase
2542
- */
2543
- export class Video extends ComponentBase {
2544
- /**
2545
- * Initializes a new instance of the Video class.
2546
- * @constructor
2547
- * @param {Rect} bounds The bounds of the Video.
2548
- */
2549
- constructor(bounds: Rect);
2550
- loaded: boolean;
2551
- video: HTMLVideoElement;
2552
- /**
2553
- * The object's bounds.
2554
- */
2555
- bounds: Rect;
2556
- transform: Matrix;
2557
- type: any;
2558
- _mediaLocation: string;
2559
- /**
2560
- * For internal use only.
2561
- * @private
2562
- */
2563
- private getType;
2564
- /**
2565
- * Creates a Video object identical to the current object.
2566
- * @returns {Video}
2567
- */
2568
- clone(): Video;
2569
- /**
2570
- * For internal use only.
2571
- * @private
2572
- */
2573
- private setBounds;
2574
- getBounds(): Rect;
2575
- /**
2576
- * For internal use only.
2577
- * @private
2578
- */
2579
- private draw;
2580
- set mediaLocation(arg: string);
2581
- /**
2582
- * Gets or sets URL of the video stream displayed in this component.
2583
- * @type {String}
2584
- * @summary A URL string that identifies the video to play.
2585
- */
2586
- get mediaLocation(): string;
2587
- /**
2588
- * Starts playing the video stream.
2589
- */
2590
- play(): boolean;
2591
- /**
2592
- * Detects if video is playing.
2593
- */
2594
- isPlaying(): boolean;
2595
- /**
2596
- * Pauses the video.
2597
- */
2598
- pause(): void;
2599
- set defaultProperty(arg: string);
2600
- get defaultProperty(): string;
2601
- get defaultValue(): string;
2602
- setParentComponent(value: any): void;
2603
- parentComponent: any;
2604
- invalidate(force: any): void;
2605
- removedFromDiagram(): void;
2606
- }
2607
- import { ComponentBase } from "Drawing/ComponentBase";
2608
- import { Rect } from "Drawing/Rect";
2609
- import { Matrix } from "Drawing/Matrix";
2610
- }
2611
- declare module "Drawing/Pen" {
2612
- /**
2613
- * @namespace MindFusion.Drawing
2614
- */
2615
- /**
2616
- * Copyright (c) 2015-2022, MindFusion LLC - Bulgaria.
2617
- *
2618
- * This source code is provided to you as part of the MindFusion software components
2619
- * package you have purchased. You may use the source code to trace and/or fix
2620
- * problems or customize the library as needed for your application. To get permission
2621
- * to use the source code in any other way, please contact us at support@mindfusion.eu.
2622
- */
2623
- import { Color } from "Drawing/Color";
2624
- import { Brush } from "Drawing/Brush";
2625
- import { DashStyle, LineJoin } from "Drawing/Enum";
2626
- /**
2627
- * @class Represents a pen.
2628
- * @property {Color} color Gets or sets the color of this Pen.
2629
- * @property {Number} width Gets or sets the width of this Pen.
2630
- * @property {DashStyle} dashStyle Gets or sets the dash style of this Pen.
2631
- */
2632
- export class Pen {
2633
- /**
2634
- * Initializes a new instance of the Pen class.
2635
- * @param {Brush | Color | string} brush The color of this pen.
2636
- * @param {Number} [width] The width of this pen.
2637
- */
2638
- constructor(brush: Brush | Color | string, width?: number);
2639
- /**
2640
- * Applies the pen properties to a CanvasRenderingContext2D drawing object.
2641
- * @param {CanvasRenderingContext2D} context The CanvasRenderingContext2D drawing object.
2642
- */
2643
- apply(context: CanvasRenderingContext2D): void;
2644
- /**
2645
- * Returns a string representation of this pen.
2646
- * @returns {String} The string representation of this pen.
2647
- * @remarks Used for backward compatibility with the JSLib class.
2648
- */
2649
- toString(): string;
2650
- /**
2651
- * Returns a Pen from a string describing this pen.
2652
- * @returns {Pen} The pen object.
2653
- * @remarks Used for backward compatibility with the JSLib class.
2654
- */
2655
- static fromObject(obj: any): Pen;
2656
- /**
2657
- * Determines whether the specified object is equal to this LinearGradientBrush.
2658
- * @param {Object} The object to compare with.
2659
- * @returns {Boolean} true if the specified object is equal to this LinearGradientBrush; otherwise, false.
2660
- */
2661
- equals(obj: any): boolean;
2662
- private m_color;
2663
- /**
2664
- * Gets the color of this pen.
2665
- * @returns {Color} The color of this pen.
2666
- */
2667
- get color(): Color;
2668
- /**
2669
- * Sets the color of this pen.
2670
- * @param {Color} value The color of this pen.
2671
- */
2672
- set color(value: Color);
2673
- private m_width;
2674
- /**
2675
- * Gets the width of this pen.
2676
- * @returns {Number} The width of this pen.
2677
- */
2678
- get width(): number;
2679
- /**
2680
- * Sets the width of this pen.
2681
- * @param {Number} value The width of this pen.
2682
- */
2683
- set width(value: number);
2684
- private m_dashStyle;
2685
- /**
2686
- * Gets the dash style of this pen.
2687
- * @returns {DashStyle} The dash style of this pen.
2688
- */
2689
- get dashStyle(): DashStyle;
2690
- /**
2691
- * Sets the line join of this pen.
2692
- * @param {DashStyle} value The line join of this pen.
2693
- */
2694
- set dashStyle(value: DashStyle);
2695
- private m_lineJoin;
2696
- /**
2697
- * Gets the line join of this pen.
2698
- * @returns {LineJoin} The line join of this pen.
2699
- */
2700
- get lineJoin(): LineJoin;
2701
- /**
2702
- * Sets the line join of this pen.
2703
- * @param {LineJoin} value The line join of this pen.
2704
- */
2705
- set lineJoin(value: LineJoin);
2706
- }
2707
- }
2708
- declare module "Drawing/Graphics" {
2709
- /**
2710
- * @namespace MindFusion.Drawing
2711
- */
2712
- /**
2713
- * Copyright (c) 2015-2022, MindFusion LLC - Bulgaria.
2714
- *
2715
- * This source code is provided to you as part of the MindFusion software components
2716
- * package you have purchased. You may use the source code to trace and/or fix
2717
- * problems or customize the library as needed for your application. To get permission
2718
- * to use the source code in any other way, please contact us at support@mindfusion.eu.
2719
- */
2720
- import { Rect } from "Drawing/Rect";
2721
- import { Point } from "Drawing/Point";
2722
- import { Matrix } from "Drawing/Matrix";
2723
- import { Size } from "Drawing/Size";
2724
- import { Pen } from "Drawing/Pen";
2725
- import { Brush } from "Drawing/Brush";
2726
- import { Font } from "Drawing/Font";
2727
- import { ImageAlign, StringFormat } from "Drawing/Enum";
2728
- /**
2729
- * @class Contains helper functions for drawing on a Canvas element.
2730
- * @property {CanvasRenderingContext2D} context Gets or sets the underlying CanvasRenderingContext2D drawing object.
2731
- */
2732
- export class Graphics {
2733
- /**
2734
- * Initializes a new instance of the Graphics class.
2735
- * @param {CanvasRenderingContext2D} context The CanvasRenderingContext2D drawing object.
2736
- */
2737
- constructor(context: CanvasRenderingContext2D);
2738
- /**
2739
- * Clears the canvas.
2740
- */
2741
- clear(): void;
2742
- /**
2743
- * Starts a new figure.
2744
- * @param {Pen} [pen] The pen to stroke the figure with.
2745
- * @param {Brush} [brush] The brush to fill the figure with.
2746
- * @param {Rect} [bounds] The bounds to which the brush should be applied.
2747
- */
2748
- beginFigure(pen?: Pen, brush?: Brush, bounds?: Rect): void;
2749
- /**
2750
- * Closes the current figure.
2751
- * @param {Pen} [pen] The pen to stroke the figure with.
2752
- * @param {Brush} [brush] The brush to fill the figure with.
2753
- * @param {Rect} [bounds] The bounds to which the brush should be applied.
2754
- */
2755
- closeFigure(pen?: Pen, brush?: Brush, bounds?: Rect): void;
2756
- /**
2757
- * Draws a straight line.
2758
- * @param {Pen} pen The pen to draw the line with.
2759
- * @param {Point} point1 The starting point of the line.
2760
- * @param {Point} point2 The ending point of the line.
2761
- */
2762
- drawLine(pen: Pen, point1: Point, point2: Point): any;
2763
- /**
2764
- * Draws a straight line.
2765
- * @param {Pen} pen The pen to draw the line with.
2766
- * @param {Number} x1 The X coordinate of the starting point of the line.
2767
- * @param {Number} y1 The Y coordinate of the starting point of the line.
2768
- * @param {Number} x2 The X coordinate of the ending point of the line.
2769
- * @param {Number} y2 The Y coordinate of the ending point of the line.
2770
- */
2771
- drawLine(pen: Pen, x1: number, y1: number, x2: number, y2: number): any;
2772
- /**
2773
- * Draws a series of straight lines.
2774
- * @param {Pen} pen The pen to draw the lines with.
2775
- * @param {Point[]} points The points of the lines to draw.
2776
- */
2777
- drawLines(pen: Pen, points: Point[]): void;
2778
- /**
2779
- * Draws a polygon.
2780
- * @param {Pen} pen The pen to draw the polygon with.
2781
- * @param {Point[]} points The points describing the polygon.
2782
- */
2783
- drawPolygon(pen: Pen, points: Point[]): void;
2784
- /**
2785
- * Fills a polygon.
2786
- * @param {Brush} brush The brush to fill the polygon with.
2787
- * @param {Point[]} points The points describing the polygon.
2788
- */
2789
- fillPolygon(brush: Brush, points: Point[]): void;
2790
- /**
2791
- * Draws a string.
2792
- * @param {String} text The string to draw.
2793
- * @param {Font} font The font to use.
2794
- * @param {Brush} brush The brush to use.
2795
- * @param {Point|Rect} location The position at which to draw.
2796
- * @param {StringFormat} [format] The format to use.
2797
- */
2798
- drawString(text: string, font: Font, brush: Brush, location: Point | Rect, format?: StringFormat): void;
2799
- private drawUnderline;
2800
- /**
2801
- * Draws a spline curve.
2802
- * @param {Pen} pen The pen to stroke the curve with.
2803
- * @param {Point[]} points The points describing the curve.
2804
- */
2805
- drawCurve(pen: Pen, points: Point[]): void;
2806
- /**
2807
- * Draws a rectangle.
2808
- * @param {Pen} pen The pen to stroke the rectangle with.
2809
- * @param {Rect} rect The rectangle to draw.
2810
- */
2811
- drawRectangle(pen: Pen, rect: Rect): void;
2812
- /**
2813
- * Fills a rectangle.
2814
- * @param {Brush} brush The pen to fill the rectangle with.
2815
- * @param {Rect} rect The rectangle to fill.
2816
- */
2817
- fillRectangle(brush: Brush, rect: Rect): void;
2818
- /**
2819
- * Draws an ellipse.
2820
- * @param {Pen} pen The pen to stroke the ellipse with.
2821
- * @param {Rect} rect The rectangle describing the ellipse.
2822
- */
2823
- drawEllipse(pen: Pen, rect: Rect): void;
2824
- /**
2825
- * Fills an ellipse.
2826
- * @param {Brush} brush The brush to fill the ellipse with.
2827
- * @param {Rect} rect The rectangle describing the ellipse.
2828
- */
2829
- fillEllipse(brush: Brush, rect: Rect): void;
2830
- /**
2831
- * Draws a pie.
2832
- * @param {Pen} pen The pen to stroke the pie with.
2833
- * @param {Rect} rect The bounds of the pie.
2834
- * @param {Number} radius The radius of the pie.
2835
- * @param {Number} startAngle The startAngle of the pie.
2836
- * @param {Number} endAngle The endAngle of the pie.
2837
- * @param {Boolean} [doughnut] True if the pie should be a doughnut, otherwise false.
2838
- */
2839
- drawPie(pen: Pen, rect: Rect, radius: number, startAngle: number, endAngle: number, doughnut?: boolean): void;
2840
- /**
2841
- * Fills a pie.
2842
- * @param {Brush} brush The brush to fill the pie with.
2843
- * @param {Rect} rect The bounds of the pie.
2844
- * @param {Number} radius The radius of the pie.
2845
- * @param {Number} startAngle The startAngle of the pie.
2846
- * @param {Number} endAngle The endAngle of the pie.
2847
- * @param {Boolean} [doughnut] True if the pie should be a doughnut, otherwise false.
2848
- */
2849
- fillPie(brush: Brush, rect: Rect, radius: number, startAngle: number, endAngle: number, doughnut?: boolean): void;
2850
- /**
2851
- * Draws an image.
2852
- * @param {HTMLImageElement} image The image to draw.
2853
- * @param {Rect} rect The bounds of the image.
2854
- * @param {ImageAlign} align The align to use.
2855
- */
2856
- drawImage(image: HTMLImageElement, rect: Rect, align: ImageAlign): void;
2857
- /**
2858
- * Checks if the given point is within the bounds of the given polygon.
2859
- * @param {Point} point The point to check.
2860
- * @param {Point[]} poly The points describing the polygon.
2861
- * @returns {boolean] True if the point lies within polygon bounds, otherwise false.
2862
- */
2863
- pointInPoly(point: Point, poly: Point[]): boolean;
2864
- /**
2865
- * Checks if the given point is within the bounds of the given pie.
2866
- * @param {Point} point The point to check.
2867
- * @param {Rect} rect The bounds of the pie.
2868
- * @param {Number} radius The radius of the pie.
2869
- * @param {Number} startAngle The startAngle of the pie.
2870
- * @param {Number} endAngle The endAngle of the pie.
2871
- * @param {Boolean} [doughnut] True if the pie is a doughnut, otherwise false.
2872
- * @returns {Boolean} True if the point lies within pie bounds, otherwise false.
2873
- */
2874
- pointInPie(point: Point, rect: Rect, radius: number, startAngle: number, endAngle: number, doughnut?: boolean): boolean;
2875
- /**
2876
- * Saves the current graphics state.
2877
- */
2878
- save(): void;
2879
- /**
2880
- * Restores to a previously saved graphics state.
2881
- */
2882
- restore(): void;
2883
- /**
2884
- * Sets the clip rectangle.
2885
- * @param {Rect} rect The clip rectangle
2886
- */
2887
- clip(rect: Rect): void;
2888
- /**
2889
- * Sets a translate transform.
2890
- * @param {Number} x The distance to translate along the x-axis.
2891
- * @param {Number} y The distance to translate along the y-axis.
2892
- */
2893
- translate(x: number, y: number): void;
2894
- /**
2895
- * Sets a transform.
2896
- * @param {Matrix} transform The transform matrix.
2897
- */
2898
- setTransform(transform: Matrix): void;
2899
- /**
2900
- * Gets the size of the specified string.
2901
- * @param {String} text The string to measure.
2902
- * @param {Font} font The font to use.
2903
- * @param {Number} [width] The maximum width.
2904
- * @returns {Size} The size of the given string when drawn with the given font.
2905
- */
2906
- measureString(text: string, font: Font, width?: number): Size;
2907
- private m_context;
2908
- /**
2909
- * Gets the underlying CanvasRenderingContext2D object.
2910
- * @returns {CanvasRenderingContext2D} The underlying CanvasRenderingContext2D object.
2911
- */
2912
- get context(): CanvasRenderingContext2D;
2913
- /**
2914
- * Sets the underlying CanvasRenderingContext2D object.
2915
- * @param {CanvasRenderingContext2D} value The underlying CanvasRenderingContext2D object.
2916
- */
2917
- set context(value: CanvasRenderingContext2D);
2918
- }
2919
- }
2920
- declare module "@mindfusion/drawing" {
2921
- export { Arc } from "Drawing/Arc";
2922
- export { Bezier } from "Drawing/Bezier";
2923
- export { Border3D } from "Drawing/Border3D";
2924
- export { CardinalSpline } from "Drawing/CardinalSpline";
2925
- export { Circle } from "Drawing/Circle";
2926
- export { Component } from "Drawing/Component";
2927
- export { ComponentBase } from "Drawing/ComponentBase";
2928
- export { Container } from "Drawing/Container";
2929
- export { DistanceToSegment } from "Drawing/DistanceToSegment";
2930
- export { DrawingUtils } from "Drawing/DrawingUtils";
2931
- export { Ellipse } from "Drawing/Ellipse";
2932
- export { Visibility, LayoutAlignment, DashStyle, ImageAlign, FontStyle, LineJoin, StringAlignment, StringFormat } from "Drawing/Enum";
2933
- export { Font } from "Drawing/Font";
2934
- export { Geometry } from "Drawing/Geometry";
2935
- export { Gradient } from "Drawing/Gradient";
2936
- export { GraphicsUnit } from "Drawing/GraphicsUnit";
2937
- export { Image } from "Drawing/Image";
2938
- export { Line } from "Drawing/Line";
2939
- export { Matrix } from "Drawing/Matrix";
2940
- export { Path } from "Drawing/Path";
2941
- export { PathParser } from "Drawing/PathParser";
2942
- export { Point } from "Drawing/Point";
2943
- export { Rect } from "Drawing/Rect";
2944
- export { Shadow } from "Drawing/Shadow";
2945
- export { Size } from "Drawing/Size";
2946
- export { Text } from "Drawing/Text";
2947
- export { Thickness } from "Drawing/Thickness";
2948
- export { Vector } from "Drawing/Vector";
2949
- export { Video } from "Drawing/Video";
2950
- export { Brush } from "Drawing/Brush";
2951
- export { Pen } from "Drawing/Pen";
2952
- export { Color } from "Drawing/Color";
2953
- export { Graphics } from "Drawing/Graphics";
2954
- export { LinearGradientBrush } from "Drawing/Brush";
2955
- }