forked from old/legacy-imlib2
fixed a bunch of warnings. reverted last commit.
SVN revision: 8972
This commit is contained in:
parent
f234855e8d
commit
e850bf67cc
14
src/api.c
14
src/api.c
|
@ -560,8 +560,7 @@ void
|
||||||
imlib_context_get_color_hsva(float *hue, float *saturation, float *value,
|
imlib_context_get_color_hsva(float *hue, float *saturation, float *value,
|
||||||
int *alpha)
|
int *alpha)
|
||||||
{
|
{
|
||||||
int r, g, b, f;
|
int r, g, b;
|
||||||
float i, j, k, max, min, d;
|
|
||||||
|
|
||||||
imlib_context_get_color(&r, &g, &b, alpha);
|
imlib_context_get_color(&r, &g, &b, alpha);
|
||||||
__imlib_rgb_to_hsv(r, g, b, hue, saturation, value);
|
__imlib_rgb_to_hsv(r, g, b, hue, saturation, value);
|
||||||
|
@ -1050,10 +1049,7 @@ imlib_image_set_border(Imlib_Border * border)
|
||||||
im->border.right = border->right;
|
im->border.right = border->right;
|
||||||
im->border.top = border->top;
|
im->border.top = border->top;
|
||||||
im->border.bottom = border->bottom;
|
im->border.bottom = border->bottom;
|
||||||
|
|
||||||
#ifndef X_DISPLAY_MISSING
|
|
||||||
__imlib_DirtyPixmapsForImage(im);
|
__imlib_DirtyPixmapsForImage(im);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2114,8 +2110,6 @@ imlib_text_draw_with_return_metrics(int x, int y, const char *text,
|
||||||
{
|
{
|
||||||
ImlibImage *im;
|
ImlibImage *im;
|
||||||
ImlibFont *fn;
|
ImlibFont *fn;
|
||||||
char *tt;
|
|
||||||
int tx, ty;
|
|
||||||
int dir;
|
int dir;
|
||||||
|
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
|
@ -3087,8 +3081,7 @@ imlib_image_query_pixel_hsva(int x, int y, float *hue, float *saturation,
|
||||||
{
|
{
|
||||||
ImlibImage *im;
|
ImlibImage *im;
|
||||||
DATA32 *p;
|
DATA32 *p;
|
||||||
int r, g, b, f;
|
int r, g, b;
|
||||||
float i, j, k, max, min, d;
|
|
||||||
|
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
ctx = imlib_context_new();
|
ctx = imlib_context_new();
|
||||||
|
@ -3121,8 +3114,7 @@ imlib_image_query_pixel_hlsa(int x, int y, float *hue, float *lightness,
|
||||||
{
|
{
|
||||||
ImlibImage *im;
|
ImlibImage *im;
|
||||||
DATA32 *p;
|
DATA32 *p;
|
||||||
int r, g, b, f;
|
int r, g, b;
|
||||||
float i, j, k, max, min, d;
|
|
||||||
|
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
ctx = imlib_context_new();
|
ctx = imlib_context_new();
|
||||||
|
|
|
@ -389,6 +389,9 @@ __imlib_BlendRGBAToData(DATA32 *src, int src_w, int src_h, DATA32 *dst,
|
||||||
int dst_w, int dst_h, int sx, int sy, int dx, int dy,
|
int dst_w, int dst_h, int sx, int sy, int dx, int dy,
|
||||||
int w, int h, char blend, char merge_alpha,
|
int w, int h, char blend, char merge_alpha,
|
||||||
ImlibColorModifier *cm, ImlibOp op, char rgb_src);
|
ImlibColorModifier *cm, ImlibOp op, char rgb_src);
|
||||||
|
void
|
||||||
|
__imlib_build_pow_lut(void);
|
||||||
|
|
||||||
#ifdef DO_MMX_ASM
|
#ifdef DO_MMX_ASM
|
||||||
void
|
void
|
||||||
__imlib_mmx_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst,
|
__imlib_mmx_blend_rgba_to_rgb(DATA32 *src, int sw, DATA32 *dst,
|
||||||
|
|
|
@ -80,7 +80,6 @@ __imlib_DataCmodApply(DATA32 * data, int w, int h, int jump,
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
DATA32 *p;
|
DATA32 *p;
|
||||||
DATA8 r, g, b, a;
|
|
||||||
|
|
||||||
/* We might be adding alpha */
|
/* We might be adding alpha */
|
||||||
if (fl && !(*fl & F_HAS_ALPHA))
|
if (fl && !(*fl & F_HAS_ALPHA))
|
||||||
|
|
|
@ -31,6 +31,9 @@ void
|
||||||
__imlib_FilterSet(ImlibFilterColor *fil, int x, int y,
|
__imlib_FilterSet(ImlibFilterColor *fil, int x, int y,
|
||||||
int a, int r, int g, int b);
|
int a, int r, int g, int b);
|
||||||
void
|
void
|
||||||
|
__imlib_FilterSetColor(ImlibFilterColor * fil, int x, int y,
|
||||||
|
int a, int r, int g, int b);
|
||||||
|
void
|
||||||
__imlib_FilterDivisors(ImlibFilter *fil, int a, int r, int g, int b);
|
__imlib_FilterDivisors(ImlibFilter *fil, int a, int r, int g, int b);
|
||||||
void
|
void
|
||||||
__imlib_FilterConstants(ImlibFilter *fil, int a, int r, int g, int b);
|
__imlib_FilterConstants(ImlibFilter *fil, int a, int r, int g, int b);
|
||||||
|
|
|
@ -76,13 +76,9 @@ char **imlib_font_list_fonts(int *num_ret);
|
||||||
ImlibFont *imlib_font_load_joined(const char *name);
|
ImlibFont *imlib_font_load_joined(const char *name);
|
||||||
ImlibFont *imlib_font_load(const char *name, int size);
|
ImlibFont *imlib_font_load(const char *name, int size);
|
||||||
void imlib_font_free(ImlibFont * fn);
|
void imlib_font_free(ImlibFont * fn);
|
||||||
static int font_modify_cache_cb(Imlib_Hash * hash, const char *key,
|
|
||||||
void *data, void *fdata);
|
|
||||||
int imlib_font_cache_get(void);
|
int imlib_font_cache_get(void);
|
||||||
void imlib_font_cache_set(int size);
|
void imlib_font_cache_set(int size);
|
||||||
void imlib_font_flush(void);
|
void imlib_font_flush(void);
|
||||||
static int font_flush_free_glyph_cb(Imlib_Hash * hash, const char *key,
|
|
||||||
void *data, void *fdata);
|
|
||||||
void imlib_font_modify_cache_by(ImlibFont * fn, int dir);
|
void imlib_font_modify_cache_by(ImlibFont * fn, int dir);
|
||||||
void imlib_font_modify_cache_by(ImlibFont * fn, int dir);
|
void imlib_font_modify_cache_by(ImlibFont * fn, int dir);
|
||||||
void imlib_font_flush_last(void);
|
void imlib_font_flush_last(void);
|
||||||
|
|
|
@ -1267,11 +1267,8 @@ void
|
||||||
__imlib_DirtyImage(ImlibImage * im)
|
__imlib_DirtyImage(ImlibImage * im)
|
||||||
{
|
{
|
||||||
SET_FLAG(im->flags, F_INVALID);
|
SET_FLAG(im->flags, F_INVALID);
|
||||||
|
|
||||||
#ifndef X_DISPLAY_MISSING
|
|
||||||
/* and dirty all pixmaps generated from it */
|
/* and dirty all pixmaps generated from it */
|
||||||
__imlib_DirtyPixmapsForImage(im);
|
__imlib_DirtyPixmapsForImage(im);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -75,7 +75,7 @@ __imlib_RenderGetPixel(Display * d, Drawable w, Visual * v, Colormap cm,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsigned int rm, gm, bm;
|
unsigned int rm, gm, bm;
|
||||||
int i, rshift, gshift, bshift;
|
int i, rshift = 0, gshift = 0, bshift = 0;
|
||||||
DATA32 val;
|
DATA32 val;
|
||||||
|
|
||||||
rm = v->red_mask;
|
rm = v->red_mask;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "blend.h"
|
#include "blend.h"
|
||||||
#include "updates.h"
|
#include "updates.h"
|
||||||
#include "rgbadraw.h"
|
#include "rgbadraw.h"
|
||||||
|
#include "Imlib2.h"
|
||||||
|
|
||||||
#define round(a) floor(a+0.5)
|
#define round(a) floor(a+0.5)
|
||||||
|
|
||||||
|
@ -446,7 +447,7 @@ __imlib_draw_line(ImlibImage * im, int x1, int y1, int x2, int y2, DATA8 r,
|
||||||
{
|
{
|
||||||
int x, y, dx, dy, yy, xx, am, tmp;
|
int x, y, dx, dy, yy, xx, am, tmp;
|
||||||
DATA32 *p;
|
DATA32 *p;
|
||||||
DATA8 aaa, nr, ng, nb, rr, gg, bb, aa, na;
|
DATA8 aaa;
|
||||||
|
|
||||||
/* clip to top edge */
|
/* clip to top edge */
|
||||||
if ((y1 < 0) && (y2 < 0))
|
if ((y1 < 0) && (y2 < 0))
|
||||||
|
@ -1263,7 +1264,6 @@ __imlib_draw_filled_box_clipped(ImlibImage * im, int x, int y, int w, int h,
|
||||||
{
|
{
|
||||||
int yy, xx, tmp;
|
int yy, xx, tmp;
|
||||||
DATA32 *p;
|
DATA32 *p;
|
||||||
DATA8 nr, ng, nb, rr, gg, bb, aa, na;
|
|
||||||
|
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
{
|
{
|
||||||
|
@ -1369,7 +1369,6 @@ __imlib_draw_filled_box(ImlibImage * im, int x, int y, int w, int h, DATA8 r,
|
||||||
{
|
{
|
||||||
int yy, xx, tmp;
|
int yy, xx, tmp;
|
||||||
DATA32 *p;
|
DATA32 *p;
|
||||||
DATA8 nr, ng, nb, rr, gg, bb, aa, na;
|
|
||||||
|
|
||||||
if (x < 0)
|
if (x < 0)
|
||||||
{
|
{
|
||||||
|
@ -2053,6 +2052,8 @@ __imlib_draw_ellipse_clipped(ImlibImage * im, int xc, int yc, int aa, int bb,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* unused */
|
||||||
static void
|
static void
|
||||||
edge(edgeRec * table, ImlibPoint * pt1, ImlibPoint * pt2)
|
edge(edgeRec * table, ImlibPoint * pt1, ImlibPoint * pt2)
|
||||||
{
|
{
|
||||||
|
@ -2077,6 +2078,7 @@ edge(edgeRec * table, ImlibPoint * pt1, ImlibPoint * pt2)
|
||||||
}
|
}
|
||||||
while (iy1 <= iy2);
|
while (iy1 <= iy2);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
span(ImlibImage * im, int y, int x1, int x2, DATA8 r, DATA8 g,
|
span(ImlibImage * im, int y, int x1, int x2, DATA8 r, DATA8 g,
|
||||||
|
@ -2357,14 +2359,14 @@ __imlib_draw_polygon_filled(ImlibImage * im, ImlibPoly poly, int clip_xmin,
|
||||||
/* last span on line and still not < ss->x */
|
/* last span on line and still not < ss->x */
|
||||||
if (ps)
|
if (ps)
|
||||||
ps->next = s;
|
ps->next = s;
|
||||||
nospans:
|
nospans: ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i == y2)
|
if (i == y2)
|
||||||
goto nolines;
|
goto nolines;
|
||||||
i += step;
|
i += step;
|
||||||
}
|
}
|
||||||
nolines:
|
nolines: ;
|
||||||
}
|
}
|
||||||
for (i = 0; i < h; i++)
|
for (i = 0; i < h; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,8 +146,11 @@ void __imlib_draw_box(ImlibImage * im, int x, int y, int w, int h, DATA8 r,
|
||||||
DATA8 g, DATA8 b, DATA8 a, ImlibOp op);
|
DATA8 g, DATA8 b, DATA8 a, ImlibOp op);
|
||||||
void __imlib_draw_filled_box(ImlibImage * im, int x, int y, int w, int h,
|
void __imlib_draw_filled_box(ImlibImage * im, int x, int y, int w, int h,
|
||||||
DATA8 r, DATA8 g, DATA8 b, DATA8 a, ImlibOp op);
|
DATA8 r, DATA8 g, DATA8 b, DATA8 a, ImlibOp op);
|
||||||
void __imlib_draw_filled_box(ImlibImage * im, int x, int y, int w, int h,
|
void __imlib_draw_filled_box_clipped(ImlibImage * im, int x, int y, int w,
|
||||||
DATA8 r, DATA8 g, DATA8 b, DATA8 a, ImlibOp op);
|
int h,
|
||||||
|
int clip_xmin, int clip_xmax, int clip_ymin,
|
||||||
|
int clip_ymax, DATA8 r, DATA8 g, DATA8 b,
|
||||||
|
DATA8 a, ImlibOp op);
|
||||||
void __imlib_copy_image_data(ImlibImage * im, int x, int y, int w, int h,
|
void __imlib_copy_image_data(ImlibImage * im, int x, int y, int w, int h,
|
||||||
int nx, int ny);
|
int nx, int ny);
|
||||||
void __imlib_copy_alpha_data(ImlibImage * src, ImlibImage * dst, int x, int y,
|
void __imlib_copy_alpha_data(ImlibImage * src, ImlibImage * dst, int x, int y,
|
||||||
|
|
Loading…
Reference in New Issue