libtiger 0.3.4
|
Functions | |
int | tiger_renderer_create (tiger_renderer **tr) |
int | tiger_renderer_set_buffer (tiger_renderer *tr, unsigned char *ptr, int width, int height, int stride, int swap_rgb) |
int | tiger_renderer_set_quality (tiger_renderer *tr, double quality) |
int | tiger_renderer_destroy (tiger_renderer *tr) |
int | tiger_renderer_set_surface_clear_color (tiger_renderer *tr, int clear, double r, double g, double b, double a) |
int | tiger_renderer_add_event (tiger_renderer *tr, const kate_info *ki, const kate_event *ev) |
int | tiger_renderer_update (tiger_renderer *tr, kate_float t, int track) |
int | tiger_renderer_seek (tiger_renderer *tr, kate_float target) |
int | tiger_renderer_render (tiger_renderer *tr) |
int | tiger_renderer_is_dirty (const tiger_renderer *tr) |
int | tiger_renderer_set_default_font_description (tiger_renderer *tr, const char *desc) |
int | tiger_renderer_set_default_font (tiger_renderer *tr, const char *font) |
int | tiger_renderer_set_default_font_size (tiger_renderer *tr, double size) |
int | tiger_renderer_set_default_font_color (tiger_renderer *tr, double r, double g, double b, double a) |
int | tiger_renderer_set_default_background_fill_color (tiger_renderer *tr, double r, double g, double b, double a) |
int | tiger_renderer_set_default_font_effect (tiger_renderer *tr, tiger_font_effect effect, double strength) |
int | tiger_renderer_enable_caching (tiger_renderer *tr, int enable) |
int tiger_renderer_add_event | ( | tiger_renderer * | tr, |
const kate_info * | ki, | ||
const kate_event * | ev ) |
Adds an event to the renderer
tr | the Tiger renderer to add the event to |
ki | the kate_info for the stream this events belongs to |
ev | the event to add to the renderer |
References TIGER_E_INVALID_PARAMETER, and TIGER_E_OUT_OF_MEMORY.
int tiger_renderer_create | ( | tiger_renderer ** | tr | ) |
Creates a new Tiger renderer
tr | where to store a pointer to the newly created renderer |
References TIGER_E_INVALID_PARAMETER, and TIGER_E_OUT_OF_MEMORY.
int tiger_renderer_destroy | ( | tiger_renderer * | tr | ) |
Destroys a previously initialized Tiger renderer
tr | the Tiger renderer to clear |
References TIGER_E_INVALID_PARAMETER.
int tiger_renderer_enable_caching | ( | tiger_renderer * | tr, |
int | enable ) |
Enables or disables internal caching of text layouts
tr | the Tiger renderer for which to enable or disable caching |
enable | whether to enable or disable caching |
int tiger_renderer_is_dirty | ( | const tiger_renderer * | tr | ) |
Checks whether the Tiger renderer is dirty or not (eg, whether rendering a frame now would yield a different frame from the previous frame).
tr | the Tiger renderer to query |
int tiger_renderer_render | ( | tiger_renderer * | tr | ) |
Renders the current state of the renderer
tr | the Tiger renderer to update |
References TIGER_E_INVALID_PARAMETER.
int tiger_renderer_seek | ( | tiger_renderer * | tr, |
kate_float | target ) |
Registers that a seek occured
tr | the Tiger renderer on which the seek occured |
target | the target time of the seek |
References TIGER_E_INVALID_PARAMETER.
int tiger_renderer_set_buffer | ( | tiger_renderer * | tr, |
unsigned char * | ptr, | ||
int | width, | ||
int | height, | ||
int | stride, | ||
int | swap_rgb ) |
Sets a buffer where to render the Kate stream. This buffer should be a linear buffer with 32 bits per pixel, with 8 bits per color component in ARGB order (or ABGR is swap_rgb is non zero) in host endianness. This buffer will be used as backing store for a Cairo surface, so any other requirement by Cairo also applies here.
tr | the Tiger renderer for which to set the buffer |
ptr | the data to use as backing store for the Cairo surface |
width | the width of the Cairo surface to create |
height | the height of the Cairo surface to create |
stride | the stride of the Cairo surface to create |
swap_rgb | if non zero, red and blue components are swapped |
References TIGER_E_CAIRO_ERROR, and TIGER_E_INVALID_PARAMETER.
int tiger_renderer_set_default_background_fill_color | ( | tiger_renderer * | tr, |
double | r, | ||
double | g, | ||
double | b, | ||
double | a ) |
Sets the default font color to use for background. The default is to not fill the background (though a Kate event may specify a background), but in cases where the text may be hard to read over a video, specifying a background fill color will allow the text to stand out more.
tr | the Tiger renderer for which to set the background fill color |
r | the red component of the background fill color, in the 0-1 range |
g | the green component of the background fill color, in the 0-1 range |
b | the blue component of the background fill color, in the 0-1 range |
a | the alpha component of the background fill color, in the 0-1 range |
References TIGER_E_INVALID_PARAMETER.
int tiger_renderer_set_default_font | ( | tiger_renderer * | tr, |
const char * | font ) |
Sets the default font to use if none is specified
tr | the Tiger renderer for which to set the default font |
font | the font to use as default, a copy of which is made |
References TIGER_E_INVALID_PARAMETER, and TIGER_E_OUT_OF_MEMORY.
int tiger_renderer_set_default_font_color | ( | tiger_renderer * | tr, |
double | r, | ||
double | g, | ||
double | b, | ||
double | a ) |
Sets the default font color to use if none is specified
tr | the Tiger renderer for which to set the default font color |
r | the red component of the default color, in the 0-1 range |
g | the green component of the default color, in the 0-1 range |
b | the blue component of the default color, in the 0-1 range |
a | the alpha component of the default color, in the 0-1 range |
References TIGER_E_INVALID_PARAMETER.
int tiger_renderer_set_default_font_description | ( | tiger_renderer * | tr, |
const char * | desc ) |
Sets the default font description to use if no override is specified
tr | the Tiger renderer for which to set the default font |
desc | the font description to use as default |
References TIGER_E_INVALID_PARAMETER, and TIGER_E_OUT_OF_MEMORY.
int tiger_renderer_set_default_font_effect | ( | tiger_renderer * | tr, |
tiger_font_effect | effect, | ||
double | strength ) |
Sets the default font effect. The default is to have no effect (tiger_font_plain).
tr | the Tiger renderer for which to set which font effect to use |
effect | the font effect to use |
strength | how pronounced to make the effect (effect dependent) |
References TIGER_E_INVALID_PARAMETER.
int tiger_renderer_set_default_font_size | ( | tiger_renderer * | tr, |
double | size ) |
Sets the default font size to use if none is specified
tr | the Tiger renderer for which to set the default font size |
size | the font size to use as default |
References TIGER_E_INVALID_PARAMETER, and TIGER_E_OUT_OF_MEMORY.
int tiger_renderer_set_quality | ( | tiger_renderer * | tr, |
double | quality ) |
Sets a relative quality for the rendering
tr | the Tiger renderer for which to set the quality |
quality | rendering quality, between 0 (lowest, fastest) and 1 (highest, slowest), or negative for default quality |
References TIGER_E_INVALID_PARAMETER.
int tiger_renderer_set_surface_clear_color | ( | tiger_renderer * | tr, |
int | clear, | ||
double | r, | ||
double | g, | ||
double | b, | ||
double | a ) |
Sets whether to clear the surface before rendering, and the clearing color
tr | the Tiger renderer to modify |
clear | whether to clear before rendering |
r | the red value of the clear color |
g | the green value of the clear color |
b | the blue value of the clear color |
a | the alpha value of the clear color |
References TIGER_E_INVALID_PARAMETER.
int tiger_renderer_update | ( | tiger_renderer * | tr, |
kate_float | t, | ||
int | track ) |
Updates the renderer at the new time
tr | the Tiger renderer to update |
t | the time to update to renderer to |
track | whether to update item trackers |
References TIGER_E_INVALID_PARAMETER.