lua cairo: Add cairo_surface_create_for_rectangle (#1492)

Adds the function for cairo_surface_create_for_rectangle copied
from the cairo header files. Personally I use this to ensure that
Items can't draw outside there designated area.
This commit is contained in:
Simon Lees 2023-04-05 22:37:05 +09:30 committed by GitHub
parent 49b3487b76
commit 468488677a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -706,6 +706,12 @@ const char *cairo_status_to_string(cairo_status_t status);
cairo_surface_t *cairo_surface_create_similar(cairo_surface_t * other,
cairo_content_t content, int width, int height);
cairo_surface_t *cairo_surface_create_for_rectangle (cairo_surface_t *target,
double x,
double y,
double width,
double height);
cairo_surface_t *cairo_surface_reference(cairo_surface_t * surface);
void cairo_surface_finish(cairo_surface_t * surface);