Interface ISvgContext

Hierarchy

Index

Properties

Methods

Properties

optional public alias?: Array<string>

[Config Option] (String[])

optional public alternateClassName?: any

[Config Option] (String/String[])

optional public config?: any

[Config Option] (Object)

optional public extend?: string

[Config Option] (String)

optional public inheritableStatics?: any

[Config Option] (Object)

optional public mixins?: any

[Config Option] (Object)

optional public platformConfig?: any

[Config Option] (Object)

optional public self?: IClass

[Property] (Ext.Class)

optional public singleton?: boolean

[Config Option] (Boolean)

optional public statics?: any

[Config Option] (Object)

optional public uses?: Array<string>

[Config Option] (String[])

Methods

optional public arc(x?: number, y?: number, radius?: number, startAngle?: number, endAngle?: number, anticlockwise?: number)

[Method] Adds points to the subpath such that the arc described by the circumference of the circle described by the arguments

Parameters

  • x?: number optional

    Number

  • y?: number optional

    Number

  • radius?: number optional

    Number

  • startAngle?: number optional

    Number

  • endAngle?: number optional

    Number

  • anticlockwise?: number optional

    Number

optional public arcSvg(r1?: number, r2?: number, rotation?: number, large?: number, swipe?: number, x2?: number, y2?: number)

[Method] Arc command using svg parameters

Parameters

  • r1?: number optional

    Number

  • r2?: number optional

    Number

  • rotation?: number optional

    Number

  • large?: number optional

    Number

  • swipe?: number optional

    Number

  • x2?: number optional

    Number

  • y2?: number optional

    Number

optional public arcTo(x1?: number, y1?: number, x2?: number, y2?: number, radiusX?: number, radiusY?: number, rotation?: number)

[Method] Adds an arc with the given control points and radius to the current subpath connected to the previous point by a str

Parameters

  • x1?: number optional

    Number

  • y1?: number optional

    Number

  • x2?: number optional

    Number

  • y2?: number optional

    Number

  • radiusX?: number optional

    Number

  • radiusY?: number optional

    Number

  • rotation?: number optional

    Number

optional public beginPath()

[Method] Resets the current default path

optional public bezierCurveTo(x1?: number, y1?: number, x2?: number, y2?: number, x3?: number, y3?: number)

[Method] Adds the given point to the current subpath connected to the previous one by a cubic B zier curve with the given con

Parameters

  • x1?: number optional

    Number

  • y1?: number optional

    Number

  • x2?: number optional

    Number

  • y2?: number optional

    Number

  • x3?: number optional

    Number

  • y3?: number optional

    Number

optional public callOverridden(args?: any): any

[Method] Call the original method that was previously overridden with override This method is deprecated as callParent does

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

Returns

any

Object Returns the result of calling the overridden method

optional public callParent(args?: any): any

[Method] Call the parent method of the current method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)

Returns

any

Object Returns the result of calling the parent method

optional public callSuper(args?: any): any

[Method] This method is used by an override to call the superclass method but bypass any overridden method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

Returns

any

Object Returns the result of calling the superclass method

optional public clear()

[Method] Clears the context

optional public closePath()

[Method] Marks the current subpath as closed and starts a new subpath with a point the same as the start and end of the newly

optional public createLinearGradient(x0?: number, y0?: number, x1?: number, y1?: number): IGradient

[Method] Returns an object that represents a linear gradient that paints along the line given by the coordinates represented b

Parameters

  • x0?: number optional

    Number

  • y0?: number optional

    Number

  • x1?: number optional

    Number

  • y1?: number optional

    Number

Returns

IGradient

Ext.draw.engine.SvgContext.Gradient

optional public createRadialGradient(x0?: number, y0?: number, r0?: number, x1?: number, y1?: number, r1?: number): IGradient

[Method] Returns a CanvasGradient object that represents a radial gradient that paints along the cone given by the circles rep

Parameters

  • x0?: number optional

    Number

  • y0?: number optional

    Number

  • r0?: number optional

    Number

  • x1?: number optional

    Number

  • y1?: number optional

    Number

  • r1?: number optional

    Number

Returns

IGradient

Ext.draw.engine.SvgContext.Gradient

optional public destroy()

[Method]

optional public drawImage(image?: HTMLElement, sx?: number, sy?: number, sw?: number, sh?: number, dx?: number, dy?: number, dw?: number, dh?: number)

[Method] Draws the given image onto the canvas

