# HG changeset patch # User Anton Epple # Date 1392717668 -3600 # Node ID 36dce152ef808047ed939b869dddf15d39b232e4 # Parent 716529430700dbdeb9ab19cd552037fd1ad689ee Y01 Improved Package documentation diff -r 716529430700 -r 36dce152ef80 javaquery/canvas/src/main/resources/net/java/html/canvas/package.html --- a/javaquery/canvas/src/main/resources/net/java/html/canvas/package.html Wed Feb 12 16:12:15 2014 +0100 +++ b/javaquery/canvas/src/main/resources/net/java/html/canvas/package.html Tue Feb 18 11:01:08 2014 +0100 @@ -20,5 +20,16 @@ Universal, flexible, capable, effective, highly efficient Canvas API for any device on the planet (and beyond). + The purpose of this API is to create a common interface for drawing to a canvas using Java. Currently there are implementations for JavaFX Canvas and for + HTML 5 Canvas. You can choose your implementation depending on the availability on your target platform and performance + requirements. + + The entry point is the GraphicsUtils class. It gives you access to the GraphicsContext that you can use to draw. + Currently you need to pass in a GraphicsEnvironment: + // JavaFX implementation available here https://github.com/eppleton/FXGameEngine + GraphicsContext gc = GraphicsUtil.create(new JavaFXGraphicsEnvironment()); + + + diff -r 716529430700 -r 36dce152ef80 javaquery/canvas/src/main/resources/net/java/html/canvas/spi/package.html --- a/javaquery/canvas/src/main/resources/net/java/html/canvas/spi/package.html Wed Feb 12 16:12:15 2014 +0100 +++ b/javaquery/canvas/src/main/resources/net/java/html/canvas/spi/package.html Tue Feb 18 11:01:08 2014 +0100 @@ -19,6 +19,9 @@ --> - SPI for enabling the Canvas API on different platforms. + SPI for enabling the Canvas API on different platforms. Currently there are + implementations for HTML5 Canvas and JavaFX Canvas. If you want to create another + implementation, e.g. because you expect performance gains, or HTML5 and JavaFX + are not available on your platform, you need to implement one interface, GraphicsEnvironment.