Cairo-Dock
3.4.0
|
Macros | |
#define | cairo_dock_create_texture_from_image(cImagePath) |
#define | _cairo_dock_delete_texture(iTexture) |
#define | _cairo_dock_enable_texture(...) |
#define | _cairo_dock_disable_texture(...) |
#define | _cairo_dock_set_alpha(fAlpha) |
#define | _cairo_dock_set_blend_source(...) |
#define | _cairo_dock_set_blend_alpha(...) |
#define | _cairo_dock_set_blend_over(...) |
#define | _cairo_dock_set_blend_pbuffer(...) |
#define | _cairo_dock_apply_texture_at_size(iTexture, w, h) |
#define | _cairo_dock_apply_texture(iTexture) |
#define | _cairo_dock_apply_texture_at_size_with_alpha(iTexture, w, h, fAlpha) |
Functions | |
void | cairo_dock_render_one_icon_opengl (Icon *icon, CairoDock *pDock, double fDockMagnitude, gboolean bUseText) |
GLuint | cairo_dock_create_texture_from_surface (cairo_surface_t *pImageSurface) |
GLuint | cairo_dock_create_texture_from_raw_data (const guchar *pTextureRaw, int iWidth, int iHeight) |
GLuint | cairo_dock_create_texture_from_image_full (const gchar *cImagePath, double *fImageWidth, double *fImageHeight) |
void | cairo_dock_update_icon_texture (Icon *pIcon) |
This class provides some useful functions to draw with OpenGL.
#define cairo_dock_create_texture_from_image | ( | cImagePath | ) |
Load an image on the dock into an OpenGL texture. The texture will have the same size as the image.
cImagePath | path to an image. |
#define _cairo_dock_delete_texture | ( | iTexture | ) |
Delete an OpenGL texture from the Graphic Card.
iTexture | variable containing the ID of a texture. |
#define _cairo_dock_enable_texture | ( | ... | ) |
Enable texture drawing.
#define _cairo_dock_disable_texture | ( | ... | ) |
Disable texture drawing.
#define _cairo_dock_set_alpha | ( | fAlpha | ) |
Set the alpha channel to a current value, other channels are set to 1.
fAlpha | alpha |
#define _cairo_dock_set_blend_source | ( | ... | ) |
Set the color blending to overwrite.
#define _cairo_dock_set_blend_alpha | ( | ... | ) |
Set the color blending to mix, for premultiplied texture.
#define _cairo_dock_set_blend_over | ( | ... | ) |
Set the color blending to mix.
#define _cairo_dock_set_blend_pbuffer | ( | ... | ) |
Set the color blending to mix on a pbuffer.
#define _cairo_dock_apply_texture_at_size | ( | iTexture, | |
w, | |||
h | |||
) |
Draw a texture centered on the current point, at a given size.
iTexture | the texture |
w | width |
h | height |
#define _cairo_dock_apply_texture | ( | iTexture | ) |
Apply a texture centered on the current point and at the given scale.
iTexture | the texture |
#define _cairo_dock_apply_texture_at_size_with_alpha | ( | iTexture, | |
w, | |||
h, | |||
fAlpha | |||
) |
Draw a texture centered on the current point, at a given size, and with a given transparency.
iTexture | the texture |
w | width |
h | height |
fAlpha | the transparency, between 0 and 1. |
void cairo_dock_render_one_icon_opengl | ( | Icon * | icon, |
CairoDock * | pDock, | ||
double | fDockMagnitude, | ||
gboolean | bUseText | ||
) |
Draw an icon, according to its current parameters : position, transparency, reflect, rotation, stretching. Also draws its indicators, label, and quick-info. It generates a CAIRO_DOCK_RENDER_ICON notification.
icon | the icon to draw. |
pDock | the dock containing the icon. |
fDockMagnitude | current magnitude of the dock. |
bUseText | TRUE to draw the labels. |
GLuint cairo_dock_create_texture_from_surface | ( | cairo_surface_t * | pImageSurface | ) |
Load a cairo surface into an OpenGL texture. The surface can be destroyed after that if you don't need it. The texture will have the same size as the surface.
pImageSurface | the surface, created with one of the 'cairo_dock_create_surface_xxx' functions. |
GLuint cairo_dock_create_texture_from_raw_data | ( | const guchar * | pTextureRaw, |
int | iWidth, | ||
int | iHeight | ||
) |
Load a pixels buffer representing an image into an OpenGL texture.
pTextureRaw | a buffer of pixels. |
iWidth | width of the image. |
iHeight | height of the image. |
GLuint cairo_dock_create_texture_from_image_full | ( | const gchar * | cImagePath, |
double * | fImageWidth, | ||
double * | fImageHeight | ||
) |
Load an image on the dock into an OpenGL texture. The texture will have the same size as the image. The size is given as an output, if you need it for some reason.
cImagePath | path to an image. |
fImageWidth | pointer that will be filled with the width of the image. |
fImageHeight | pointer that will be filled with the height of the image. |
void cairo_dock_update_icon_texture | ( | Icon * | pIcon | ) |
Update the icon's texture with its current cairo surface. This allows you to draw an icon with libcairo, and just copy the result to the OpenGL texture to be able to draw the icon in OpenGL too.
pIcon | the icon. |