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.
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.
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. 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. 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. 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. 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.
EAPI double imlib_context_get_angle | ( | void | ) |
- Returns:
- The current angle of the text strings.
EAPI char imlib_context_get_anti_alias | ( | void | ) |
- Returns:
- The current anti alias flag.
EAPI char imlib_context_get_blend | ( | void | ) |
- Returns:
- The current blending flag.
EAPI void imlib_context_get_color | ( | int * | red, | |
int * | green, | |||
int * | blue, | |||
int * | alpha | |||
) |
- Parameters:
-
red Red channel of the current color. green Green channel of the current color. blue Blue channel of the current color. alpha Alpha channel of the current color.
Referenced by imlib_context_get_color_hlsa(), and imlib_context_get_color_hsva().
EAPI void imlib_context_get_color_cmya | ( | int * | cyan, | |
int * | magenta, | |||
int * | yellow, | |||
int * | alpha | |||
) |
- Parameters:
-
cyan Cyan channel of the current color. 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. lightness Lightness channel of the current color. saturation Saturation channel of the current color. alpha Alpha channel of the current color.
References imlib_context_get_color().
EAPI void imlib_context_get_color_hsva | ( | float * | hue, | |
float * | saturation, | |||
float * | value, | |||
int * | alpha | |||
) |
- Parameters:
-
hue Hue channel of the current color. saturation Saturation channel of the current color. value Value channel of the current color. alpha Alpha channel of the current color.
References imlib_context_get_color().
EAPI Imlib_Color_Modifier imlib_context_get_color_modifier | ( | void | ) |
- Returns:
- The current color modifier.
EAPI Imlib_Color_Range imlib_context_get_color_range | ( | void | ) |
- Returns:
- The current color range.
EAPI Imlib_Text_Direction imlib_context_get_direction | ( | void | ) |
- Returns:
- The current direction of the text.
EAPI char imlib_context_get_dither | ( | void | ) |
- Returns:
- The current dithering flag.
EAPI char imlib_context_get_dither_mask | ( | void | ) |
- Returns:
- The current dither mask flag.
EAPI Imlib_Filter imlib_context_get_filter | ( | void | ) |
- Returns:
EAPI Imlib_Font imlib_context_get_font | ( | void | ) |
- Returns:
- The current font.
EAPI Imlib_Image imlib_context_get_image | ( | void | ) |
- Returns:
- The current image.
EAPI Imlib_Color* imlib_context_get_imlib_color | ( | void | ) |
- Returns:
- The current color.
EAPI int imlib_context_get_mask_alpha_threshold | ( | void | ) |
- Returns:
- The current mask mask alpha threshold.
EAPI Imlib_Operation imlib_context_get_operation | ( | void | ) |
- Returns:
- The current operation mode.
EAPI Imlib_Progress_Function imlib_context_get_progress_function | ( | void | ) |
- Returns:
- The current progress function.
EAPI char imlib_context_get_progress_granularity | ( | void | ) |
- Returns:
- The current progress granularity
EAPI void imlib_context_set_angle | ( | double | angle | ) |
- Parameters:
-
angle Angle of the text strings.
EAPI void imlib_context_set_anti_alias | ( | char | anti_alias | ) |
- Parameters:
-
anti_alias The anti alias flag.
EAPI void imlib_context_set_blend | ( | char | blend | ) |
- Parameters:
-
blend The blending flag.
EAPI void imlib_context_set_cliprect | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h | |||
) |
- 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.
EAPI void imlib_context_set_color | ( | int | red, | |
int | green, | |||
int | blue, | |||
int | alpha | |||
) |
- Parameters:
-
red Red channel of the current color. 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.
Referenced by imlib_context_set_color_hlsa(), and imlib_context_set_color_hsva().
EAPI void imlib_context_set_color_cmya | ( | int | cyan, | |
int | magenta, | |||
int | yellow, | |||
int | alpha | |||
) |
- Parameters:
-
cyan Cyan channel of the current color. 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. 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.
References imlib_context_set_color().
EAPI void imlib_context_set_color_hsva | ( | float | hue, | |
float | saturation, | |||
float | value, | |||
int | alpha | |||
) |
- Parameters:
-
hue Hue channel of the current color. 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.
References imlib_context_set_color().
EAPI void imlib_context_set_color_modifier | ( | Imlib_Color_Modifier | color_modifier | ) |
- Parameters:
-
color_modifier Current color modifier.
EAPI void imlib_context_set_color_range | ( | Imlib_Color_Range | color_range | ) |
- Parameters:
-
color_range Color range.
EAPI void imlib_context_set_direction | ( | Imlib_Text_Direction | direction | ) |
- Parameters:
-
direction Text direction.
EAPI void imlib_context_set_dither | ( | char | dither | ) |
- Parameters:
-
dither The dithering flag.
EAPI void imlib_context_set_dither_mask | ( | char | dither_mask | ) |
- Parameters:
-
dither_mask The dither mask flag.
EAPI void imlib_context_set_filter | ( | Imlib_Filter | filter | ) |
- Parameters:
-
filter Current filter.
EAPI void imlib_context_set_font | ( | Imlib_Font | font | ) |
- Parameters:
-
font Current font.
EAPI void imlib_context_set_image | ( | Imlib_Image | image | ) |
- Parameters:
-
image Current image.
EAPI void imlib_context_set_mask_alpha_threshold | ( | int | mask_alpha_threshold | ) |
- Parameters:
-
mask_alpha_threshold The mask alpha threshold.
EAPI void imlib_context_set_operation | ( | Imlib_Operation | operation | ) |
- Parameters:
-
operation
EAPI void imlib_context_set_progress_function | ( | Imlib_Progress_Function | progress_function | ) |
- Parameters:
-
progress_function A progress function.
EAPI void imlib_context_set_progress_granularity | ( | char | progress_granularity | ) |
- Parameters:
-
progress_granularity A char.
EAPI Imlib_Color_Modifier imlib_create_color_modifier | ( | void | ) |
- Returns:
- Valid handle.
EAPI Imlib_Color_Range imlib_create_color_range | ( | void | ) |
- Returns:
- valid handle.
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. 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. 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. 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. 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. 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. number Number of fonts in the list.
EAPI int imlib_get_cache_size | ( | void | ) |
- Returns:
- The current image size.
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. 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.
EAPI int imlib_get_font_ascent | ( | void | ) |
- Returns:
- The font's ascent.
EAPI int imlib_get_font_cache_size | ( | void | ) |
- Returns:
- The font cache size.
EAPI int imlib_get_font_descent | ( | void | ) |
- Returns:
- The font's descent.
EAPI int imlib_get_maximum_font_ascent | ( | void | ) |
- Returns:
- The font's maximum ascent.
EAPI int imlib_get_maximum_font_descent | ( | void | ) |
- Returns:
- The font's maximum descent.
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. 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. 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.
Referenced by imlib_text_get_index_and_location(), and imlib_text_get_location_at_index().
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. 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.
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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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.
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. 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.
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.
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.
EAPI DATA32* imlib_image_get_data_for_reading_only | ( | void | ) |
- Returns:
- A pointer to the image data.
EAPI const char* imlib_image_get_filename | ( | void | ) |
- Returns:
- The current filename.
EAPI char imlib_image_has_alpha | ( | void | ) |
- Returns:
- Current alpha channel flag.
EAPI void imlib_image_orientate | ( | int | orientation | ) |
- Parameters:
-
orientation The orientation.
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.
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. 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. 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. 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. 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.
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.
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. 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.
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.
EAPI void imlib_image_set_has_alpha | ( | char | has_alpha | ) |
- Parameters:
-
has_alpha Alpha flag.
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.
EAPI void imlib_image_set_irrelevant_border | ( | char | irrelevant | ) |
- Parameters:
-
irrelevant Irrelevant border flag.
EAPI void imlib_image_set_irrelevant_format | ( | char | irrelevant | ) |
- Parameters:
-
irrelevant Irrelevant format flag.
EAPI void imlib_image_sharpen | ( | int | radius | ) |
- Parameters:
-
radius The radius.
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. 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. 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.
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.
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.
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 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 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.
EAPI void imlib_polygon_get_bounds | ( | ImlibPolygon | poly, | |
int * | px1, | |||
int * | py1, | |||
int * | px2, | |||
int * | py2 | |||
) |
- Parameters:
-
poly A polygon. 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.
Referenced by imlib_free_font().
EAPI void imlib_remove_path_from_font_path | ( | const char * | path | ) |
- Parameters:
-
path A directory path.
path
.
EAPI void imlib_save_image | ( | const char * | filename | ) |
- Parameters:
-
filename The file name.
filename
.
EAPI void imlib_save_image_with_error_return | ( | const char * | filename, | |
Imlib_Load_Error * | error_return | |||
) |
- Parameters:
-
filename The file name. 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.
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. 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.
EAPI void imlib_set_font_cache_size | ( | int | bytes | ) |
- Parameters:
-
bytes The font cache size.
EAPI void imlib_text_draw | ( | int | x, | |
int | y, | |||
const char * | text | |||
) |
- Parameters:
-
x The x coordinate of the top left corner. 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)
References imlib_text_draw_with_return_metrics().
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. 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).
Referenced by imlib_text_draw().
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. 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.
References imlib_get_text_size().
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. 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.
References imlib_get_text_size().
EAPI Imlib_Updates imlib_update_append_rect | ( | Imlib_Updates | updates, | |
int | x, | |||
int | y, | |||
int | w, | |||
int | h | |||
) |
- Parameters:
-
updates An updates list. 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. 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.
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. 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.
EAPI Imlib_Updates imlib_updates_merge | ( | Imlib_Updates | updates, | |
int | w, | |||
int | h | |||
) |
- Parameters:
-
updates An updates list. 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. 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. 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
.