forked from old/legacy-imlib2
add docs..... and prefix is /usr for rpms damnit! :)
SVN revision: 3450
This commit is contained in:
parent
2d96eee956
commit
d7b8c1575b
191
doc/index.html
191
doc/index.html
|
@ -417,8 +417,7 @@ this was based off can be found in Imlib2's test directory. This coveres
|
|||
a lot of the core of Imlib2's api so you shoudl have a pretty good idea
|
||||
on how it works if you understand this code snippet.
|
||||
<blockquote>
|
||||
<pre>
|
||||
<tt><font color="#660000">/* include X11 stuff */
|
||||
<pre><tt><font color="#660000">/* include X11 stuff */
|
||||
#include <X11/Xlib.h>
|
||||
/* include Imlib2 stuff */
|
||||
#include <Imlib2.h>
|
||||
|
@ -1497,6 +1496,17 @@ does the same for the vertical direction (i.e. drawing text line by line).</bloc
|
|||
<blockquote>This function returns the width and height in pixels the text
|
||||
string would use up if drawn with the current font.</blockquote>
|
||||
|
||||
<pre>
|
||||
<b><tt><font color="#660000"><font size=+2>void imlib_get_text_advance(const char *text,
|
||||
int *horizontal_advance_return,
|
||||
int *vertical_advance_return);</font></font></tt></b></pre>
|
||||
|
||||
<blockquote>This function returns the advance horizontally and vertically
|
||||
in pixels the next text string would need to be placed at for the current
|
||||
font. The advances are not adjusted for rotation so you will have to translate
|
||||
the advances (which are calculated as if the text was drawn horizontally
|
||||
from left to right) depending on the text orientation.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_add_path_to_font_path(const char *path);</font></font></tt></b></pre>
|
||||
|
||||
<blockquote>This function adds the directory path to the end of the current
|
||||
|
@ -1808,10 +1818,10 @@ NULL.</blockquote>
|
|||
int destination_y,
|
||||
int angle_x,
|
||||
int angle_y);</font></font></tt></b></pre>
|
||||
<blockquote>
|
||||
This function works just like imlib_blend_image_onto_image_skewed() except
|
||||
you cannot skew an image (v_angle_x and v_angle_y are 0).
|
||||
</blockquote>
|
||||
|
||||
<blockquote>This function works just like imlib_blend_image_onto_image_skewed()
|
||||
except you cannot skew an image (v_angle_x and v_angle_y are 0).</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_blend_image_onto_image_skewed(Imlib_Image source_image,
|
||||
char merge_alpha,
|
||||
int source_x,
|
||||
|
@ -1824,39 +1834,51 @@ you cannot skew an image (v_angle_x and v_angle_y are 0).
|
|||
int h_angle_y,
|
||||
int v_angle_x,
|
||||
int v_angle_y);</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.
|
||||
<p>
|
||||
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|y]).
|
||||
<p>
|
||||
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.
|
||||
<p>
|
||||
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
|
||||
|
||||
<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.
|
||||
<p>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|y]).
|
||||
<p>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.
|
||||
<p>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.
|
||||
<p>
|
||||
Examples:
|
||||
<p>Examples:
|
||||
<ul>
|
||||
<li>imlib_blend_image_onto_image_skewed(..., 0, 0, 100, 0, 0, 100);<br><br>
|
||||
will simply scale the image to be 100x100.<br><br>
|
||||
<li>imlib_blend_image_onto_image_skewed(..., 0, 0, 0, 100, 100, 0);<br><br>
|
||||
will scale the image to be 100x100, and flip it diagonally.<br><br>
|
||||
<li>imlib_blend_image_onto_image_skewed(..., 100, 0, 0, 100, -100, 0);<br><br>
|
||||
will scale the image and rotate it 90 degrees clockwise.<br><br>
|
||||
<li>imlib_blend_image_onto_image_skewed(..., 50, 0, 50, 50, -50, 50);<br><br>
|
||||
will rotate the image 45 degrees clockwise, and will scale it so its
|
||||
corners are at (50,0)-(100,50)-(50,100)-(0,50) i.e. it fits into
|
||||
the 100x100 square, so it's scaled down to 70.7% (sqrt(2)/2).<br><br>
|
||||
<li>imlib_blend_image_onto_image_skewed(..., 50, 50, 100 * cos(a), 100 * sin(a), 0);<br><br>
|
||||
will rotate the image `a' degrees, with its upper left corner at
|
||||
(50,50).<br><br>
|
||||
</ul>
|
||||
<li>
|
||||
imlib_blend_image_onto_image_skewed(..., 0, 0, 100, 0, 0, 100);</li>
|
||||
|
||||
<p><br>will simply scale the image to be 100x100.
|
||||
<br>
|
||||
<li>
|
||||
imlib_blend_image_onto_image_skewed(..., 0, 0, 0, 100, 100, 0);</li>
|
||||
|
||||
<p><br>will scale the image to be 100x100, and flip it diagonally.
|
||||
<br>
|
||||
<li>
|
||||
imlib_blend_image_onto_image_skewed(..., 100, 0, 0, 100, -100, 0);</li>
|
||||
|
||||
<p><br>will scale the image and rotate it 90 degrees clockwise.
|
||||
<br>
|
||||
<li>
|
||||
imlib_blend_image_onto_image_skewed(..., 50, 0, 50, 50, -50, 50);</li>
|
||||
|
||||
<p><br>will rotate the image 45 degrees clockwise, and will scale it so
|
||||
its corners are at (50,0)-(100,50)-(50,100)-(0,50) i.e. it fits into the
|
||||
100x100 square, so it's scaled down to 70.7% (sqrt(2)/2).
|
||||
<br>
|
||||
<li>
|
||||
imlib_blend_image_onto_image_skewed(..., 50, 50, 100 * cos(a), 100 * sin(a),
|
||||
0);</li>
|
||||
|
||||
<p><br>will rotate the image `a' degrees, with its upper left corner at
|
||||
(50,50).
|
||||
<br> </ul>
|
||||
</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_render_image_on_drawable_skewed(int source_x,
|
||||
int source_y,
|
||||
int source_width,
|
||||
|
@ -1867,10 +1889,11 @@ Examples:
|
|||
int h_angle_y,
|
||||
int v_angle_x,
|
||||
int v_angle_y);</font></font></tt></b></pre>
|
||||
<blockquote>
|
||||
This works just like imlib_blend_image_onto_image_skewed(), except it blends
|
||||
the image onto the current drawable instead of the current image.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>This works just like imlib_blend_image_onto_image_skewed(),
|
||||
except it blends the image onto the current drawable instead of the current
|
||||
image.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_render_image_on_drawable_at_angle(int source_x,
|
||||
int source_y,
|
||||
int source_width,
|
||||
|
@ -1879,78 +1902,70 @@ the image onto the current drawable instead of the current image.
|
|||
int destination_y,
|
||||
int angle_x,
|
||||
int angle_y);</font></font></tt></b></pre>
|
||||
<blockquote>
|
||||
This function works just like imlib_render_image_on_drawable_skewed() except
|
||||
you cannot skew an image (v_angle_x and v_angle_y are 0).
|
||||
</blockquote>
|
||||
|
||||
<blockquote>This function works just like imlib_render_image_on_drawable_skewed()
|
||||
except you cannot skew an image (v_angle_x and v_angle_y are 0).</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+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>
|
||||
|
||||
<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><font color="#660000"><font size=+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.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>A utility function to return clipped line coordinates.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_polygon_new(void);</font></font></tt></b></pre>
|
||||
<blockquote>
|
||||
Returns a new polygon object with no points set.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>Returns a new polygon object with no points set.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_polygon_free(ImlibPolygon poly);</font></font></tt></b></pre>
|
||||
<blockquote>
|
||||
Frees a polygon object.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>Frees a polygon object.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_polygon_add_point(ImlibPolygon poly, int x, int y);</font></font></tt></b></pre>
|
||||
<blockquote>
|
||||
Adds the point (x,y) to a polygon object. 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.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>Adds the point (x,y) to a polygon object. 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.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_image_draw_polygon(ImlibPolygon poly, unsigned char closed);</font></font></tt></b></pre>
|
||||
<blockquote>
|
||||
Draws a polygon 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 <b>closed</b> is non-zero.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>Draws a polygon 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 <b>closed</b> is non-zero.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_image_fill_polygon(ImlibPolygon poly);</font></font></tt></b></pre>
|
||||
<blockquote>
|
||||
Fill the area defined by the polygon on the current context image with
|
||||
the current context colour.
|
||||
</blockquote>
|
||||
|
||||
<blockquote>Fill the area defined by the polygon on the current context
|
||||
image with the current context colour.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+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>
|
||||
|
||||
<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><font color="#660000"><font size=+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>
|
||||
|
||||
<blockquote>Returns non-zero if the point (x,y) is within the area defined
|
||||
by the polygon.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+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>
|
||||
|
||||
<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><font color="#660000"><font size=+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.
|
||||
</blockquote>
|
||||
|
||||
|
||||
<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.</blockquote>
|
||||
|
||||
<pre><b><tt><font color="#660000"><font size=+2>void imlib_image_filter(void);</font></font></tt></b></pre>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%define ver @VERSION@
|
||||
%define rel 1
|
||||
%define prefix @prefix@
|
||||
%define prefix /usr
|
||||
|
||||
Summary: Powerful image loading and rendering library
|
||||
Name: imlib2
|
||||
|
|
|
@ -1945,7 +1945,7 @@ imlib_get_maximum_font_ascent(void)
|
|||
{
|
||||
CHECK_PARAM_POINTER_RETURN("imlib_get_maximum_font_ascent", "font",
|
||||
ctxt_font, 0);
|
||||
return ((ImlibFont *) ctxt_font)->max_ascent;
|
||||
return ((ImlibFont *) ctxt_font)->max_ascent / 64;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1953,7 +1953,7 @@ imlib_get_maximum_font_descent(void)
|
|||
{
|
||||
CHECK_PARAM_POINTER_RETURN("imlib_get_maximum_font_descent", "font",
|
||||
ctxt_font, 0);
|
||||
return ((ImlibFont *) ctxt_font)->max_ascent;
|
||||
return ((ImlibFont *) ctxt_font)->max_descent / 64;
|
||||
}
|
||||
|
||||
Imlib_Color_Modifier imlib_create_color_modifier(void)
|
||||
|
|
Loading…
Reference in New Issue