revamp rpm packages completely. split loaders into their own packages
(more logical units). main imlib2 requires the jpeg, png and db laoders
at a minimum
SVN revision: 3417
Added the function:
unsigned char imlib_polygon_contains_point(ImlibPolygon poly, int x,
int y);
Tells you if a point lies in a polygon. Handy for apps that might want to
test for "selection" of a polygon shape or something...
SVN revision: 3355
clipping rect, but highly suboptimally (I'm not doing proper polygon
clipping here yet, just clipping slowly on each point drawn - really nasty).
There are probably some rounding errors in here. I need to work more on
this, but I have *so* little time for the next few weeks.
Please don't kill me for this code. It's not finished, but I'm about to move
house, and I have to get something working before I pack my PC away.
SVN revision: 3303
Hard to come up with a nice API for this, but here's what I have:
ImlibPolygon imlib_polygon_new(int type);
void imlib_polygon_free(ImlibPolygon poly);
void imlib_polygon_add_point(ImlibPolygon poly, int x, int y);
void imlib_image_draw_polygon(ImlibPolygon poly);
Clipping works with these, as demonstrated by test/imlib2
The type paramter may be: POLY_OPEN, POLY_CLOSED or POLY_FILLED (last one
not implemented yet).
I was wondering if draw_polygon should genererate updates, like draw_line.
Thoughts?
SVN revision: 3279
Removed all the _clipped functions.
Added imlib_context_set_cliprect(int x, int y, int w, int h) and a
corresponding _get_cliprect.
Set width to 0 to disable clipping (default).
Just use the normal _draw_ functions and it'll do the Right thing.
SVN revision: 3278
Sometimes it's handy to work out where your line was/would be drawn.
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);
SVN revision: 3277
void
imlib_image_draw_rectangle_clipped(int x, int y, int width, int height,
int clip_xmin, int clip_xmax, int clip_ymin,
int clip_ymax);
Works well. If you make install then cd test, make, ./imlib2, you'll see the
demo/test of the clipping code.
Next up: draw_polygon and draw_polygon_clipped.
Then (eeek) fill_polygon, fill_polygon_clipped, and some clipping for image
blending (fun).
SVN revision: 3276
Same as _draw_line but with extra parameters for the clipping region.
Tested and seems to work well. Will check further tomorrow when I convert
geist to use this instead of doing it internally.
Imlib_Updates
imlib_image_draw_line_clipped(int x1, int y1, int x2, int y2,
int clip_xmin, int clip_xmax, int clip_ymin,
int clip_ymax, char make_updates);
SVN revision: 3273
Reversed that change, as it caused segfaults in free().
I can't grok this code, so I'll leave it to raster.
Basically, if my code calls imlib_free_image_and_decache(), it doesn't free
the image, and it leaks.
The fix I applied made sure _Imlib_ConsumeImage was called, but this caused
a segfault.
*baffle
SVN revision: 3239
right fix here. Basically, the imlib_free_image_and_decache() call in api.c
sets the flag F_INVALID then calls the internal __ImlibFreeImage(), this
checks if the flag F_UNCACHEABLE is set, and only frees it if so.
So the image never got free()d. I have changed the
imlib_free_image_and_decache() to set the F_UNCACHEABLE flag *as well* as
F_INVALID. I hope that's the correct fix. raster?
SVN revision: 3238