GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Enumerations | Functions
gp_backend_virtual.h File Reference

A virtual backend. More...

#include <core/gp_pixel.h>
#include <backends/gp_backend.h>

Go to the source code of this file.

Enumerations

enum  gp_backend_virt_flags { GP_BACKEND_CALL_EXIT = 0x01 }
 A virtual backend flags. More...
 

Functions

gp_backendgp_backend_virt_init (gp_backend *backend, gp_pixel_type pixel_type, enum gp_backend_virt_flags flags)
 Creates an virtual backend on the top of the existing backend.
 

Detailed Description

A virtual backend.

Virtual backend, could emulate backed with any pixel type on the top of an initalized backend, e.g. you can emulate 4bpp grayscale backend on the top of RBG888 X11.

Mostly useful for testing.

Definition in file gp_backend_virtual.h.

Enumeration Type Documentation

◆ gp_backend_virt_flags

A virtual backend flags.

Enumerator
GP_BACKEND_CALL_EXIT 

If set virtual backend exit calls 'parent' exit as well.

Definition at line 26 of file gp_backend_virtual.h.

Function Documentation

◆ gp_backend_virt_init()

gp_backend * gp_backend_virt_init ( gp_backend backend,
gp_pixel_type  pixel_type,
enum gp_backend_virt_flags  flags 
)

Creates an virtual backend on the top of the existing backend.

Parameters
backendAlready initialized backend.
pixel_typeA pixel type to emulate.
flagsA gp_backend_virt_flags.
Returns
A newly initialized virtual backend or NULL in a case of a failure.