imlib2.c File Reference
Imlib2 library. More...
Functions | ||||
EAPI void | imlib_context_set_cliprect (int x, int y, int w, int h) | |||
| ||||
EAPI void | imlib_context_set_dither_mask (char dither_mask) | |||
| ||||
EAPI char | imlib_context_get_dither_mask (void) | |||
| ||||
EAPI void | imlib_context_set_mask_alpha_threshold (int mask_alpha_threshold) | |||
| ||||
EAPI int | imlib_context_get_mask_alpha_threshold (void) | |||
| ||||
EAPI void | imlib_context_set_anti_alias (char anti_alias) | |||
| ||||
EAPI char | imlib_context_get_anti_alias (void) | |||
| ||||
EAPI void | imlib_context_set_dither (char dither) | |||
| ||||
EAPI char | imlib_context_get_dither (void) | |||
| ||||
EAPI void | imlib_context_set_blend (char blend) | |||
| ||||
EAPI char | imlib_context_get_blend (void) | |||
| ||||
EAPI void | imlib_context_set_color_modifier (Imlib_Color_Modifier color_modifier) | |||
| ||||
EAPI Imlib_Color_Modifier | imlib_context_get_color_modifier (void) | |||
| ||||
EAPI void | imlib_context_set_operation (Imlib_Operation operation) | |||
| ||||
EAPI Imlib_Operation | imlib_context_get_operation (void) | |||
| ||||
EAPI void | imlib_context_set_font (Imlib_Font font) | |||
| ||||
EAPI Imlib_Font | imlib_context_get_font (void) | |||
| ||||
EAPI void | imlib_context_set_direction (Imlib_Text_Direction direction) | |||
| ||||
EAPI void | imlib_context_set_angle (double angle) | |||
| ||||
EAPI double | imlib_context_get_angle (void) | |||
| ||||
EAPI Imlib_Text_Direction | imlib_context_get_direction (void) | |||
| ||||
EAPI void | imlib_context_set_color (int red, int green, int blue, int alpha) | |||
| ||||
EAPI void | imlib_context_get_color (int *red, int *green, int *blue, int *alpha) | |||
| ||||
EAPI Imlib_Color * | imlib_context_get_imlib_color (void) | |||
| ||||
EAPI void | imlib_context_set_color_hsva (float hue, float saturation, float value, int alpha) | |||
| ||||
EAPI void | imlib_context_get_color_hsva (float *hue, float *saturation, float *value, int *alpha) | |||
| ||||
EAPI void | imlib_context_set_color_hlsa (float hue, float lightness, float saturation, int alpha) | |||
| ||||
EAPI void | imlib_context_get_color_hlsa (float *hue, float *lightness, float *saturation, int *alpha) | |||
| ||||
EAPI void | imlib_context_set_color_cmya (int cyan, int magenta, int yellow, int alpha) | |||
| ||||
EAPI void | imlib_context_get_color_cmya (int *cyan, int *magenta, int *yellow, int *alpha) | |||
| ||||
EAPI void | imlib_context_set_color_range (Imlib_Color_Range color_range) | |||
| ||||
EAPI Imlib_Color_Range | imlib_context_get_color_range (void) | |||
| ||||
EAPI void | imlib_context_set_progress_function (Imlib_Progress_Function progress_function) | |||
| ||||
EAPI Imlib_Progress_Function | imlib_context_get_progress_function (void) | |||
| ||||
EAPI void | imlib_context_set_progress_granularity (char progress_granularity) | |||
| ||||
EAPI char | imlib_context_get_progress_granularity (void) | |||
| ||||
EAPI void | imlib_context_set_image (Imlib_Image image) | |||
| ||||
EAPI Imlib_Image | imlib_context_get_image (void) | |||
| ||||
EAPI int | imlib_get_cache_size (void) | |||
| ||||
EAPI void | imlib_set_cache_size (int bytes) | |||
| ||||
EAPI int | imlib_get_color_usage (void) | |||
| ||||
EAPI void | imlib_set_color_usage (int max) | |||
| ||||
EAPI void | imlib_flush_loaders (void) | |||
If you want Imlib2 to forcibly flush any cached loaders it has and re-load them from disk (this is useful if the program just installed a new loader and does not want to wait till Imlib2 deems it an optimal time to rescan the loaders). | ||||
EAPI Imlib_Image | imlib_load_image (const char *file) | |||
| ||||
EAPI Imlib_Image | imlib_load_image_immediately (const char *file) | |||
| ||||
EAPI Imlib_Image | imlib_load_image_without_cache (const char *file) | |||
| ||||
EAPI Imlib_Image | imlib_load_image_immediately_without_cache (const char *file) | |||
| ||||
EAPI Imlib_Image | imlib_load_image_with_error_return (const char *file, Imlib_Load_Error *error_return) | |||
| ||||
EAPI void | imlib_free_image (void) | |||
Frees the image that is set as the current image in Imlib2's context. | ||||
EAPI void | imlib_free_image_and_decache (void) | |||
Frees the current image in Imlib2's context AND removes it from the cache. | ||||
EAPI int | imlib_image_get_width (void) | |||
Returns the width in pixels of the current image in Imlib2's context. | ||||
EAPI int | imlib_image_get_height (void) | |||
Returns the height in pixels of the current image in Imlib2's context. | ||||
EAPI const char * | imlib_image_get_filename (void) | |||
| ||||
EAPI DATA32 * | imlib_image_get_data (void) | |||
| ||||
EAPI DATA32 * | imlib_image_get_data_for_reading_only (void) | |||
| ||||
EAPI void | imlib_image_put_back_data (DATA32 *data) | |||
| ||||
EAPI char | imlib_image_has_alpha (void) | |||
| ||||
EAPI void | imlib_image_set_changes_on_disk (void) | |||
By default Imlib2 will not check the timestamp of an image on disk and compare it with the image in its cache - this is to minimize disk activity when using the cache. | ||||
EAPI void | imlib_image_get_border (Imlib_Border *border) | |||
| ||||
EAPI void | imlib_image_set_border (Imlib_Border *border) | |||
| ||||
EAPI void | imlib_image_set_format (const char *format) | |||
| ||||
EAPI void | imlib_image_set_irrelevant_format (char irrelevant) | |||
| ||||
EAPI void | imlib_image_set_irrelevant_border (char irrelevant) | |||
| ||||
EAPI void | imlib_image_set_irrelevant_alpha (char irrelevant) | |||
| ||||
EAPI char * | imlib_image_format (void) | |||
| ||||
EAPI void | imlib_image_set_has_alpha (char has_alpha) | |||
| ||||
EAPI void | imlib_blend_image_onto_image (Imlib_Image source_image, char merge_alpha, int source_x, int source_y, int source_width, int source_height, int destination_x, int destination_y, int destination_width, int destination_height) | |||
| ||||
EAPI Imlib_Image | imlib_create_image (int width, int height) | |||
| ||||
EAPI Imlib_Image | imlib_create_image_using_data (int width, int height, DATA32 *data) | |||
| ||||
EAPI Imlib_Image | imlib_create_image_using_copied_data (int width, int height, DATA32 *data) | |||
| ||||
EAPI Imlib_Image | imlib_clone_image (void) | |||
| ||||
EAPI Imlib_Image | imlib_create_cropped_image (int x, int y, int width, int height) | |||
| ||||
EAPI Imlib_Image | imlib_create_cropped_scaled_image (int source_x, int source_y, int source_width, int source_height, int destination_width, int destination_height) | |||
| ||||
EAPI Imlib_Updates | imlib_updates_clone (Imlib_Updates updates) | |||
| ||||
EAPI Imlib_Updates | imlib_update_append_rect (Imlib_Updates updates, int x, int y, int w, int h) | |||
| ||||
EAPI Imlib_Updates | imlib_updates_merge (Imlib_Updates updates, int w, int h) | |||
| ||||
EAPI Imlib_Updates | imlib_updates_merge_for_rendering (Imlib_Updates updates, int w, int h) | |||
| ||||
EAPI void | imlib_updates_free (Imlib_Updates updates) | |||
| ||||
EAPI Imlib_Updates | imlib_updates_get_next (Imlib_Updates updates) | |||
| ||||
EAPI void | imlib_updates_get_coordinates (Imlib_Updates updates, int *x_return, int *y_return, int *width_return, int *height_return) | |||
| ||||
EAPI void | imlib_updates_set_coordinates (Imlib_Updates updates, int x, int y, int width, int height) | |||
| ||||
EAPI Imlib_Updates | imlib_updates_init (void) | |||
| ||||
EAPI Imlib_Updates | imlib_updates_append_updates (Imlib_Updates updates, Imlib_Updates appended_updates) | |||
| ||||
EAPI void | imlib_image_flip_horizontal (void) | |||
Flips/mirrors the current image horizontally. | ||||
EAPI void | imlib_image_flip_vertical (void) | |||
Flips/mirrors the current image vertically. | ||||
EAPI void | imlib_image_flip_diagonal (void) | |||
Flips/mirrors the current image diagonally (good for quick and dirty 90 degree rotations if used before to after a horizontal or vertical flip). | ||||
EAPI void | imlib_image_orientate (int orientation) | |||
| ||||
EAPI void | imlib_image_blur (int radius) | |||
| ||||
EAPI void | imlib_image_sharpen (int radius) | |||
| ||||
EAPI void | imlib_image_tile_horizontal (void) | |||
Modifies an image so it will tile seamlessly horizontally if used as a tile (i.e. | ||||
EAPI void | imlib_image_tile_vertical (void) | |||
Modifies an image so it will tile seamlessly vertically if used as a tile (i.e. | ||||
EAPI void | imlib_image_tile (void) | |||
Modifies an image so it will tile seamlessly horizontally and vertically if used as a tile (i.e. | ||||
EAPI Imlib_Font | imlib_load_font (const char *font_name) | |||
| ||||
EAPI void | imlib_free_font (void) | |||
Removes the current font from any fallback chain it's in and frees it. | ||||
EAPI int | imlib_insert_font_into_fallback_chain (Imlib_Font font, Imlib_Font fallback_font) | |||
| ||||
EAPI void | imlib_remove_font_from_fallback_chain (Imlib_Font fallback_font) | |||
| ||||
EAPI Imlib_Font | imlib_get_prev_font_in_fallback_chain (Imlib_Font fn) | |||
EAPI Imlib_Font | imlib_get_next_font_in_fallback_chain (Imlib_Font fn) | |||
EAPI void | imlib_text_draw (int x, int y, const char *text) | |||
| ||||
EAPI void | imlib_text_draw_with_return_metrics (int x, int y, const char *text, int *width_return, int *height_return, int *horizontal_advance_return, int *vertical_advance_return) | |||
| ||||
EAPI void | imlib_get_text_size (const char *text, int *width_return, int *height_return) | |||
| ||||
EAPI void | imlib_get_text_advance (const char *text, int *horizontal_advance_return, int *vertical_advance_return) | |||
| ||||
EAPI int | imlib_get_text_inset (const char *text) | |||
| ||||
EAPI void | imlib_add_path_to_font_path (const char *path) | |||
| ||||
EAPI void | imlib_remove_path_from_font_path (const char *path) | |||
| ||||
EAPI char ** | imlib_list_font_path (int *number_return) | |||
| ||||
EAPI int | imlib_text_get_index_and_location (const char *text, int x, int y, int *char_x_return, int *char_y_return, int *char_width_return, int *char_height_return) | |||
| ||||
EAPI void | imlib_text_get_location_at_index (const char *text, int index, int *char_x_return, int *char_y_return, int *char_width_return, int *char_height_return) | |||
| ||||
EAPI char ** | imlib_list_fonts (int *number_return) | |||
| ||||
EAPI void | imlib_free_font_list (char **font_list, int number) | |||
| ||||
EAPI int | imlib_get_font_cache_size (void) | |||
| ||||
EAPI void | imlib_set_font_cache_size (int bytes) | |||
| ||||
EAPI void | imlib_flush_font_cache (void) | |||
Causes a flush of all speculatively cached fonts from the font cache. | ||||
EAPI int | imlib_get_font_ascent (void) | |||
| ||||
EAPI int | imlib_get_font_descent (void) | |||
| ||||
EAPI int | imlib_get_maximum_font_ascent (void) | |||
| ||||
EAPI int | imlib_get_maximum_font_descent (void) | |||
| ||||
EAPI Imlib_Color_Modifier | imlib_create_color_modifier (void) | |||
| ||||
EAPI void | imlib_free_color_modifier (void) | |||
Frees the current color modifier. | ||||
EAPI void | imlib_modify_color_modifier_gamma (double gamma_value) | |||
| ||||
EAPI void | imlib_modify_color_modifier_brightness (double brightness_value) | |||
| ||||
EAPI void | imlib_modify_color_modifier_contrast (double contrast_value) | |||
| ||||
EAPI void | imlib_set_color_modifier_tables (DATA8 *red_table, DATA8 *green_table, DATA8 *blue_table, DATA8 *alpha_table) | |||
| ||||
EAPI void | imlib_get_color_modifier_tables (DATA8 *red_table, DATA8 *green_table, DATA8 *blue_table, DATA8 *alpha_table) | |||
| ||||
EAPI void | imlib_reset_color_modifier (void) | |||
Resets the current color modifier to have linear mapping tables. | ||||
EAPI void | imlib_apply_color_modifier (void) | |||
Uses the current color modifier and modifies the current image using the mapping tables in the current color modifier. | ||||
EAPI void | imlib_apply_color_modifier_to_rectangle (int x, int y, int width, int height) | |||
| ||||
EAPI Imlib_Updates | imlib_image_draw_line (int x1, int y1, int x2, int y2, char make_updates) | |||
| ||||
EAPI void | imlib_image_draw_rectangle (int x, int y, int width, int height) | |||
| ||||
EAPI void | imlib_image_fill_rectangle (int x, int y, int width, int height) | |||
| ||||
EAPI void | imlib_image_copy_alpha_to_image (Imlib_Image image_source, int x, int y) | |||
| ||||
EAPI void | imlib_image_copy_alpha_rectangle_to_image (Imlib_Image image_source, int x, int y, int width, int height, int destination_x, int destination_y) | |||
| ||||
EAPI void | imlib_image_scroll_rect (int x, int y, int width, int height, int delta_x, int delta_y) | |||
| ||||
EAPI void | imlib_image_copy_rect (int x, int y, int width, int height, int new_x, int new_y) | |||
| ||||
EAPI Imlib_Color_Range | imlib_create_color_range (void) | |||
| ||||
EAPI void | imlib_free_color_range (void) | |||
Frees the current color range. | ||||
EAPI void | imlib_add_color_to_color_range (int distance_away) | |||
| ||||
EAPI void | imlib_image_fill_color_range_rectangle (int x, int y, int width, int height, double angle) | |||
| ||||
EAPI void | imlib_image_fill_hsva_color_range_rectangle (int x, int y, int width, int height, double angle) | |||
| ||||
EAPI void | imlib_image_query_pixel (int x, int y, Imlib_Color *color_return) | |||
| ||||
EAPI void | imlib_image_query_pixel_hsva (int x, int y, float *hue, float *saturation, float *value, int *alpha) | |||
| ||||
EAPI void | imlib_image_query_pixel_hlsa (int x, int y, float *hue, float *lightness, float *saturation, int *alpha) | |||
| ||||
EAPI void | imlib_image_query_pixel_cmya (int x, int y, int *cyan, int *magenta, int *yellow, int *alpha) | |||
| ||||
EAPI void | imlib_image_attach_data_value (const char *key, void *data, int value, Imlib_Internal_Data_Destructor_Function destructor_function) | |||
| ||||
EAPI void * | imlib_image_get_attached_data (const char *key) | |||
| ||||
EAPI int | imlib_image_get_attached_value (const char *key) | |||
| ||||
EAPI void | imlib_image_remove_attached_data_value (const char *key) | |||
| ||||
EAPI void | imlib_image_remove_and_free_attached_data_value (const char *key) | |||
| ||||
EAPI void | imlib_save_image (const char *filename) | |||
| ||||
EAPI void | imlib_save_image_with_error_return (const char *filename, Imlib_Load_Error *error_return) | |||
| ||||
EAPI Imlib_Image | imlib_create_rotated_image (double angle) | |||
| ||||
EAPI void | imlib_blend_image_onto_image_at_angle (Imlib_Image source_image, char merge_alpha, int source_x, int source_y, int source_width, int source_height, int destination_x, int destination_y, int angle_x, int angle_y) | |||
| ||||
EAPI void | imlib_blend_image_onto_image_skewed (Imlib_Image source_image, char merge_alpha, int source_x, int source_y, int source_width, int source_height, int destination_x, int destination_y, int h_angle_x, int h_angle_y, int v_angle_x, int v_angle_y) | |||
| ||||
EAPI void | imlib_context_set_filter (Imlib_Filter filter) | |||
| ||||
EAPI Imlib_Filter | imlib_context_get_filter (void) | |||
| ||||
EAPI ImlibPolygon | imlib_polygon_new (void) | |||
Returns a new polygon object with no points set. | ||||
EAPI void | imlib_polygon_add_point (ImlibPolygon poly, int x, int y) | |||
| ||||
EAPI void | imlib_polygon_free (ImlibPolygon poly) | |||
| ||||
EAPI void | imlib_image_draw_polygon (ImlibPolygon poly, unsigned char closed) | |||
| ||||
EAPI void | imlib_image_fill_polygon (ImlibPolygon poly) | |||
| ||||
EAPI void | imlib_polygon_get_bounds (ImlibPolygon poly, int *px1, int *py1, int *px2, int *py2) | |||
| ||||
EAPI void | imlib_image_draw_ellipse (int xc, int yc, int a, int b) | |||
| ||||
EAPI void | imlib_image_fill_ellipse (int xc, int yc, int a, int b) | |||
| ||||
EAPI unsigned char | imlib_polygon_contains_point (ImlibPolygon poly, int x, int y) | |||
|
Detailed Description
Imlib2 library.Brief of imlib2 library
Function Documentation
EAPI void imlib_add_color_to_color_range | ( | int | distance_away | ) |
- Parameters:
-
distance_away Distance from the previous color.
Adds the current color to the current color range at a distance_away
distance from the previous color in the range (if it's the first color in the range this is irrelevant).
EAPI void imlib_add_path_to_font_path | ( | const char * | path | ) |
- Parameters:
-
path A directory path.
Adds the directory path
to the end of the current list of directories to scan for fonts.
EAPI void imlib_apply_color_modifier_to_rectangle | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |
- Parameters:
-
x The x coordinate of the left edge of the rectangle.
- Parameters:
-
y The y coordinate of the top edge of the rectangle. width The width of the rectangle. height The height of the rectangle.
EAPI void imlib_blend_image_onto_image | ( | Imlib_Image | source_image, | |
char | merge_alpha, | |||
int | source_x, | |||
int | source_y, | |||
int | source_width, | |||
int | source_height, | |||
int | destination_x, | |||
int | destination_y, | |||
int | destination_width, | |||
int | destination_height | |||
) |
- Parameters:
-
source_image The source image.
- Parameters:
-
merge_alpha Alpha flag. source_x X coordinate of the source image. source_y Y coordinate of the source image. source_width Width of the source image. source_height Height of the source image. destination_x X coordinate of the destination image. destination_y Y coordinate of the destination image. destination_width Width of the destination image. destination_height Height of the destination image.
source_x
, source_y
, source_width
, source_height
) from source_image
onto the current image at the destination (destination_x
, destination_y
) location scaled to the width destination_width
and height destination_height
. If merge_alpha
is set to 1 it will also modify the destination image alpha channel, otherwise the destination alpha channel is left untouched.
EAPI void imlib_blend_image_onto_image_at_angle | ( | Imlib_Image | source_image, | |
char | merge_alpha, | |||
int | source_x, | |||
int | source_y, | |||
int | source_width, | |||
int | source_height, | |||
int | destination_x, | |||
int | destination_y, | |||
int | angle_x, | |||
int | angle_y | |||
) |
- Parameters:
-
source_image The image source.
- Parameters:
-
merge_alpha A char. source_x The source x coordinate. source_y The source y coordinate. source_width The source width. source_height The source height. destination_x The destination x coordinate. destination_y The destination y coordinate. angle_x An angle. angle_y An angle.
v_angle_x
and v_angle_y
are 0).
EAPI void imlib_blend_image_onto_image_skewed | ( | Imlib_Image | source_image, | |
char | merge_alpha, | |||
int | source_x, | |||
int | source_y, | |||
int | source_width, | |||
int | source_height, | |||
int | destination_x, | |||
int | destination_y, | |||
int | h_angle_x, | |||
int | h_angle_y, | |||
int | v_angle_x, | |||
int | v_angle_y | |||
) |
- Parameters:
-
source_image The source image.
- Parameters:
-
merge_alpha A char source_x The source x coordinate. source_y The source y coordinate. source_width The source width. source_height The source height. destination_x The destination x coordinate. destination_y The destination y coordinate. h_angle_x An angle. h_angle_y An angle. v_angle_x An angle. v_angle_y An angle.
source_x
, source_y
, source_width
, source_height
) from the source_image
onto the current image at the destination (destination_x
, destination_y
) location. It will be rotated and scaled so that the upper right corner will be positioned h_angle_x
pixels to the right (or left, if negative) and h_angle_y
pixels down (from (destination_x
, destination_y
). If v_angle_x
and v_angle_y
are not 0, the image will also be skewed so that the lower left corner will be positioned v_angle_x
pixels to the right and v_angle_y
pixels down. The at_angle versions simply have the v_angle_x
and v_angle_y
set to 0 so the rotation doesn't get skewed, and the render_..._on_drawable ones seem obvious enough; they do the same on a drawable.Example:
imlib_blend_image_onto_image_skewed(..., 0, 0, 100, 0, 0, 100);
imlib_blend_image_onto_image_skewed(..., 0, 0, 0, 100, 100, 0);
imlib_blend_image_onto_image_skewed(..., 100, 0, 0, 100, -100, 0);
imlib_blend_image_onto_image_skewed(..., 50, 0, 50, 50, -50, 50);
imlib_blend_image_onto_image_skewed(..., 50, 50, 100 * cos(a), 100 * sin(a), 0);
EAPI Imlib_Image imlib_clone_image | ( | void | ) |
- Returns:
- A valid image, otherwise NULL.
Creates an exact duplicate of the current image and returns a valid image handle on success, or NULL on failure.
EAPI double imlib_context_get_angle | ( | void | ) |
- Returns:
- The current angle of the text strings.
Returns the current angle used to render text at if the direction is IMLIB_TEXT_TO_ANGLE.
EAPI char imlib_context_get_anti_alias | ( | void | ) |
- Returns:
- The current anti alias flag.
Returns if Imlib2 currently will smoothly scale images. 1 means it will and 0 means it will not.
EAPI char imlib_context_get_blend | ( | void | ) |
- Returns:
- The current blending flag.
Returns if Imlib2 will blend images onto a drawable whilst rendering to that drawable. 1 means yes and 0 means no.
EAPI void imlib_context_get_color | ( | int * | red, | |
int * | green, | |||
int * | blue, | |||
int * | alpha | |||
) |
- Parameters:
-
red Red channel of the current color.
- Parameters:
-
green Green channel of the current color. blue Blue channel of the current color. alpha Alpha channel of the current color.
EAPI void imlib_context_get_color_cmya | ( | int * | cyan, | |
int * | magenta, | |||
int * | yellow, | |||
int * | alpha | |||
) |
- Parameters:
-
cyan Cyan channel of the current color.
- Parameters:
-
magenta Magenta channel of the current color. yellow Yellow channel of the current color. alpha Alpha channel of the current color.
EAPI void imlib_context_get_color_hlsa | ( | float * | hue, | |
float * | lightness, | |||
float * | saturation, | |||
int * | alpha | |||
) |
- Parameters:
-
hue Hue channel of the current color.
- Parameters:
-
lightness Lightness channel of the current color. saturation Saturation channel of the current color. alpha Alpha channel of the current color.
EAPI void imlib_context_get_color_hsva | ( | float * | hue, | |
float * | saturation, | |||
float * | value, | |||
int * | alpha | |||
) |
- Parameters:
-
hue Hue channel of the current color.
- Parameters:
-
saturation Saturation channel of the current color. value Value channel of the current color. alpha Alpha channel of the current color.
EAPI Imlib_Color_Modifier imlib_context_get_color_modifier | ( | void | ) |
- Returns:
- The current color modifier.
Returns the current color modifier being used.
EAPI Imlib_Color_Range imlib_context_get_color_range | ( | void | ) |
- Returns:
- The current color range.
Returns the current color range being used for gradients.
EAPI Imlib_Text_Direction imlib_context_get_direction | ( | void | ) |
- Returns:
- The current direction of the text.
Returns the current direction to render text in.
EAPI char imlib_context_get_dither | ( | void | ) |
- Returns:
- The current dithering flag.
Returns if image data is rendered with dithering currently. 1 means yes and 0 means no.
EAPI char imlib_context_get_dither_mask | ( | void | ) |
- Returns:
- The current dither mask flag.
Returns the current mode for dithering pixmap masks. 1 means dithering is enabled and 0 means it is not.
EAPI Imlib_Filter imlib_context_get_filter | ( | void | ) |
- Returns:
Gets the current context image filter.
EAPI Imlib_Font imlib_context_get_font | ( | void | ) |
- Returns:
- The current font.
Returns the current font.
EAPI Imlib_Image imlib_context_get_image | ( | void | ) |
- Returns:
- The current image.
Returns the current context image.
EAPI Imlib_Color* imlib_context_get_imlib_color | ( | void | ) |
- Returns:
- The current color.
Returns the current color as a color struct. Do NOT free this pointer.
EAPI int imlib_context_get_mask_alpha_threshold | ( | void | ) |
- Returns:
- The current mask mask alpha threshold.
Returns the current mask alpha threshold.
EAPI Imlib_Operation imlib_context_get_operation | ( | void | ) |
- Returns:
- The current operation mode.
Returns the current operation mode.
EAPI Imlib_Progress_Function imlib_context_get_progress_function | ( | void | ) |
- Returns:
- The current progress function.
Returns the current progress function being used.
EAPI char imlib_context_get_progress_granularity | ( | void | ) |
- Returns:
- The current progress granularity
Returns the current progress granularity being used.
EAPI void imlib_context_set_angle | ( | double | angle | ) |
- Parameters:
-
angle Angle of the text strings.
Sets the angle at which text strings will be drawn if the text direction has been set to IMLIB_TEXT_TO_ANGLE with imlib_context_set_direction().
EAPI void imlib_context_set_anti_alias | ( | char | anti_alias | ) |
- Parameters:
-
anti_alias The anti alias flag.
Toggles "anti-aliased" scaling of images. This isn't quite correct since it's actually super and sub pixel sampling that it turns on and off, but anti-aliasing is used for having "smooth" edges to lines and shapes and this means when images are scaled they will keep their smooth appearance. Passing in 1 turns this on and 0 turns it off.
EAPI void imlib_context_set_blend | ( | char | blend | ) |
- Parameters:
-
blend The blending flag.
When rendering an image to a drawable, Imlib2 is able to blend the image directly onto the drawable during rendering. Setting this to 1 will enable this. If the image has no alpha channel this has no effect. Setting it to 0 will disable this.
EAPI void imlib_context_set_cliprect | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h | |||
) |
- Parameters:
-
x The top left x coordinate of the rectangle.
- Parameters:
-
y The top left y coordinate of the rectangle. w The width of the rectangle. h The height of the rectangle.
EAPI void imlib_context_set_color | ( | int | red, | |
int | green, | |||
int | blue, | |||
int | alpha | |||
) |
- Parameters:
-
red Red channel of the current color.
- Parameters:
-
green Green channel of the current color. blue Blue channel of the current color. alpha Alpha channel of the current color.
red
, green
, blue
and alpha
are between 0 and 255 - any other values have undefined results.
EAPI void imlib_context_set_color_cmya | ( | int | cyan, | |
int | magenta, | |||
int | yellow, | |||
int | alpha | |||
) |
- Parameters:
-
cyan Cyan channel of the current color.
- Parameters:
-
magenta Magenta channel of the current color. yellow Yellow channel of the current color. alpha Alpha channel of the current color.
cyan
, magenta
, yellow
and alpha
are between 0 and 255 - any other values have undefined results.
EAPI void imlib_context_set_color_hlsa | ( | float | hue, | |
float | lightness, | |||
float | saturation, | |||
int | alpha | |||
) |
- Parameters:
-
hue Hue channel of the current color.
- Parameters:
-
lightness Lightness channel of the current color. saturation Saturation channel of the current color. alpha Alpha channel of the current color.
hue
are between 0 and 360, values for lightness
and saturation
between 0 and 1, and values for alpha
are between 0 and 255 - any other values have undefined results.
EAPI void imlib_context_set_color_hsva | ( | float | hue, | |
float | saturation, | |||
float | value, | |||
int | alpha | |||
) |
- Parameters:
-
hue Hue channel of the current color.
- Parameters:
-
saturation Saturation channel of the current color. value Value channel of the current color. alpha Alpha channel of the current color.
hue
are between 0 and 360, values for saturation
and value
between 0 and 1, and values for alpha
are between 0 and 255 - any other values have undefined results.
EAPI void imlib_context_set_color_modifier | ( | Imlib_Color_Modifier | color_modifier | ) |
- Parameters:
-
color_modifier Current color modifier.
Sets the current color modifier used for rendering pixmaps or images to a drawable or images onto other images. Color modifiers are lookup tables that map the values in the red, green, blue and alpha channels to other values in the same channel when rendering, allowing for fades, color correction etc. to be done whilst rendering. pass in NULL as the color_modifier to disable the color modifier for rendering.
EAPI void imlib_context_set_color_range | ( | Imlib_Color_Range | color_range | ) |
- Parameters:
-
color_range Color range.
Sets the current color range to use for rendering gradients.
EAPI void imlib_context_set_direction | ( | Imlib_Text_Direction | direction | ) |
- Parameters:
-
direction Text direction.
Sets the direction in which to draw text in terms of simple 90 degree orientations or an arbitrary angle. The direction can be one of IMLIB_TEXT_TO_RIGHT, IMLIB_TEXT_TO_LEFT, IMLIB_TEXT_TO_DOWN, IMLIB_TEXT_TO_UP or IMLIB_TEXT_TO_ANGLE. The default is IMLIB_TEXT_TO_RIGHT. If you use IMLIB_TEXT_TO_ANGLE, you will also have to set the angle with imlib_context_set_angle().
EAPI void imlib_context_set_dither | ( | char | dither | ) |
- Parameters:
-
dither The dithering flag.
Sets the dithering flag for rendering to a drawable or when pixmaps are produced. This affects the color image appearance by enabling dithering. Dithering slows down rendering but produces considerably better results. this option has no effect foe rendering in 24 bit and up, but in 16 bit and lower it will dither, producing smooth gradients and much better quality images. setting dither to 1 enables it and 0 disables it.
EAPI void imlib_context_set_dither_mask | ( | char | dither_mask | ) |
- Parameters:
-
dither_mask The dither mask flag.
Selects if, you are rendering to a mask, or producing pixmap masks from images, if the mask is to be dithered or not. passing in 1 for dither_mask means the mask pixmap will be dithered, 0 means it will not be dithered.
EAPI void imlib_context_set_filter | ( | Imlib_Filter | filter | ) |
- Parameters:
-
filter Current filter.
Sets the current filter to be used when applying filters to images. Set this to NULL to disable filters.
EAPI void imlib_context_set_font | ( | Imlib_Font | font | ) |
- Parameters:
-
font Current font.
Sets the current font to use when rendering text. you should load the font first with imlib_load_font().
EAPI void imlib_context_set_image | ( | Imlib_Image | image | ) |
- Parameters:
-
image Current image.
Sets the current image Imlib2 will be using with its function calls.
EAPI void imlib_context_set_mask_alpha_threshold | ( | int | mask_alpha_threshold | ) |
- Parameters:
-
mask_alpha_threshold The mask alpha threshold.
Selects, if you are rendering to a mask, the alpha threshold above which mask bits are set. The default mask alpha threshold is 128, meaning that a mask bit will be set if the pixel alpha is >= 128.
EAPI void imlib_context_set_operation | ( | Imlib_Operation | operation | ) |
- Parameters:
-
operation
When Imlib2 draws an image onto another or an image onto a drawable it is able to do more than just blend the result on using the given alpha channel of the image. It is also able to do saturating additive, subtractive and a combination of the both (called reshade) rendering. The default mode is IMLIB_OP_COPY. you can also set it to IMLIB_OP_ADD, IMLIB_OP_SUBTRACT or IMLIB_OP_RESHADE. Use this function to set the rendering operation. IMLIB_OP_COPY performs basic alpha blending: DST = (SRC * A) + (DST * (1 - A)). IMLIB_OP_ADD does DST = DST + (SRC * A). IMLIB_OP_SUBTRACT does DST = DST - (SRC * A) and IMLIB_OP_RESHADE does DST = DST + (((SRC - 0.5) / 2) * A).
EAPI void imlib_context_set_progress_function | ( | Imlib_Progress_Function | progress_function | ) |
- Parameters:
-
progress_function A progress function.
Sets the progress function to be called back whilst loading images. Set this to the function to be called, or set it to NULL to disable progress callbacks whilst loading.
EAPI void imlib_context_set_progress_granularity | ( | char | progress_granularity | ) |
- Parameters:
-
progress_granularity A char.
This hints as to how often to call the progress callback. 0 means as often as possible. 1 means whenever 15 more of the image has been decoded, 10 means every 10% of the image decoding, 50 means every 50% and 100 means only call at the end. Values outside of the range 0-100 are undefined.
EAPI Imlib_Color_Modifier imlib_create_color_modifier | ( | void | ) |
- Returns:
- Valid handle.
Creates a new empty color modifier and returns a valid handle on success. NULL is returned on failure.
EAPI Imlib_Color_Range imlib_create_color_range | ( | void | ) |
- Returns:
- valid handle.
Creates a new empty color range and returns a valid handle to that color range.
EAPI Imlib_Image imlib_create_cropped_image | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |
- Parameters:
-
x The top left x coordinate of the rectangle.
- Parameters:
-
y The top left y coordinate of the rectangle. width The width of the rectangle. height The height of the rectangle.
- Returns:
- A valid image, otherwise NULL.
x
, y
, width
, height
) rectangle in the current image and returns a valid image handle on success, or NULL on failure.
EAPI Imlib_Image imlib_create_cropped_scaled_image | ( | int | source_x, | |
int | source_y, | |||
int | source_width, | |||
int | source_height, | |||
int | destination_width, | |||
int | destination_height | |||
) |
- Parameters:
-
source_x The top left x coordinate of the source rectangle.
- Parameters:
-
source_y The top left y coordinate of the source rectangle. source_width The width of the source rectangle. source_height The height of the source rectangle. destination_width The width of the destination image. destination_height The height of the destination image.
- Returns:
- A valid image, otherwise NULL.
destination_width
and destination_height
whilst cropping.
EAPI Imlib_Image imlib_create_image | ( | int | width, | |
int | height | |||
) |
- Parameters:
-
width The width of the image.
- Parameters:
-
height The height of the image.
- Returns:
- A new blank image.
width
and height
. The contents of this image at creation time are undefined (they could be garbage memory). You are free to do whatever you like with this image. It is not cached. On success an image handle is returned - on failure NULL is returned.
EAPI Imlib_Image imlib_create_image_using_copied_data | ( | int | width, | |
int | height, | |||
DATA32 * | data | |||
) |
- Parameters:
-
width The width of the image.
- Parameters:
-
height The height of the image. data The data.
- Returns:
- A valid image, otherwise NULL.
EAPI Imlib_Image imlib_create_image_using_data | ( | int | width, | |
int | height, | |||
DATA32 * | data | |||
) |
- Parameters:
-
width The width of the image.
- Parameters:
-
height The height of the image. data The data.
- Returns:
- A valid image, otherwise NULL.
width
and the height height
specified. The image data data
must be in the same format as imlib_image_get_data() would return. You are responsible for freeing this image data once the image is freed - Imlib2 will not do that for you. This is useful for when you already have static buffers of the same format Imlib2 uses (many video grabbing devices use such a format) and wish to use Imlib2 to render the results onto another image, or X drawable. You should free the image when you are done with it. Imlib2 returns a valid image handle on success or NULL on failure
EAPI Imlib_Image imlib_create_rotated_image | ( | double | angle | ) |
- Parameters:
-
angle An angle in radians.
- Returns:
- A new image, or NULL.
angle
radians. On success it returns a valid image handle, otherwise NULL.
EAPI void imlib_free_font_list | ( | char ** | font_list, | |
int | number | |||
) |
- Parameters:
-
font_list The font list.
- Parameters:
-
number Number of fonts in the list.
EAPI int imlib_get_cache_size | ( | void | ) |
- Returns:
- The current image size.
Returns the current size of the image cache in bytes. The cache is a unified cache used for image data AND pixmaps.
EAPI void imlib_get_color_modifier_tables | ( | DATA8 * | red_table, | |
DATA8 * | green_table, | |||
DATA8 * | blue_table, | |||
DATA8 * | alpha_table | |||
) |
- Parameters:
-
red_table,: an array of DATA8.
- Parameters:
-
green_table,: an array of DATA8. blue_table,: an array of DATA8. alpha_table,: an array of DATA8.
EAPI int imlib_get_color_usage | ( | void | ) |
- Returns:
- The current number of colors.
Gets the number of colors Imlib2 currently at a maximum is allowed to allocate for rendering. The default is 256.
EAPI int imlib_get_font_ascent | ( | void | ) |
- Returns:
- The font's ascent.
Returns the current font's ascent value in pixels.
EAPI int imlib_get_font_cache_size | ( | void | ) |
- Returns:
- The font cache size.
Returns the font cache size in bytes.
EAPI int imlib_get_font_descent | ( | void | ) |
- Returns:
- The font's descent.
Returns the current font's descent value in pixels.
EAPI int imlib_get_maximum_font_ascent | ( | void | ) |
- Returns:
- The font's maximum ascent.
Returns the current font's maximum ascent extent.
EAPI int imlib_get_maximum_font_descent | ( | void | ) |
- Returns:
- The font's maximum descent.
Returns the current font's maximum descent extent.
EAPI Imlib_Font imlib_get_next_font_in_fallback_chain | ( | Imlib_Font | fn | ) |
- Deprecated:
- This function may be removed.
EAPI Imlib_Font imlib_get_prev_font_in_fallback_chain | ( | Imlib_Font | fn | ) |
- Deprecated:
- This function may be removed.
EAPI void imlib_get_text_advance | ( | const char * | text, | |
int * | horizontal_advance_return, | |||
int * | vertical_advance_return | |||
) |
- Parameters:
-
text A string.
- Parameters:
-
horizontal_advance_return Horizontal offset. vertical_advance_return Vertical offset.
EAPI int imlib_get_text_inset | ( | const char * | text | ) |
- Parameters:
-
text A string.
- Returns:
- The inset value of .
text
in using the current font and returns that value in pixels.
EAPI void imlib_get_text_size | ( | const char * | text, | |
int * | width_return, | |||
int * | height_return | |||
) |
- Parameters:
-
text A string.
- Parameters:
-
width_return The width of the text. height_return The height of the text.
text
string would use up if drawn with the current font.
EAPI void imlib_image_attach_data_value | ( | const char * | key, | |
void * | data, | |||
int | value, | |||
Imlib_Internal_Data_Destructor_Function | destructor_function | |||
) |
- Parameters:
-
key A string.
- Parameters:
-
data A pointer. value A value. destructor_function An Imlib internal function.
key
, and the data of data
and an integer of value
. The destructor_function
function, if not NULL is called when this image is freed so the destructor can free data
, if this is needed.
EAPI void imlib_image_blur | ( | int | radius | ) |
- Parameters:
-
radius The radius.
Blurs the current image. A radius
value of 0 has no effect, 1 and above determine the blur matrix radius that determine how much to blur the image.
EAPI void imlib_image_copy_alpha_rectangle_to_image | ( | Imlib_Image | image_source, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height, | |||
int | destination_x, | |||
int | destination_y | |||
) |
- Parameters:
-
image_source An image.
- Parameters:
-
x The top left x coordinate of the rectangle. y The top left y coordinate of the rectangle. width The width of the rectangle. height The height of the rectangle. destination_x The top left x coordinate of the destination rectangle. destination_y The top left x coordinate of the destination rectangle.
x
, y
, width
, height
) rectangle alpha channel from the source image image_source
and replaces the alpha channel on the destination image at the (destination_x
, destination_y
) coordinates.
EAPI void imlib_image_copy_alpha_to_image | ( | Imlib_Image | image_source, | |
int | x, | |||
int | y | |||
) |
- Parameters:
-
image_source An image.
- Parameters:
-
x The x coordinate. y The y coordinate.
image_source
to the (x
, y
) coordinates of the current image, replacing the alpha channel there.
EAPI void imlib_image_copy_rect | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height, | |||
int | new_x, | |||
int | new_y | |||
) |
- Parameters:
-
x The top left x coordinate of the rectangle.
- Parameters:
-
y The top left y coordinate of the rectangle. width The width of the rectangle. height The height of the rectangle. new_x The top left x coordinate of the new location. new_y The top left y coordinate of the new location.
width
, height
at the (x
, y
) location specified in the current image to a new location (new_x
, new_y
) in the same image.
EAPI void imlib_image_draw_ellipse | ( | int | xc, | |
int | yc, | |||
int | a, | |||
int | b | |||
) |
- Parameters:
-
xc X coordinate of the center of the ellipse.
- Parameters:
-
yc Y coordinate of the center of the ellipse. a The horizontal amplitude of the ellipse. b The vertical amplitude of the ellipse.
x-xc
)^2/a^2
+
(y-yc
)^2/b^2
=
1. This means that the point (xc
, yc
) marks the center of the ellipse, a
defines the horizontal amplitude of the ellipse, and b
defines the vertical amplitude.
EAPI Imlib_Updates imlib_image_draw_line | ( | int | x1, | |
int | y1, | |||
int | x2, | |||
int | y2, | |||
char | make_updates | |||
) |
- Parameters:
-
x1 The x coordinate of the first point.
- Parameters:
-
y1 The y coordinate of the first point. x2 The x coordinate of the second point. y2 The y coordinate of the second point. make_updates,: a char.
- Returns:
- An updates list.
x1
, y1
) to (x2
, y2
). If make_updates
is 1 it will also return an update you can use for an updates list, otherwise it returns NULL.
EAPI void imlib_image_draw_polygon | ( | ImlibPolygon | poly, | |
unsigned char | closed | |||
) |
- Parameters:
-
poly A polygon.
- Parameters:
-
closed Closed polygon flag.
poly
onto the current context image. Points which have been added to the polygon are drawn in sequence, first to last. The final point will be joined with the first point if closed
is non-zero.
EAPI void imlib_image_draw_rectangle | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |
- Parameters:
-
x The top left x coordinate of the rectangle.
- Parameters:
-
y The top left y coordinate of the rectangle. width The width of the rectangle. height The height of the rectangle.
x
, y
) coordinates with a size of width
and height
pixels, using the current color.
EAPI void imlib_image_fill_color_range_rectangle | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height, | |||
double | angle | |||
) |
- Parameters:
-
x The x coordinate of the left edge of the rectangle.
- Parameters:
-
y The y coordinate of the top edge of the rectangle. width The width of the rectangle. height The height of the rectangle. angle Angle of gradient.
width
and height height
at the (x
, y
) location specified in the current image with a linear gradient of the current color range at an angle of angle
degrees with 0 degrees being vertical from top to bottom going clockwise from there.
EAPI void imlib_image_fill_ellipse | ( | int | xc, | |
int | yc, | |||
int | a, | |||
int | b | |||
) |
- Parameters:
-
xc X coordinate of the center of the ellipse.
- Parameters:
-
yc Y coordinate of the center of the ellipse. a The horizontal amplitude of the ellipse. b The vertical amplitude of the ellipse.
x-xc
)^2/a^2
+
(y-yc
)^2/b^2
=
1. This means that the point (xc
, yc
) marks the center of the ellipse, a
defines the horizontal amplitude of the ellipse, and b
defines the vertical amplitude.
EAPI void imlib_image_fill_hsva_color_range_rectangle | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height, | |||
double | angle | |||
) |
- Parameters:
-
x The x coordinate of the left edge of the rectangle.
- Parameters:
-
y The y coordinate of the top edge of the rectangle. width The width of the rectangle. height The height of the rectangle. angle Angle of gradient.
width
and height height
at the (x
, y
) location specified in the current image with a linear gradient in HSVA color space of the current color range at an angle of angle
degrees with 0 degrees being vertical from top to bottom going clockwise from there.
EAPI void imlib_image_fill_polygon | ( | ImlibPolygon | poly | ) |
- Parameters:
-
poly A polygon.
Fills the area defined by the polygon polyon
the current context image with the current context color.
EAPI void imlib_image_fill_rectangle | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |
- Parameters:
-
x The top left x coordinate of the rectangle.
- Parameters:
-
y The top left y coordinate of the rectangle. width The width of the rectangle. height The height of the rectangle.
x
, y
) coordinates with a size of width
and height
pixels, using the current color.
EAPI char* imlib_image_format | ( | void | ) |
- Returns:
- Current image format.
Returns the current image's format. Do not free this string. Duplicate it if you need it for later use.
EAPI void* imlib_image_get_attached_data | ( | const char * | key | ) |
- Parameters:
-
key A string.
- Returns:
- The attached data as a pointer, or NULL if none.
key
specified. NULL is returned if no data could be found with that key on the current image.
EAPI int imlib_image_get_attached_value | ( | const char * | key | ) |
- Parameters:
-
key A string.
- Returns:
- The attached value as an integer, or 0 if none.
key
. If none could be found 0 is returned.
EAPI void imlib_image_get_border | ( | Imlib_Border * | border | ) |
- Parameters:
-
border The border of the image.
Fills the Imlib_Border structure to which border
points to with the values of the border of the current context image. The border is the area at the edge of the image that does not scale with the rest of the image when resized - the borders remain constant in size. This is useful for scaling bevels at the edge of images differently to the image center.
EAPI DATA32* imlib_image_get_data | ( | void | ) |
- Returns:
- A pointer to the image data.
Returns a pointer to the image data in the image set as the image for the current context. When you get this pointer it is assumed you are planning on writing to the data, thus once you do this the image can no longer be used for caching - in fact all images cached from this one will also be affected when you put the data back. If this matters it is suggested you clone the image first before playing with the image data. The image data is returned in the format of a DATA32 (32 bits) per pixel in a linear array ordered from the top left of the image to the bottom right going from left to right each line. Each pixel has the upper 8 bits as the alpha channel and the lower 8 bits are the blue channel - so a pixel's bits are ARGB (from most to least significant, 8 bits per channel). You must put the data back at some point.
EAPI DATA32* imlib_image_get_data_for_reading_only | ( | void | ) |
- Returns:
- A pointer to the image data.
Functions the same way as imlib_image_get_data(), but returns a pointer expecting the program to NOT write to the data returned (it is for inspection purposes only). Writing to this data has undefined results. The data does not need to be put back.
EAPI const char* imlib_image_get_filename | ( | void | ) |
- Returns:
- The current filename.
Returns the filename for the file that is set as the current context. The pointer returned is only valid as long as no operations cause the filename of the image to change. Saving the file with a different name would cause this. It is suggested you duplicate the string if you wish to continue to use the string for later processing. Do not free the string pointer returned by this function.
EAPI char imlib_image_has_alpha | ( | void | ) |
- Returns:
- Current alpha channel flag.
Returns 1 if the current context image has an alpha channel, or 0 if it does not (the alpha data space is still there and available - just "unused").
EAPI void imlib_image_orientate | ( | int | orientation | ) |
- Parameters:
-
orientation The orientation.
Performs 90 degree rotations on the current image. Passing in orientation
does not rotate, 1 rotates clockwise by 90 degree, 2, rotates clockwise by 180 degrees, 3 rotates clockwise by 270 degrees.
EAPI void imlib_image_put_back_data | ( | DATA32 * | data | ) |
- Parameters:
-
data The pointer to the image data.
Puts back data
when it was obtained by imlib_image_get_data(). data
must be the same pointer returned by imlib_image_get_data(). This operated on the current context image.
EAPI void imlib_image_query_pixel | ( | int | x, | |
int | y, | |||
Imlib_Color * | color_return | |||
) |
- Parameters:
-
x The x coordinate of the pixel.
- Parameters:
-
y The y coordinate of the pixel. color_return The returned color.
color_return
color structure with the color of the pixel in the current image that is at the (x
, y
) location specified.
EAPI void imlib_image_query_pixel_cmya | ( | int | x, | |
int | y, | |||
int * | cyan, | |||
int * | magenta, | |||
int * | yellow, | |||
int * | alpha | |||
) |
- Parameters:
-
x Tthe x coordinate of the pixel.
- Parameters:
-
y The y coordinate of the pixel. cyan The returned cyan channel. magenta The returned magenta channel. yellow The returned yellow channel. alpha The returned alpha channel.
x
, y
) location specified.
EAPI void imlib_image_query_pixel_hlsa | ( | int | x, | |
int | y, | |||
float * | hue, | |||
float * | lightness, | |||
float * | saturation, | |||
int * | alpha | |||
) |
- Parameters:
-
x The x coordinate of the pixel.
- Parameters:
-
y The y coordinate of the pixel. hue The returned hue channel. lightness The returned lightness channel. saturation The returned saturation channel. alpha The returned alpha channel.
x
, y
) location specified.
EAPI void imlib_image_query_pixel_hsva | ( | int | x, | |
int | y, | |||
float * | hue, | |||
float * | saturation, | |||
float * | value, | |||
int * | alpha | |||
) |
- Parameters:
-
x The x coordinate of the pixel.
- Parameters:
-
y The y coordinate of the pixel. hue The returned hue channel. saturation The returned saturation channel. value The returned value channel. alpha The returned alpha channel.
x
, y
) location specified.
EAPI void imlib_image_remove_and_free_attached_data_value | ( | const char * | key | ) |
- Parameters:
-
key A string.
Removes the data and value attached to the current image with the specified key key
and also calls the destructor function that was supplied when attaching it (see imlib_image_attach_data_value()).
EAPI void imlib_image_remove_attached_data_value | ( | const char * | key | ) |
- Parameters:
-
key A string.
Detaches the data & value attached with the specified key key
from the current image.
EAPI void imlib_image_scroll_rect | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height, | |||
int | delta_x, | |||
int | delta_y | |||
) |
- Parameters:
-
x The top left x coordinate of the rectangle.
- Parameters:
-
y The top left y coordinate of the rectangle. width The width of the rectangle. height The height of the rectangle. delta_x Distance along the x coordinates. delta_y Distance along the y coordinates.
width
, height
at the (x
, y
) location within the current image by the delta_x
, delta_y
distance (in pixels).
EAPI void imlib_image_set_border | ( | Imlib_Border * | border | ) |
- Parameters:
-
border The border of the image.
Sets the border of the current context image to the values contained in the Imlib_Border structure border
points to.
EAPI void imlib_image_set_changes_on_disk | ( | void | ) |
By default Imlib2 will not check the timestamp of an image on disk and compare it with the image in its cache - this is to minimize disk activity when using the cache.
Call this function and it will flag the current context image as being liable to change on disk and Imlib2 will check the timestamp of the image file on disk and compare it with the cached image when it next needs to use this image in the cache.
EAPI void imlib_image_set_format | ( | const char * | format | ) |
- Parameters:
-
format Format of the image.
Sets the format of the current image. This is used for when you wish to save an image in a different format that it was loaded in, or if the image currently has no file format associated with it.
EAPI void imlib_image_set_has_alpha | ( | char | has_alpha | ) |
- Parameters:
-
has_alpha Alpha flag.
Sets the alpha flag for the current image. Set has_alpha
to 1 to enable the alpha channel in the current image, or 0 to disable it.
EAPI void imlib_image_set_irrelevant_alpha | ( | char | irrelevant | ) |
- Parameters:
-
irrelevant Irrelevant alpha flag.
Sets if the alpha channel status of the current image (i.e. if there is or is not one) is important for caching purposes. By default it is not. Set irrelevant to 1 to make it irrelevant and 0 to make it relevant.
EAPI void imlib_image_set_irrelevant_border | ( | char | irrelevant | ) |
- Parameters:
-
irrelevant Irrelevant border flag.
Sets if the border of the current image is irrelevant for caching purposes. By default it is. Set irrelevant to 1 to make it irrelevant, and 0 to make it relevant.
EAPI void imlib_image_set_irrelevant_format | ( | char | irrelevant | ) |
- Parameters:
-
irrelevant Irrelevant format flag.
Sets if the format value of the current image is irrelevant for caching purposes - by default it is. pass irrelevant as 1 to make it irrelevant and 0 to make it relevant for caching.
EAPI void imlib_image_sharpen | ( | int | radius | ) |
- Parameters:
-
radius The radius.
Sharpens the current image. The radius
value affects how much to sharpen by.
EAPI void imlib_image_tile | ( | void | ) |
Modifies an image so it will tile seamlessly horizontally and vertically if used as a tile (i.e.
drawn multiple times horizontally and vertically).
EAPI void imlib_image_tile_horizontal | ( | void | ) |
Modifies an image so it will tile seamlessly horizontally if used as a tile (i.e.
drawn multiple times horizontally).
EAPI void imlib_image_tile_vertical | ( | void | ) |
Modifies an image so it will tile seamlessly vertically if used as a tile (i.e.
drawn multiple times vertically).
EAPI int imlib_insert_font_into_fallback_chain | ( | Imlib_Font | font, | |
Imlib_Font | fallback_font | |||
) |
- Parameters:
-
font A previously loaded font.
- Parameters:
-
fallback_font A previously loaded font to be chained to the given font.
- Returns:
- 0 on success.
- Deprecated:
- This function may be removed.
EAPI char** imlib_list_font_path | ( | int * | number_return | ) |
- Parameters:
-
number_return Number of paths in the list.
- Returns:
- A list of strings.
number_return
.
EAPI char** imlib_list_fonts | ( | int * | number_return | ) |
- Parameters:
-
number_return Number of fonts in the list.
- Returns:
- A list of fonts.
EAPI Imlib_Font imlib_load_font | ( | const char * | font_name | ) |
- Parameters:
-
font_name The font name with the size.
- Returns:
- NULL if no font found.
font_name
format is "font_name/size". For example. If there is a font file called blum.ttf somewhere in the font path you might use "blum/20" to load a 20 pixel sized font of blum. If the font cannot be found NULL is returned.
EAPI Imlib_Image imlib_load_image | ( | const char * | file | ) |
- Parameters:
-
file Image file.
- Returns:
- An image handle.
file
. Please see the section How Image Loading Works for more detail. Returns an image handle on success or NULL on failure.
EAPI Imlib_Image imlib_load_image_immediately | ( | const char * | file | ) |
- Parameters:
-
file Image file.
- Returns:
- An image handle.
file
. This forces the image data to be decoded at load time too, instead of decoding being deferred until it is needed. Returns an image handle on success or NULL on failure.
EAPI Imlib_Image imlib_load_image_immediately_without_cache | ( | const char * | file | ) |
- Parameters:
-
file Image file.
- Returns:
- An image handle.
EAPI Imlib_Image imlib_load_image_with_error_return | ( | const char * | file, | |
Imlib_Load_Error * | error_return | |||
) |
- Parameters:
-
file Image file.
- Parameters:
-
error_return The returned error.
- Returns:
- An image handle.
file
on disk. If it succeeds it returns a valid image handle, if not NULL is returned and error_return
is set to the detail of the error.
EAPI Imlib_Image imlib_load_image_without_cache | ( | const char * | file | ) |
- Parameters:
-
file Image file.
- Returns:
- An image handle.
EAPI void imlib_modify_color_modifier_brightness | ( | double | brightness_value | ) |
- Parameters:
-
brightness_value Value of brightness.
Modifies the current color modifier by adjusting the brightness by the value brightness_value
. The color modifier is modified not set, so calling this repeatedly has cumulative effects. brightness values of 0 do not affect anything. -1.0 will make things completely black and 1.0 will make things all white. Values in-between vary brightness linearly.
EAPI void imlib_modify_color_modifier_contrast | ( | double | contrast_value | ) |
- Parameters:
-
contrast_value Value of contrast.
Modifies the current color modifier by adjusting the contrast by the value contrast_value
. The color modifier is modified not set, so calling this repeatedly has cumulative effects. Contrast of 1.0 does nothing. 0.0 will merge to gray, 2.0 will double contrast etc.
EAPI void imlib_modify_color_modifier_gamma | ( | double | gamma_value | ) |
- Parameters:
-
gamma_value Value of gamma.
Modifies the current color modifier by adjusting the gamma by the value specified gamma_value
. The color modifier is modified not set, so calling this repeatedly has cumulative effects. A gamma of 1.0 is normal linear, 2.0 brightens and 0.5 darkens etc. Negative values are not allowed.
EAPI void imlib_polygon_add_point | ( | ImlibPolygon | poly, | |
int | x, | |||
int | y | |||
) |
- Parameters:
-
poly A polygon
- Parameters:
-
x The X coordinate. y The Y coordinate.
x
, y
) to the polygon poly
. The point will be added to the end of the polygon's internal point list. The points are drawn in order, from the first to the last.
EAPI unsigned char imlib_polygon_contains_point | ( | ImlibPolygon | poly, | |
int | x, | |||
int | y | |||
) |
- Parameters:
-
poly A polygon
- Parameters:
-
x The X coordinate. y The Y coordinate.
x
, y
) is within the area defined by the polygon poly
.
EAPI void imlib_polygon_free | ( | ImlibPolygon | poly | ) |
- Parameters:
-
poly A polygon.
Frees a polygon object.
EAPI void imlib_polygon_get_bounds | ( | ImlibPolygon | poly, | |
int * | px1, | |||
int * | py1, | |||
int * | px2, | |||
int * | py2 | |||
) |
- Parameters:
-
poly A polygon.
- Parameters:
-
px1 X coordinate of the upper left corner. py1 Y coordinate of the upper left corner. px2 X coordinate of the lower right corner. py2 Y coordinate of the lower right corner.
poly
. (px1
, py1
) defines the upper left corner of the bounding box and (px2
, py2
) defines it's lower right corner.
EAPI void imlib_remove_font_from_fallback_chain | ( | Imlib_Font | fallback_font | ) |
- Parameters:
-
fallback_font A font previously added to a fallback chain.
- Returns:
- 0 on success.
- Deprecated:
- This function may be removed.
EAPI void imlib_remove_path_from_font_path | ( | const char * | path | ) |
- Parameters:
-
path A directory path.
Removes all directories in the font path that match path
.
EAPI void imlib_save_image | ( | const char * | filename | ) |
- Parameters:
-
filename The file name.
Saves the current image in the format specified by the current image's format settings to the filename filename
.
EAPI void imlib_save_image_with_error_return | ( | const char * | filename, | |
Imlib_Load_Error * | error_return | |||
) |
- Parameters:
-
filename The file name.
- Parameters:
-
error_return The returned error.
error_return
to an error value if the save fails.
EAPI void imlib_set_cache_size | ( | int | bytes | ) |
- Parameters:
-
bytes Cache size.
Sets the cache size. The size is in bytes. Setting the cache size to 0 effectively flushes the cache and keeps the cache size at 0 until set to another value. Whenever you set the cache size Imlib2 will flush as many old images and pixmap from the cache as needed until the current cache usage is less than or equal to the cache size.
EAPI void imlib_set_color_modifier_tables | ( | DATA8 * | red_table, | |
DATA8 * | green_table, | |||
DATA8 * | blue_table, | |||
DATA8 * | alpha_table | |||
) |
- Parameters:
-
red_table An array of DATA8.
- Parameters:
-
green_table An array of DATA8. blue_table An array of DATA8. alpha_table An array of DATA8.
EAPI void imlib_set_color_usage | ( | int | max | ) |
- Parameters:
-
max Maximum number of colors.
Sets the maximum number of colors you would like Imlib2 to allocate for you when rendering. The default is 256. This has no effect in depths greater than 8 bit.
EAPI void imlib_set_font_cache_size | ( | int | bytes | ) |
- Parameters:
-
bytes The font cache size.
Sets the font cache in bytes. Whenever you set the font cache size Imlib2 will flush fonts from the cache until the memory used by fonts is less than or equal to the font cache size. Setting the size to 0 effectively frees all speculatively cached fonts.
EAPI void imlib_text_draw | ( | int | x, | |
int | y, | |||
const char * | text | |||
) |
- Parameters:
-
x The x coordinate of the top left corner.
- Parameters:
-
y The y coordinate of the top left corner. text A null-byte terminated string.
text
using the current font on the current image at the (x
, y
) location (x
, y
denoting the top left corner of the font string)
EAPI void imlib_text_draw_with_return_metrics | ( | int | x, | |
int | y, | |||
const char * | text, | |||
int * | width_return, | |||
int * | height_return, | |||
int * | horizontal_advance_return, | |||
int * | vertical_advance_return | |||
) |
- Parameters:
-
x The x coordinate of the top left corner.
- Parameters:
-
y The y coordinate of the top left corner. text A null-byte terminated string. width_return The width of the string. height_return The height of the string. horizontal_advance_return Horizontal offset. vertical_advance_return Vertical offset.
horizontal_advance_return
returns the number of pixels you should advance horizontally to draw another string (useful if you are drawing a line of text word by word) and vertical_advance_return
does the same for the vertical direction (i.e. drawing text line by line).
EAPI int imlib_text_get_index_and_location | ( | const char * | text, | |
int | x, | |||
int | y, | |||
int * | char_x_return, | |||
int * | char_y_return, | |||
int * | char_width_return, | |||
int * | char_height_return | |||
) |
- Parameters:
-
text A string.
- Parameters:
-
x The x offset. y The y offset. char_x_return The x coordinate of the character. char_y_return The x coordinate of the character. char_width_return The width of the character. char_height_return The height of the character.
- Returns:
- -1 if no character found.
text
using the current font at the (x
, y
) pixel location which is an offset relative to the top left of that string. -1 is returned if there is no character there. If there is a character, char_x_return
, char_y_return
, char_width_return
and char_height_return
(respectively the character x, y, width and height) are also filled in.
EAPI void imlib_text_get_location_at_index | ( | const char * | text, | |
int | index, | |||
int * | char_x_return, | |||
int * | char_y_return, | |||
int * | char_width_return, | |||
int * | char_height_return | |||
) |
- Parameters:
-
text A string.
- Parameters:
-
index The index of . char_x_return The x coordinate of the character. char_y_return The y coordinate of the character. char_width_return The width of the character. char_height_return The height of the character.
index
in the text
string using the current font.
EAPI Imlib_Updates imlib_update_append_rect | ( | Imlib_Updates | updates, | |
int | x, | |||
int | y, | |||
int | w, | |||
int | h | |||
) |
- Parameters:
-
updates An updates list.
- Parameters:
-
x The top left x coordinate of the rectangle. y The top left y coordinate of the rectangle. w The width of the rectangle. h The height of the rectangle.
- Returns:
- The updates handle.
EAPI Imlib_Updates imlib_updates_append_updates | ( | Imlib_Updates | updates, | |
Imlib_Updates | appended_updates | |||
) |
- Parameters:
-
updates An updates list.
- Parameters:
-
appended_updates The updates list to append.
- Returns:
- The new updates list.
appended_updates
to the updates list updates
and returns the new list.
EAPI Imlib_Updates imlib_updates_clone | ( | Imlib_Updates | updates | ) |
- Parameters:
-
updates An updates list.
- Returns:
- Duplicate of
updates
.
EAPI void imlib_updates_free | ( | Imlib_Updates | updates | ) |
- Parameters:
-
updates An updates list.
Frees an updates list.
EAPI void imlib_updates_get_coordinates | ( | Imlib_Updates | updates, | |
int * | x_return, | |||
int * | y_return, | |||
int * | width_return, | |||
int * | height_return | |||
) |
- Parameters:
-
updates An updates list.
- Parameters:
-
x_return The top left x coordinate of the update. y_return The top left y coordinate of the update. width_return The width of the update. height_return The height of the update.
EAPI Imlib_Updates imlib_updates_get_next | ( | Imlib_Updates | updates | ) |
- Parameters:
-
updates An updates list.
- Returns:
- The next updates.
EAPI Imlib_Updates imlib_updates_init | ( | void | ) |
- Returns:
- The initialized updates list.
Initializes an updates list before you add any updates to it or merge it for rendering etc.
EAPI Imlib_Updates imlib_updates_merge | ( | Imlib_Updates | updates, | |
int | w, | |||
int | h | |||
) |
- Parameters:
-
updates An updates list.
- Parameters:
-
w The width of the rectangle. h The height of the rectangle.
- Returns:
- The updates handle.
EAPI Imlib_Updates imlib_updates_merge_for_rendering | ( | Imlib_Updates | updates, | |
int | w, | |||
int | h | |||
) |
- Parameters:
-
updates An updates list.
- Parameters:
-
w The width of the rectangle. h The height of the rectangle.
- Returns:
- The updates handle.
EAPI void imlib_updates_set_coordinates | ( | Imlib_Updates | updates, | |
int | x, | |||
int | y, | |||
int | width, | |||
int | height | |||
) |
- Parameters:
-
updates An updates list.
- Parameters:
-
x The top left x coordinate of the update. y The top left y coordinate of the update. width The width of the update. height The height of the update.
update
.