VKVG  
Vulkan Vector Graphics
Loading...
Searching...
No Matches
Typedefs | Functions
Surface

Description

This is the reference documentation for creating, using and destroying VKVG Surfaces used as backend for drawing operations.

Typedefs

typedef struct _vkvg_surface_t * VkvgSurface
 Opaque pointer on a Vkvg Surface structure.
 

Functions

VkvgSurface vkvg_surface_create (VkvgDevice dev, uint32_t width, uint32_t height)
 Create a new vkvg surface.
 
VkvgSurface vkvg_surface_create_from_image (VkvgDevice dev, const char *filePath)
 Create a new vkvg surface by loading an image file. The resulting surface will have the same dimension as the supplied image. This method will always return a valid pointer.
 
VkvgSurface vkvg_surface_create_for_VkhImage (VkvgDevice dev, void *vkhImg)
 Create a new vkvg surface using an existing vulkan texture as backend. This method will always return a valid pointer.
 
VkvgSurface vkvg_surface_create_from_bitmap (VkvgDevice dev, unsigned char *img, uint32_t width, uint32_t height)
 Create a new vkvg surface from an in memory rgba bitmap.
 
vkvg_status_t vkvg_surface_status (VkvgSurface surf)
 Get the current status of the surface.
 
VkvgSurface vkvg_surface_reference (VkvgSurface surf)
 Increment reference count on the surface by one.
 
uint32_t vkvg_surface_get_reference_count (VkvgSurface surf)
 Get the current reference count on this surface.
 
void vkvg_surface_destroy (VkvgSurface surf)
 Decrement the reference count on the surface by one. Destroy it if count reach 0.
 
void vkvg_surface_clear (VkvgSurface surf)
 Clear surface's content.
 
VkImage vkvg_surface_get_vk_image (VkvgSurface surf)
 Get the final single sampled vulkan image of this surface.
 
VkFormat vkvg_surface_get_vk_format (VkvgSurface surf)
 Get the vulkan format of the vulkan texture used as backend for this surface.
 
uint32_t vkvg_surface_get_width (VkvgSurface surf)
 Get the actual surface width.
 
uint32_t vkvg_surface_get_height (VkvgSurface surf)
 Get the actual surface height.
 
vkvg_status_t vkvg_surface_write_to_png (VkvgSurface surf, const char *path)
 Write surface content to a png file on disk.
 
vkvg_status_t vkvg_surface_write_to_memory (VkvgSurface surf, unsigned char *const bitmap)
 Save surface to memory.
 
void vkvg_surface_resolve (VkvgSurface surf)
 Explicitly resolve a multisampled surface.