SVGGraphicsNode
class SVGGraphicsNode extends PIXI.Graphics
This node can be used to directly embed the following elements:
| Interface | Element |
|---|---|
| SVGGElement | <g /> |
| SVGCircleElement | <circle /> |
| SVGLineElement | <line /> |
| SVGPolylineElement | <polyline /> |
| SVGPolygonElement | <polygon /> |
| SVGRectElement | <rect /> |
It also provides an implementation for dashed stroking, by adding the dashArray and dashOffset properties
to LineStyle.
Summary
Methods from SVGGraphicsNode
| this |
Draws an elliptical arc. |
| this |
Draws an elliptical arc to the specified point. |
| void |
Embeds the |
| void |
Embeds the |
| void |
Embeds the |
| void |
Embeds the |
| void |
Embeds the |
| void |
Embeds the |
| void |
|
Properties inherited from Graphics
| PIXI.BLEND_MODES |
|
| boolean |
|
| PIXI.Polygon |
|
| PIXI.FillStyle |
|
| PIXI.GraphicsGeometry |
|
| PIXI.LineStyle |
|
| string |
Renderer plugin for batching |
| PIXI.Shader |
|
| number |
|
| PIXI.FillStyle |
Current fill style. |
| boolean |
Current hole mode is enabled. |
| PIXI.LineStyle |
Current line style. |
| PIXI.Matrix |
Current shape transform matrix. |
| number |
Update dirty for limiting calculating batches. |
| Array<IGraphicsBatchElement> |
A collections of batches! These can be drawn by the renderer batch system. |
| number |
Update dirty for limiting calculating tints for batches. |
| Float32Array |
Copy of the object vertex data. |
Properties inherited from Container
| T[] |
|
| number |
The height of the Container, setting this will actually modify the scale to achieve the value set. |
| boolean |
|
| boolean |
|
| boolean |
Should children be sorted by zIndex at the next updateTransform call. |
| number |
The width of the Container, setting this will actually modify the scale to achieve the value set. |
Properties inherited from DisplayObject
| boolean |
|
| boolean |
|
| PIXI.Bounds |
The bounds object, this is used to calculate and store the bounds of the displayObject. |
| PIXI.Bounds |
Local bounds object, swapped with |
| boolean |
|
| boolean |
|
| string |
|
| string |
|
| ?string |
|
| string |
|
| number |
The opacity of the object. |
| number |
|
| boolean |
|
| number |
|
| number |
|
| boolean |
Should this object be rendered if the bounds of this object are out of frame? |
| PIXI.Rectangle |
|
| string |
|
| boolean |
Readonly flag for destroyed display objects. |
| PIXI.Rectangle |
|
| PIXI.Filter[] | null |
|
| PIXI.IHitArea |
|
| boolean |
|
| boolean |
Does any other displayObject use this object as a mask? |
| boolean |
Used to fast check if a sprite is.. a sprite! |
| PIXI.Matrix |
|
| PIXI.Container | PIXI.MaskData | null |
|
| string |
|
| PIXI.Container |
The display object container that contains this display object. |
| PIXI.ObservablePoint |
|
| PIXI.ObservablePoint |
|
| boolean |
|
| number |
|
| PIXI.ObservablePoint |
The scale factors of this object along the local coordinate axes. |
| PIXI.ObservablePoint |
|
| PIXI.DisplayObject |
|
| PIXI.Transform |
|
| boolean |
|
| number |
|
| PIXI.Matrix |
|
| boolean |
|
| number |
|
| number |
|
| number |
The zIndex of the displayObject. |
| number |
Flags the cached bounds as dirty. |
| PIXI.Rectangle |
Cache of this display-object's bounds-rectangle. |
| boolean |
If the object has been destroyed via destroy(). If true, it should not be used. |
| PIXI.Filter[] |
|
| number |
|
| PIXI.Rectangle |
Cache of this display-object's local-bounds rectangle. |
| PIXI.Container | PIXI.MaskData |
|
| PIXI.Container |
|
| number |
|
Methods inherited from Graphics
Methods inherited from Container
Methods inherited from DisplayObject
Inherited Events from Container
Inherited Events from DisplayObject
|
|
|
|
|
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
|
|
|
Capture phase equivalent of |
|
|
Fired when the mouse pointer is moved over a DisplayObject and its descendant's hit testing boundaries. |
|
|
Capture phase equivalent of |
|
|
Fired when the mouse pointer exits a DisplayObject and its descendants. |
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
Fired when the pointer is moved over a DisplayObject and its descendant's hit testing boundaries. |
|
|
Capture phase equivalent of |
|
|
Fired when the pointer leaves the hit testing boundaries of a DisplayObject and its descendants. |
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
|
|
|
|
Capture phase equivalent of |
|
| PIXI.FederatedWheelEvent |
Fired when a the user scrolls with the mouse cursor over a DisplayObject. |
| PIXI.FederatedWheelEvent |
Capture phase equivalent of |
Public Methods
ellipticArc(cx: number, cy: number, rx: number, ry: number, startAngle: number, endAngle: number, xAxisRotation: number, anticlockwise: boolean) → {this}
Draws an elliptical arc.
| Name | Type | Default | Description |
|---|---|---|---|
| cx | number |
The x-coordinate of the center of the ellipse. |
|
| cy | number |
The y-coordinate of the center of the ellipse. |
|
| rx | number |
The radius along the x-axis. |
|
| ry | number |
The radius along the y-axis. |
|
| startAngle | number |
The starting eccentric angle, in radians (0 is at the 3 o'clock position of the arc's circle). |
|
| endAngle | number |
The ending eccentric angle, in radians. |
|
| xAxisRotation | number | 0 |
The angle of the whole ellipse w.r.t. x-axis. |
| anticlockwise | boolean | false |
Specifies whether the drawing should be counterclockwise or clockwise. |
| Type | Description |
|---|---|
| this |
This Graphics object. Good for chaining method calls. |
ellipticArcTo(endX: number, endY: number, rx: number, ry: number, xAxisRotation: number, anticlockwise: boolean, largeArc: boolean) → {this}
Draws an elliptical arc to the specified point.
If rx = 0 or ry = 0, then a line is drawn. If the radii provided are too small to draw the arc, then they are scaled up appropriately.
| Name | Type | Default | Description |
|---|---|---|---|
| endX | number |
the x-coordinate of the ending point. |
|
| endY | number |
the y-coordinate of the ending point. |
|
| rx | number |
The radius along the x-axis. |
|
| ry | number |
The radius along the y-axis. |
|
| xAxisRotation | number | 0 |
The angle of the ellipse as a whole w.r.t/ x-axis. |
| anticlockwise | boolean | false |
Specifies whether the arc should be drawn counterclockwise or clockwise. |
| largeArc | boolean | false |
Specifies whether the larger arc of two possible should be choosen. |
| Type | Description |
|---|---|
| this |
This Graphics object. Good for chaining method calls. |
embedCircle(element: SVGCircleElement) → {void}
Embeds the SVGCircleElement into this node.
| Name | Type | Description |
|---|---|---|
| element | SVGCircleElement |
The circle element to draw. |
| Type | Description |
|---|---|
| void |
embedEllipse(element: SVGEllipseElement) → {void}
Embeds the SVGEllipseElement into this node.
| Name | Type | Description |
|---|---|---|
| element | SVGEllipseElement |
The ellipse element to draw. |
| Type | Description |
|---|---|
| void |
embedLine(element: SVGLineElement) → {void}
Embeds the SVGLineElement into this node.
| Name | Type | Description |
|---|---|---|
| element | SVGLineElement |
The line element to draw. |
| Type | Description |
|---|---|
| void |
embedPolygon(element: SVGPolygonElement) → {void}
Embeds the SVGPolygonElement element into this node.
| Name | Type | Description |
|---|---|---|
| element | SVGPolygonElement |
The polygon element to draw. |
| Type | Description |
|---|---|
| void |
embedPolyline(element: SVGPolylineElement) → {void}
Embeds the SVGPolylineElement element into this node.
| Name | Type | Description |
|---|---|---|
| element | SVGPolylineElement |
The polyline element to draw. |
| Type | Description |
|---|---|
| void |
embedRect(element: SVGRectElement) → {void}
Embeds the SVGRectElement into this node.
| Name | Type | Description |
|---|---|---|
| element | SVGRectElement |
The rectangle element to draw. |
| Type | Description |
|---|---|
| void |
render(renderer: PIXI.Renderer) → {void}
| Name | Type | Description |
|---|---|---|
| renderer | PIXI.Renderer |
| Type | Description |
|---|---|
| void |