Parameters

  • image?: HTMLElement optional

    HTMLElement

  • sx?: number optional

    Number

  • sy?: number optional

    Number

  • sw?: number optional

    Number

  • sh?: number optional

    Number

  • dx?: number optional

    Number

  • dy?: number optional

    Number

  • dw?: number optional

    Number

  • dh?: number optional

    Number

optional public ellipse(x?: number, y?: number, radiusX?: number, radiusY?: number, rotation?: number, startAngle?: number, endAngle?: number, anticlockwise?: number)

[Method] Adds points to the subpath such that the arc described by the circumference of the ellipse described by the arguments

Parameters

  • x?: number optional

    Number

  • y?: number optional

    Number

  • radiusX?: number optional

    Number

  • radiusY?: number optional

    Number

  • rotation?: number optional

    Number

  • startAngle?: number optional

    Number

  • endAngle?: number optional

    Number

  • anticlockwise?: number optional

    Number

optional public fill()

[Method] Fills the subpaths of the current default path or the given path with the current fill style

optional public fillRect(x?: number, y?: number, width?: number, height?: number)

[Method] Paints the given rectangle onto the canvas using the current fill style

Parameters

  • x?: number optional

    Number

  • y?: number optional

    Number

  • width?: number optional

    Number

  • height?: number optional

    Number

optional public fillStroke(attr?: any, transformFillStroke?: boolean)

[Method] Note After the method guarantees the transform matrix will be inverted

Parameters

  • attr?: any optional

    Object The attribute object

  • transformFillStroke?: boolean optional

    Boolean Indicate whether to transform fill and stroke. If this is not given, then uses attr.transformFillStroke instead.

optional public fillText(text?: string, x?: number, y?: number)

[Method] Fills the given text at the given position

Parameters

  • text?: string optional

    String

  • x?: number optional

    Number

  • y?: number optional

    Number

optional public getInitialConfig(name?: string): any

[Method] Returns the initial configuration passed to constructor

Parameters

  • name?: string optional

    String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

Returns

any

Object/Mixed

optional public initConfig(instanceConfig?: any): any

[Method] Initialize configuration for this class

Parameters

  • instanceConfig?: any optional

    Object

Returns

any

Object mixins The mixin prototypes as key - value pairs

optional public lineTo(x?: number, y?: number)

[Method] Adds the given point to the current subpath connected to the previous one by a straight line

Parameters

  • x?: number optional

    Number

  • y?: number optional

    Number

optional public moveTo(x?: number, y?: number)

[Method] Creates a new subpath with the given point

Parameters

  • x?: number optional

    Number

  • y?: number optional

    Number

optional public rect(x?: number, y?: number, width?: number, height?: number)

[Method] Adds a new closed subpath to the path representing the given rectangle

Parameters

  • x?: number optional

    Number

  • y?: number optional

    Number

  • width?: number optional

    Number

  • height?: number optional

    Number

optional public restore()

[Method] Pops the state stack and restores the state

optional public save()

[Method] Pushes the context state to the state stack

optional public setTransform(xx?: number, yx?: number, xy?: number, yy?: number, dx?: number, dy?: number)

[Method] Changes the transformation matrix to the matrix given by the arguments as described below

Parameters

  • xx?: number optional

    Number

  • yx?: number optional

    Number

  • xy?: number optional

    Number

  • yy?: number optional

    Number

  • dx?: number optional

    Number

  • dy?: number optional

    Number

optional public stroke()

[Method] Strokes the subpaths of the current default path or the given path with the current stroke style

optional public strokeRect(x?: number, y?: number, width?: number, height?: number)

[Method] Paints the box that outlines the given rectangle onto the canvas using the current stroke style

Parameters

  • x?: number optional

    Number

  • y?: number optional

    Number

  • width?: number optional

    Number

  • height?: number optional

    Number

optional public strokeText(text?: string, x?: number, y?: number)

[Method] Strokes the given text at the given position

Parameters

  • text?: string optional

    String

  • x?: number optional

    Number

  • y?: number optional

    Number

optional public transform(xx?: number, yx?: number, xy?: number, yy?: number, dx?: number, dy?: number)

[Method] Changes the transformation matrix to apply the matrix given by the arguments as described below

Parameters

  • xx?: number optional

    Number

  • yx?: number optional

    Number

  • xy?: number optional

    Number

  • yy?: number optional

    Number

  • dx?: number optional

    Number

  • dy?: number optional

    Number