C H A P T E R  5

Integrating the Scalable 2D Vector Graphics Optional Package

The Scalable 2D Vector Graphics API optional package is included with the Java Wireless Client software. This optional package implements the API defined in the Scalable 2D Vector Graphics Specification (JSR 226). See http://jcp.org/en/jsr/detail?id=226 for more information.

This optional package requires no additional porting effort because the native porting layer uses existing MIDP porting APIs. The only component in this optional package that interfaces with MIDP is the software renderer.

The software renderer requires only that the pisces_drawRGB() function be ported. This function copies a sequence of pixels rendered by the Pisces software to the native peer of a MIDP Graphics object.

The Java Wireless Client software implementation of the pisces_drawRGB() function is located at installDir/pisces/src/native/midp/src/JGraphicsSurfaceDestination.c.

The Java Wireless Client software version of this function is implemented during your port of MIDP by calling gx_draw_rgb(), which is declared by MIDP in the header file gx_graphics.h.