*/
vkvg_public
VkvgSurface vkvg_surface_create_for_VkhImage (VkvgDevice dev, void* vkhImg);
-// VkvgSurface vkvg_surface_create_from_bitmap (VkvgDevice dev, unsigned char* img, uint32_t width, uint32_t height);
+/**
+ * @brief Create a new vkvg surface from an in memory rgba bitmap
+ * @param dev The vkvg device used for creating the surface.
+ * @param img a pointer to a rgba encoded bimap
+ * @param width the width of the provided bitmap.
+ * @param height the height of the provided bitmap.
+ * @return
+ */
+vkvg_public
+VkvgSurface vkvg_surface_create_from_bitmap (VkvgDevice dev, unsigned char* img, uint32_t width, uint32_t height);
/**
* @brief Increment reference count on the surface by one.
* @param The vkvg surface to increment the reference count for.
* @param matrix a valid #vkvg_matrix_t pointer to receive the current context's transform.
*/
vkvg_public
-void vkvg_get_matrix (VkvgContext ctx, const vkvg_matrix_t* matrix);
+void vkvg_get_matrix (VkvgContext ctx, vkvg_matrix_t * const matrix);
/**
* @brief Set the current matrix to identity.
*
ctx->pushConsts.mat = (*matrix);
_set_mat_inv_and_vkCmdPush (ctx);
}
-void vkvg_get_matrix (VkvgContext ctx, const vkvg_matrix_t* matrix){
- memcpy ((void*)matrix, &ctx->pushConsts.mat, sizeof(vkvg_matrix_t));
+void vkvg_get_matrix (VkvgContext ctx, vkvg_matrix_t* const matrix){
+ *matrix = ctx->pushConsts.mat;
}
void vkvg_elliptic_arc_to (VkvgContext ctx, float x2, float y2, bool largeArc, bool sweepFlag, float rx, float ry, float phi) {