Surface
An abstract class representing the top-level drawing surface. Cannot be directly instantiated.
Specific implementations are created through the static create method. The implementations for SVG and Canvas inherit from this base class.
Definition
Package:@progress/kendo-drawing
Methods
Binds to an event on the Surface.
The name of the event to bind to.
handler(e: any) => voidThe event handler.
Returns:- The current Surface instance to allow chaining.
Clears the drawing surface.
Creates a drawing surface that matches the browser capabilities.
The DOM element that will host the surface.
options?SurfaceOptionsThe configuration options for the surface.
Returns:- The newly created surface instance.
Releases the resources allocated by this instance.
The DOM elements will not be cleared.
Draws the element and its children on the surface. Existing elements are not affected.
The element to draw.
Returns the target drawing element of a DOM event.
Binds to an event once. The handler will be unbound after the first event fires.
The name of the event to bind to.
handler(e: any) => voidThe event handler.
Returns:- The current Surface instance to allow chaining.
Resizes the surface to match the size of the container.
Whether to proceed with resizing even if the container dimensions are not changed.
Unbinds an event handler.
The name of the event to bind to.
handler?(e: any) => voidThe event handler.
Returns:- The current Surface instance to allow chaining.
Properties
Configuration options for the surface.