* Define vkvg_has_current_point and vkvg_get_target
* Declare vkvg_has_current_point and vkvg_get_target
vkvg_public
VkvgPattern vkvg_get_source (VkvgContext ctx);
+vkvg_public
+VkvgSurface vkvg_get_target (VkvgContext ctx);
+
+/**
+ * @brief Returns whether a current point is defined on the current path.
+ * See @ref vkvg_get_current_point() for details on the current point.
+ *
+ * @param ctx a valig vkvg @ref context
+ * @return bool whether a current point is defined
+ **/
+vkvg_public
+bool vkvg_has_current_point (VkvgContext ctx);
+
/**
* @brief
*
_finish_path(ctx);
_add_point (ctx, x, y);
}
+bool vkvg_has_current_point (VkvgContext ctx) {
+ if (ctx->status)
+ return false;
+ return !_current_path_is_empty(ctx);
+}
void vkvg_get_current_point (VkvgContext ctx, float* x, float* y) {
if (_current_path_is_empty(ctx)) {
*x = *y = 0;
vkvg_curve_to (ctx, topLeftX, topLeftY, bottomLeftX, bottomLeftY, bottomCenterX, bottomCenterY);
vkvg_close_path (ctx);
}
+
+VkvgSurface vkvg_get_target (VkvgContext ctx) {
+ if (ctx->status)
+ return NULL;
+ return ctx->pSurf;
+}