fabric: Add freeDrawingBrush to StaticCanvas. (#35778)

* Add freeDrawingBrush.

Add freedrawingBrush property to StaticCanvas class and accompanying FreeDrawingBrush interface.

* Fix whitespace and implicit public.

* Remove 'public' modifiers on FreeDrawingBrush

* Remove implicit public and whitespace -> tab.
This commit is contained in:
sebastianwitthus
2019-05-28 11:53:10 -07:00
committed by Sheetal Nandi
parent 035ef670e2
commit 1fe4a61823
+15
View File
@@ -1070,6 +1070,19 @@ interface IStaticCanvasOptions {
*/
svgViewportTransformation?: boolean;
}
export interface FreeDrawingBrush {
/**
* Can be any regular color value.
*/
color: string;
/**
* Brush width measured in pixels.
*/
width: number;
}
export interface StaticCanvas extends IObservable<StaticCanvas>, IStaticCanvasOptions, ICollection<StaticCanvas>, ICanvasAnimation<StaticCanvas> { }
export class StaticCanvas {
/**
@@ -1082,6 +1095,8 @@ export class StaticCanvas {
_activeObject?: Object | Group;
freeDrawingBrush: FreeDrawingBrush;
/**
* Calculates canvas element offset relative to the document
* This method is also attached as "resize" event handler of window