From fa154af5a72964931bae432dbb96abf45465e6cb Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 28 Dec 2017 01:37:38 +0100 Subject: Add canvas from image init. func. Signed-off-by: pacien --- include/painter/canvas.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/painter/canvas.h b/include/painter/canvas.h index e354938..ba6d4da 100644 --- a/include/painter/canvas.h +++ b/include/painter/canvas.h @@ -25,9 +25,24 @@ typedef struct { * Parameters: * width - the width in pixels * height - the height in pixels + * + * Returns: + * The initialised canvas */ Canvas *canvas_create(IntVector width, IntVector height); +/** + * Function: canvas_create_from_image + * Initialises a canvas with an image loaded from the given path. + * + * Parameters: + * *fpath - path to the base image file + * + * Returns: + * The initialised canvas + */ +Canvas *canvas_create_from_image(const char *fpath); + /** * Function: canvas_destroy * Frees all memory allocated to a canvas. -- cgit v1.2.3