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
(KainX)
It's generally a good idea to increment the reference count when you
implement reference counting. This should fix the mysterious problems
people have been having with Imlib2 stealing pixmaps out from under
Eterm.
SVN revision: 2916
of them should include Imlib2.h. In fact, nothing in the Imlib2 code
should, but if it's absolutely necessary, make sure the local one is found
before the system-wide one.
SVN revision: 2915
with it, because of licensing issues. I guess I'll be talking to Raster
next week what we'll do with the loader. Hope this makes us friends
with the Gimp developers again.
SVN revision: 2888
opacity, layer masks, and merging layers in the default mode
(simply "looking" through all the layers). The other layer modes
are missing right now (I hardly ever use anything other than "Normal"
anyway, but that's just me of course).
If you load an image as /path/to/file:<layer number> only the
specified layer is displayed, at the defined offset in the image.
Try this with imlib2_view since it ignores file loading errors.
Passing parameters to the loader will have to be handled better
(or did I miss someting?) but the loader can basically return
layers selectively.
SVN revision: 2847
or remove files. :-)
I fixed that. I also fixed a bug in filter_test that would have been
revealed by the proper warnings flags. So whoever wrote that wins the
raster boobie prize for allowing a non-void function to return without a
value.
I also made the spec file auto-generated.
SVN revision: 2719
play with soon - want to get the stuff correct before I commit some more
stuff. dox is the start of dox2 the document viewer based on imlib2. Designed
so that the style of the docs is seperate from the contents. Will evolve
rapdily over the next week.
SVN revision: 2716
-bmp2pt add this too it's command line and it'll bump map to where the
cursor is.
otherwise you will just get bump mapping from an infinite dist lightsource
SVN revision: 2687
variable to another filter as willem requested the other day.
eg.
filter( var=anotherfilter( var=13,var=30 ), var=blum );
youcan have as manylevels of filters as you want.
* parser should be quicker, no need to add "NULL" to the end of a
imlib_apply_filter() command.
* some more funky filters should be added soon, at 4.45am i decided to leave
that job till t/m.
SVN revision: 2686