That is very impressive indead!  That performance,
without HW acceleration, and the helpfulness of the
author makes it an easy choice.

Any thoughts on an interface API?

Regards,

McKinley

Yes API is very important.
It would be nice to discuss the API before someone start working on implementation. We can use the Neko API notations for this process (see http://nekovm.org/doc/libs#types )

For instance :

'buffer new_buffer( width : int, height : int );

'shape create_shape();

'fill create_solid_fill( color : int, alpha : int );
void set_left_fill( 'shape, 'fill );
void set_right_fill( 'shape, 'fill );
void set_line_fill( 'shape, 'fill, line_width : int );

void begin_fill( 'shape );
void move_to( 'shape, x : float, y : float );
void line_to( 'shape, x : float, y : float );
void end_fill( 'shape );

'matrix create_matrix();
// affine or 3x2 matrix ops

void draw_shape( 'buffer, 'shape, pos : 'matrix );

string buffer_data( 'buffer );
// the buffer bytes

Then we can use these bytes to save or hard-drive as RAW data or PNG (using ZLIB) for example. In order to display the buffer data on a Window, we could extend the SWHX API which is available for "pure" Neko as well (http://haxe.org/swhx)

Nicolas

--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to