X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Frasterize;a=blobdiff_plain;f=raster.h;h=3b5a5502e2d9fef221806c40bd6210d59078c03b;hp=7ed8e33f533f90d3d071b664cda153ac95a4ea88;hb=bc662e293c854e1bdc9d46e9a410fe220247e6d4;hpb=07083c8dfbbd4fe48e84d86ce8d7e44e0719b84a diff --git a/raster.h b/raster.h index 7ed8e33..3b5a550 100644 --- a/raster.h +++ b/raster.h @@ -43,6 +43,22 @@ void raster_printstats(raster_t* p); */ color_t raster_color(const raster_t* p, vec_t pt); +/* + * Get the width of the raster. + */ +int raster_width(const raster_t* p); + +/* + * Get the height of the raster. + */ +int raster_height(const raster_t* p); + +/* + * Get a copy of the raw RGBA pixel data of the raster. The returned + * buffer is indeed a copy and must be freed when no longer needed. + */ +void* raster_data(const raster_t* p); + /* * Set the viewport rectangle. This effectively sets up a clipping rectangle