Skip to main content

API Documentation

Note

Documentation for the key classes and their attributes are listed below—properties are printed in bold and methods have parentheses attached to the name. The instances where Skia Canvas’s behavior goes beyond the standard are marked by a 🧪 symbol, linking to further details below. Links to documentation for the web standards Skia Canvas emulates are marked with a 📖.

The library exports a number of classes emulating familiar browser objects including:

In addition, the module contains:

  • FontLibrary a global object for inspecting the system’s fonts and loading additional ones
  • Window a class allowing you to display your canvas interactively in an on-screen window
  • App a helper class for coordinating multiple windows in a single script
  • loadImage() a utility function for loading Image objects asynchronously
  • loadImageData() a utility function for loading ImageData objects asynchronously

For detailed notes on the extensions Skia Canvas has made to standard object types, see the corresponding pages: