summaryrefslogtreecommitdiffstatsci
path: root/include
diff options
context:
space:
mode:
authorj-p <jp.bruyere@live.be>2018-04-10 05:59:40 +0200
committerGitHub <noreply@github.com>2018-04-10 05:59:40 +0200
commit88996c4e1f4844e183189eb578eff70d3bf09384 (patch)
tree35f351d5a289ee5b00dc4cc4c7974a9d962200e5 /include
parent45be65830e2c909f4ab4038c01af6a7f8d9db968 (diff)
Devel (#4)
* create surface from image, split device internal funs in separate file, update_descriptors from surf more generic * curve_to implementation with antigrain algorithm, should find correct limits
Diffstat (limited to 'include')
-rw-r--r--include/vkvg.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/vkvg.h b/include/vkvg.h
index bb01625..2c86cbf 100644
--- a/include/vkvg.h
+++ b/include/vkvg.h
@@ -6,10 +6,17 @@
#define VKVG_SAMPLES VK_SAMPLE_COUNT_4_BIT
-typedef enum VkvgDirection {
+typedef enum _vkvg_direction {
VKVG_HORIZONTAL = 0,
VKVG_VERTICAL = 1
-}VkvgDirection;
+}vkvg_direction_t;
+
+typedef enum _vkvg_format {
+ VKVG_FORMAT_ARGB32,
+ VKVG_FORMAT_RGB24,
+ VKVG_FORMAT_A8,
+ VKVG_FORMAT_A1
+} vkvg_format_t;
typedef struct _vkvg_context_t* VkvgContext;
typedef struct _vkvg_surface_t* VkvgSurface;
@@ -20,6 +27,8 @@ VkvgDevice vkvg_device_create (VkPhysicalDevice phy, VkDevice vkdev, VkQueue q
void vkvg_device_destroy (VkvgDevice dev);
VkvgSurface vkvg_surface_create (VkvgDevice dev, uint32_t width, uint32_t height);
+VkvgSurface vkvg_surface_create_from_image (VkvgDevice dev, const char* filePath);
+
void vkvg_surface_destroy (VkvgSurface surf);
VkImage vkvg_surface_get_vk_image (VkvgSurface surf);
VkImage vkvg_surface_get_vkh_image (VkvgSurface surf);
@@ -71,6 +80,7 @@ void vkvg_close_path (VkvgContext ctx);
void vkvg_line_to (VkvgContext ctx, float x, float y);
void vkvg_move_to (VkvgContext ctx, float x, float y);
void vkvg_arc (VkvgContext ctx, float xc, float yc, float radius, float a1, float a2);
+void vkvg_curve_to (VkvgContext ctx, float x1, float y1, float x2, float y2, float x3, float y3);
void vkvg_stroke (VkvgContext ctx);
void vkvg_stroke_preserve (VkvgContext ctx);
void vkvg_fill (VkvgContext ctx);