<p><fontcolor="#000000">Sometimes loading images can take a while. Often
it is a good idea to provide feedback to the user whilst this is happening.
This is when you set the progress function callback. Setting this to NULL
will mean no progress function is called during load - this is the default.
When it is set you set it to a function that will get called every so often
(depending on the progress granularity) during load. Use </font><tt><fontcolor="#000099">imlib_context_set_progress_function();</font></tt><fontcolor="#000000">
and </font><tt><fontcolor="#000099">imlib_context_set_progress_granularity();
case Expose:
/* window rectangle was exposed - add it to the list of */
/* rectangles we need to re-render */
case MotionNotify:
/* if the mouse moves - note it */
/* add a rectangle update for the new mouse position */
/* the old position - so we wipe over where it used to be */
sprintf(text, "Mouse is at %i, %i", mouse_x, mouse_y);
sprintf(text, "Mouse is at %i, %i", mouse_x, mouse_y);
/* blend image onto the buffer and scale it to 640x480 */
/* print text to display in the buffer */
sprintf(text, "Mouse is at %i, %i", mouse_x, mouse_y);
/* query the size it will be */
int green,
int blue,
int alpha);</font></font></tt></b></pre>
<blockquote>This sets the color with which text, lines and rectangles are
drawn when being rendered onto an image. Values for red, green, blue and
alpha are between 0 and 255 - any other values have undefined results.</blockquote>
int screen,
int *depth_return);</font></font></tt></b></pre>
<blockquote>Returns the visual for that display and screen that Imlib2
thinks will give you the best quality output. depth_return should point
to an int that will be filled with the depth of that visual too.</blockquote>
int width,
int height);</font></font></tt></b></pre>
<blockquote>This function works just like imlib_render_pixmaps_for_whole_image(),
but will scale the output result to the width and height specified. Scaling
is done before depth conversion so pixels used for dithering don't grow
int y,
int width,
int height);</font></font></tt></b></pre>
<blockquote>This will render the current image onto the current drawable
at the x, y location specified AND scale the image to the width and height
int source_y,
int source_width,
int source_height,
int x,
int y,
int width,
int height);</font></font></tt></b></pre>
<blockquote>This renders the source x, y, width, height pixel rectangle
from the current image onto the current drawable at the x, y location scaled
int source_x,
int source_y,
int source_width,
int source_height,
int destination_x,
int destination_y,
int destination_width,
int destination_height);</font></font></tt></b></pre>
<blockquote>This will blend the source rectangle x, y, width, height from
the source_image onto the current image at the destination x, y location
scaled to the width and height specified. If merge_alpha is set to 1 it
will also modify the destination image alpha channel, otherwise the destination
int height);</font></font></tt></b></pre>
<blockquote>This creates a new blank image of size 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.</blockquote>
int height,
int height,
int x,
int y,
int width,
int height,
int source_x,
int source_y,
int source_width,
int source_height,
int destination_width,
int destination_height,
int x,
int y,
int width,
int height,
int destination_x,
int destination_y,
int y,
int width,
int height);</font></font></tt></b></pre>
<blockquote>This creates a duplicate of a x, y, width, height rectangle
in the current image and returns a valid image handle on success, or NULL
int source_y,
int source_width,
int source_height,
int destination_width,
int destination_height);</font></font></tt></b></pre>
<blockquote>This function works the same as imlib_create_cropped_image()
but will scale the new image to the new destination width and height whilst
int x,
int y,
int w,
int h);</font></font></tt></b></pre>
<blockquote>This function appends an update rectangle to the updates list
passed in (if the updates is NULL it will create a new updates list) and
returns a handle to the modified updates list (the handle may be modified
so only use the new updates handle returned)</blockquote>
int w,
int h);</font></font></tt></b></pre>
<blockquote>This function takes an updates list, and modifies it by merging
overlapped rectangles and lots of tiny rectangles into larger rectangles
to minimize the number of rectangles in the list for optimized redrawing.
The new updates handle is now valid and the old one passed in is not.</blockquote>
int w,
int h);</font></font></tt></b></pre>
<blockquote>This works almost exactly as imlib_updates_merge() but is more
lenient on the spacing between update rectangles - if they are very close
it amalgamates 2 smaller rectangles into 1 larger one.</blockquote>
int *x_return,
int *y_return,
int *width_return,
int *height_return);</font></font></tt></b></pre>
<blockquote>This returns the coordinates of an update.</blockquote>
int x,
int y,
int width,
int height);</font></font></tt></b></pre>
<blockquote>This modifies the coordinates of an update in an updates list.</blockquote>
int x,
int y);</font></font></tt></b></pre>
<blockquote>Given an updates list (preferable already merged for rendering)
this will render the corresponding parts of the image to the current drawable
at an offset of x, y in the drawable.</blockquote>
int y,
int *width_return,
int *height_return,
int *horizontal_advance_return,
int *vertical_advance_return);</font></font></tt></b></pre>
<blockquote>This function works just like imlib_text_draw() but also returns
the width and height of the string drawn, and 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).</blockquote>
int *width_return,
int *height_return);</font></font></tt></b></pre>
<blockquote>This function returns the width and height in pixels the text
string would use up if drawn with the current font.</blockquote>
int x,
int y,
int *char_x_return,
int *char_y_return,
int *char_width_return,
int *char_height_return);</font></font></tt></b></pre>
<blockquote>This will return the character number in the string 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, character x, y, width and height are also
int index,
int *char_x_return,
int *char_y_return,
int *char_width_return,
int *char_height_return);</font></font></tt></b></pre>
<blockquote>This will return the geometry of the character at index index
in the text string using the current font.</blockquote>
int number);</font></font></tt></b></pre>
<blockquote>This will free the font list returned by imlib_list_fonts().</blockquote>
int y,
int width,
int height);</font></font></tt></b></pre>
<blockquote>This works the same way as imlib_apply_color_modifier() but
only modifies a selected rectangle in the current image.</blockquote>
int y1,
int x2,
int y2,
int y,
int width,
int height);</font></font></tt></b></pre>
<blockquote>This draws the outline of a rectangle on the current image
at the x, y coordinates with a size of width and height pixels, using the
int y,
int width,
int height);</font></font></tt></b></pre>
<blockquote>This draws a filled rectangle on the current image at the x,
y coordinates with a size of width and height pixels, using the current
int x,
int y);</font></font></tt></b></pre>
<blockquote>This copies the alpha channel of the source image to the x,
y coordinates of the current image, replacing the alpha channel there.</blockquote>
int x,
int y,
int width,
int height,
int destination_x,
int destination_y);</font></font></tt></b></pre>
<blockquote>This copies the source x, y, width, height rectangle alpha
channel from the source image and replaces the alpha channel on the destination
int y,
int width,
int height,
int delta_x,
int delta_y);</font></font></tt></b></pre>
<blockquote>This scrolls a rectangle at x, y, width, height within the
current image by the delta x, y distance (in pixels).</blockquote>
int y,
int width,
int height,
int new_x,
int new_y);</font></font></tt></b></pre>
<blockquote>This copies a rectangle of size width, height at the x, y location
specified in the current image to a new location x, y in the same image.</blockquote>
int y,
int width,
int height,
int y,
int value,
int source_x,
int source_y,
int source_width,
int source_height,
int destination_x,
int destination_y,
int angle_x,
int angle_y);</font></font></tt></b></pre>
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);</font></font></tt></b></pre>
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);</font></font></tt></b></pre>
int source_y,
int source_width,
int source_height,
int destination_x,
int destination_y,
int angle_x,
int angle_y);</font></font></tt></b></pre>
<pre><b><tt><fontcolor="#660000"><fontsize=+2>void imlib_context_set_cliprect(int x, int y, int w, int h);</font></font></tt></b></pre>
<blockquote>
Sets the current clipping rectangle to (x,y w*h). The clipping rectangle
effects all image drawing functions and prevents the area outside the
rectangle from being edited. Set w to 0 to disable clipping.
</blockquote>
<pre><b><tt><fontcolor="#660000"><fontsize=+2>int imlib_clip_line(int x0, int y0, int x1, int y1, int xmin, int xmax, int ymin, int ymax, int *clip_x0, int *clip_y0, int *clip_x1, int *clip_y1);</font></font></tt></b></pre>
<blockquote>
A utility function to return clipped line coordinates.
Fill the area defined by the polygon on the current context image with
the current context colour.
</blockquote>
<pre><b><tt><fontcolor="#660000"><fontsize=+2>void imlib_polygon_get_bounds(ImlibPolygon poly, int *px1, int *py1, int *px2, int *py2);</font></font></tt></b></pre>
<blockquote>
Calculate the bounding area of the polygon. (px1, py1) defines the upper
left corner of the bounding box and (px2, py2) defines it's lower right
corner.
</blockquote>
<pre><b><tt><fontcolor="#660000"><fontsize=+2>unsigned char imlib_polygon_contains_point(ImlibPolygon poly, int x, int y);</font></font></tt></b></pre>
<blockquote>
Returns non-zero if the point (x,y) is within the area defined by the
polygon.
</blockquote>
<pre><b><tt><fontcolor="#660000"><fontsize=+2>void imlib_image_draw_ellipse(int xc, int yc, int a, int b);</font></font></tt></b></pre>
<blockquote>
Draw an ellipse on the current context image. The ellipse is defined as (x-xc)^2/a^2 + (y-yc)^2/b^2 = 1. This means that the point (<b>xc</b>,<b>yc</b>) marks the center of the ellipse, <b>a</b> defines the horizontal amplitude of the ellipse, and <b>b</b> defines the vertical amplitude.
</blockquote>
<pre><b><tt><fontcolor="#660000"><fontsize=+2>void imlib_image_fill_ellipse(int xc, int yc, int a, int b);</font></font></tt></b></pre>
<blockquote>
Fills an ellipse on the current context image using the current context colour. The ellipse is defined as (x-xc)^2/a^2 + (y-yc)^2/b^2 = 1. This means that the point (<b>xc</b>,<b>yc</b>) marks the center of the ellipse, <b>a</b> defines the horizontal amplitude of the ellipse, and <b>b</b> defines the vertical amplitude.
int yoff,
int a,
int r,
int g,
int b);</font></font></tt></b></pre>
int yoff,
int a,
int r,
int g,
int b);</font></font></tt></b></pre>
int yoff,
int a,
int r,
int g,
int b);</font></font></tt></b></pre>
int yoff,
int a,
int r,
int g,
int b);</font></font></tt></b></pre>
int yoff,
int a,
int r,
int g,
int b);</font></font></tt></b></pre>
int r,
int g,
int b);</font></font></tt></b></pre>
int r,
int g,
int b);</font></font></tt></b></pre>