Package 

Class Stage


  • 
    public class Stage
    extends JsObject
                        

    This class provide tools for cross-browser display with the single interface for both (SVG and VML).Do not invoke constructor directly. Use create.

    Note:anychart.graphics.vector.Stage delegates all work with DOM elements, style and attributes to its renderer. You can get renderer using getRenderer method.Note: Renderer is a singleton must not contain own fields.

    Rendering:anychart.graphics.vector.Stage has the rootLayer_ private field of Layer type. All layers and elements you add to a stage go there, so rendering and other stuff happens when this layer is rendered.

    • Constructor Detail

    • Method Detail

      • asyncMode

         void asyncMode()

        Getter for the current stage rendering mode.

      • circle

         Circle circle(Number cx, Number cy, Number radius)

        Invokes anychart.graphics.vector.Circle constructor.Note:anychart.graphics.vector.Stage doesn't delete objects you create. You must delete them yourself after you finish using them. Read more at: anychart.graphics.vector.Circle

      • clip

         Rect clip()

        Gets clip bounds. Works only after render() is invoked. Read more at: clip.

      • clip

         Stage clip(Rect rect)

        Clips a stage. Works only after render() is invoked. Read more at: clip.

      • container

         void container()

        Returns DOM element where everything is drawn upon rendering.

      • credits

         Stage credits(String settings)

        Setter for stage credits. {docs:Quick_Start/Credits}Learn more about credits settings.{docs}

      • credits

         Stage credits(Boolean settings)

        Setter for stage credits. {docs:Quick_Start/Credits}Learn more about credits settings.{docs}

      • cross

         void cross()

        Draws a cross defined by a circumscribed circle. Read more at cross

      • desc

         void desc()

        Getter for the element description value.

      • diagonalCross

         void diagonalCross()

        Draws a diagonal cross set by it circumscribed circle center and radius. Read more at diagonalCross

      • diamond

         void diamond()

        Draws a diamond set by it circumscribed circle center and radius. Read more at diamond

      • dispose

         void dispose()

        Disposes stage. Removes it from parent layer, nulls links, removes from DOM.

      • domElement

         void domElement()

        Returns stage root DOM element.

      • donut

         void donut()

        Draws arc as donut chart element. Read more at donut

      • ellipse

         Ellipse ellipse(Number cx, Number cy, Number rx, Number ry)

        Invokes anychart.graphics.vector.Ellipse constructor.Note:anychart.graphics.vector.Stage doesn't delete objects you create. You must delete them yourself after you finish using them. Read more at: anychart.graphics.vector.Ellipse

      • fullScreen

         void fullScreen()

        Getter for the fullscreen mode.

      • getDomWrapper

         void getDomWrapper()

        Returns a DIV wrapper that contains stage and other utilitarian DOM elements.

      • getRotationAngle

         void getRotationAngle()

        Returns rotation angle in degrees. Read more at: getRotationAngle.

      • getTransformationMatrix

         void getTransformationMatrix()

        Returns current transformation matrix: [ {number} m00 Scale X. {number} m10 Shear Y. {number} m01 Shear X. {number} m11 Scale Y. {number} m02 Translate X. {number} m12 Translate Y. ] Read more at: getTransformationMatrix.

      • getX

         void getX()

        Returns X of top left corner.

      • getY

         void getY()

        Returns Y of top left corner.

      • hLine

         void hLine()

        Draws a thick horizontal line set by its circumscribed circle center and radius. Read more at hLine

      • hasChild

         void hasChild(Element element)

        Checks if there is such element in children set. Similar to hasChild

      • hatchFill

         HatchFill hatchFill(HatchFillType type, String color, Number thickness, Number size)

        Invokes anychart.graphics.vector.HatchFill constructor. Note:anychart.graphics.vector.Stage doesn't delete objects you create. You have to delete them yourself after you finish using them. Read more at: anychart.graphics.vector.HatchFill

      • height

         void height()

        Getter for the stage height.

      • id

         void id()

        Getter for the stage identifier. If it was not set, than it will be generated.

      • id

         Stage id(String id)

        Setter for a stage identifier. Instantly applied to the DOM.

      • image

         Image image(String src, Number x, Number y, Number width, Number height)

        Invokes anychart.graphics.vector.Image constructor.Note:anychart.graphics.vector.Stage doesn't delete objects you create. You must delete them yourself after you finish using them.

      • indexOfChild

         void indexOfChild(Element element)

        Returns index of a child. Similar to indexOfChild

      • isFullScreenAvailable

         void isFullScreenAvailable()

        Whether the context menu available in the browser or not.

      • isRendering

         void isRendering()

        Indicates if stage is in rendering process.

      • isSuspended

         void isSuspended()

        Returns rendering state (true - suspended, false - instant).

      • layer

         Layer layer()

        Invokes anychart.graphics.vector.Layer constructor.Note:anychart.graphics.vector.Stage doesn't delete objects you create. You must delete them yourself after you finish using them.

      • numChildren

         void numChildren()

        A number of stage children. Similar to numChildren

      • path

         Path path()

        Invokes anychart.graphics.vector.Path constructor.Note:anychart.graphics.vector.Stage doesn't delete objects you create. You must delete them yourself after you finish using them. Read more at Path: anychart.graphics.vector.Path

      • pattern

         PatternFill pattern(Rect bounds)

        Invokes anychart.graphics.vector.PatternFill.Note:anychart.graphics.vector.Stage doesn't delete objects you create. You must delete them yourself after you finish using them. Read more at: anychart.graphics.vector.PatternFill

      • pie

         void pie()

        Draws arc as pie chart element. Read more at pie

      • rect

         Rect rect(Number x, Number y, Number width, Number height)

        Invokes anychart.graphics.vector.Rect constructor.Note:anychart.graphics.vector.Stage doesn't delete objects you create. You must delete them yourself after you finish using them.

      • removeAllListeners

         void removeAllListeners(String type)

        Removes all listeners from an object. You can also optionally remove listeners of some particular type.

      • removeChildren

         void removeChildren()

        Removes all elements. Similar to removeChildren

      • resize

         void resize(Number width, Number height)

        Stage resize. Anything drawn on stage must fit in it. So any part that doesn't fit will be clipped.

      • resize

         void resize(Number width, String height)

        Stage resize. Anything drawn on stage must fit in it. So any part that doesn't fit will be clipped.

      • resize

         void resize(String width, Number height)

        Stage resize. Anything drawn on stage must fit in it. So any part that doesn't fit will be clipped.

      • resize

         void resize(String width, String height)

        Stage resize. Anything drawn on stage must fit in it. So any part that doesn't fit will be clipped.

      • resume

         Stage resume(Boolean force)

        Removes suspend state and applies all changes in sync (if any). Read more at suspend.

      • saveAsPng

         void saveAsPng(Number width, Number height, Number quality, String filename)

        Saves the current stage as PNG Image. For export to image PNG use server.

      • saveAsSvg

         void saveAsSvg(String paperSize, Boolean landscape, String filename)

        Saves the stage as SVG Image. For export to SVG use server.

      • saveAsSvg

         void saveAsSvg(Number width, Number height)

        Saves the stage as SVG Image using width and height. For export to SVG use server.

      • scale

         Stage scale(Number sx, Number sy, Number cx, Number cy)

        Scales root layer in parent coordinates system. Scaling center is set in the parent system too. Read more at: scale.

      • scaleByAnchor

         Stage scaleByAnchor(Number sx, Number sy, Anchor anchor)

        Scales root layer in parent coordinates system. Scaling center is set by root layer anchor. Read more at: scaleByAnchor.

      • scaleByAnchor

         Stage scaleByAnchor(Number sx, Number sy, String anchor)

        Scales root layer in parent coordinates system. Scaling center is set by root layer anchor. Read more at: scaleByAnchor.

      • setPosition

         Stage setPosition(Number x, Number y)

        Sets top left corner coordinates of root layer (with transformation,in parent coordinate system). Read more at: setPosition.

      • star

         void star()

        Draws multi-pointed star. Read more at star

      • star10

         void star10()

        Draws ten-pointed star. Read more at star10

      • star4

         void star4()

        Draws four-pointed star. Read more at star4

      • star5

         void star5()

        Draws five-pointed star. Read more at star5

      • star6

         void star6()

        Draws six-pointed star. Read more at star6

      • star7

         void star7()

        Draws seven-pointed star. Read more at star7

      • suspend

         Stage suspend()

        Suspends rendering (changes instant to suspended).

      • title

         void title()

        Getter for the element title value.

      • toSvg

         void toSvg(String paperSize, Boolean landscape)

        Returns SVG string if type of content is SVG with parameters otherwise returns empty string.

      • toSvg

         void toSvg(Number width, Number height)

        Returns SVG string if type of content is SVG with determined the width and height otherwise returns empty string.

      • translate

         Stage translate(Number tx, Number ty)

        Moves root layer taking transformation into account. Movement happens in root layer coordinates. Read more at: translate.

      • triangleDown

         void triangleDown()

        Draws a triangle heading downwards set by it circumscribed circle center and radius. Read more at triangleDown

      • triangleLeft

         void triangleLeft()

        Draws a triangle heading leftwards set by it circumscribed circle center and radius. Read more at triangleLeft

      • triangleRight

         void triangleRight()

        Draws a triangle heading rightwards set by it circumscribed circle center and radius. Read more at triangleRight

      • triangleUp

         void triangleUp()

        Draws a triangle heading upwards set by its circumscribed circle center and radius. Read more at triangleUp

      • unlistenByKey

         void unlistenByKey(String key)

        Removes an event listener which was added with listen by the key returned by listen or listenOnce.

      • vLine

         void vLine()

        Draws a thick vertical line set by its circumscribed circle center and radius. Read more at vLine

      • visible

         void visible()

        Returns the current stage visibility.

      • width

         void width()

        Getter for the stage width.