dojox.gfx.utils

since:V1.0

The dojox.gfx.utils module is a set of utility functions for working with dojox.gfx.Surface objects. They mainly consist of serialization functions to allow you to serialize a dojox.gfx.Surface into a variety of forms, from GFX Objects, to JSON, to even SVG text across all browsers.

Provided functions

  • dojox.gfx.utils.toJson

    Serialize the passed surface object to JSON form

  • dojox.gfx.utils.fromJson

    Rebuild the dojox.gfx.Surface object from the provided JSON

  • dojox.gfx.utils.serialize

    Serialize the passed surface object to JavaScript Object form

  • dojox.gfx.utils.deserialize

    Rebuild the dojox.gfx.Surface object from the provided JS representation.

  • dojox.gfx.utils.toSvg

    Serialize the passed surface object to SVG text.

    Note: This function call is async on some browsers and returns a deferred object.

Error in the documentation? Can’t find what you are looking for? Let us know!