summaryrefslogtreecommitdiffstatsci
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nsvg/nanosvg.h (renamed from src/nanosvg.h)0
-rw-r--r--src/nsvg/vkvg_nsvg.c (renamed from src/vkvg_nsvg.c)0
-rw-r--r--src/vkvg_context.c32
3 files changed, 16 insertions, 16 deletions
diff --git a/src/nanosvg.h b/src/nsvg/nanosvg.h
index 809bc87..809bc87 100644
--- a/src/nanosvg.h
+++ b/src/nsvg/nanosvg.h
diff --git a/src/vkvg_nsvg.c b/src/nsvg/vkvg_nsvg.c
index 70d2386..70d2386 100644
--- a/src/vkvg_nsvg.c
+++ b/src/nsvg/vkvg_nsvg.c
diff --git a/src/vkvg_context.c b/src/vkvg_context.c
index 5f51734..b551227 100644
--- a/src/vkvg_context.c
+++ b/src/vkvg_context.c
@@ -585,6 +585,22 @@ vkvg_status_t vkvg_rounded_rectangle (VkvgContext ctx, float x, float y, float w
return VKVG_STATUS_SUCCESS;
}
+void vkvg_rounded_rectangle2 (VkvgContext ctx, float x, float y, float w, float h, float rx, float ry){
+ vkvg_move_to (ctx, x+rx, y);
+ vkvg_line_to (ctx, x+w-rx, y);
+ vkvg_elliptic_arc(ctx, x+w, y+ry, false, true, rx, ry, 0);
+
+ vkvg_line_to (ctx, x+w, y+h-ry);
+ vkvg_elliptic_arc(ctx, x+w-rx, y+h, false, true, rx, ry, 0);
+
+ vkvg_line_to (ctx, x+rx, y+h);
+ vkvg_elliptic_arc(ctx, x, y+h-ry , false, true, rx, ry, 0);
+
+ vkvg_line_to (ctx, x, y+ry);
+ vkvg_elliptic_arc(ctx, x+rx, y , false, true, rx, ry, 0);
+
+ vkvg_close_path(ctx);
+}
static const VkClearAttachment clearStencil = {VK_IMAGE_ASPECT_STENCIL_BIT, 1, {{{0}}}};
static const VkClearAttachment clearColorAttach = {VK_IMAGE_ASPECT_COLOR_BIT, 0, {{{0}}}};
@@ -1336,19 +1352,3 @@ void vkvg_ellipse (VkvgContext ctx, float radiusX, float radiusY, float x, float
vkvg_curve_to (ctx, topLeftX, topLeftY, bottomLeftX, bottomLeftY, bottomCenterX, bottomCenterY);
vkvg_close_path (ctx);
}
-void vkvg_rounded_rectangle2 (VkvgContext ctx, float x, float y, float w, float h, float rx, float ry){
- vkvg_move_to (ctx, x+rx, y);
- vkvg_line_to (ctx, x+w-rx, y);
- vkvg_elliptic_arc(ctx, x+w, y+ry, false, true, rx, ry, 0);
-
- vkvg_line_to (ctx, x+w, y+h-ry);
- vkvg_elliptic_arc(ctx, x+w-rx, y+h, false, true, rx, ry, 0);
-
- vkvg_line_to (ctx, x+rx, y+h);
- vkvg_elliptic_arc(ctx, x, y+h-ry , false, true, rx, ry, 0);
-
- vkvg_line_to (ctx, x, y+ry);
- vkvg_elliptic_arc(ctx, x+rx, y , false, true, rx, ry, 0);
-
- vkvg_close_path(ctx);
-}