Commit Graph

401 Commits

Author SHA1 Message Date
Carsten Haitzler ee6dba3708 wooo! found bug in filename:key splitting.... fix fix fix... :)
SVN revision: 3371
2000-09-09 19:42:09 +00:00
Carsten Haitzler 8b4280d552 dont need -ldb anymore
SVN revision: 3365
2000-09-09 02:33:25 +00:00
Carsten Haitzler f6e3a2eb9c add docs to cvs
SVN revision: 3359
2000-09-08 18:39:28 +00:00
Tom Gilbert a7557ddc46 final fix for _list_fonts()
SVN revision: 3357
2000-09-08 17:23:07 +00:00
Tom Gilbert 5de8b0f072 Much faster clipped ellipse filling.
SVN revision: 3356
2000-09-08 15:05:38 +00:00
Tom Gilbert cd464e9838 Much faster polygon clipping, made span() more sensible.
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
2000-09-08 14:47:36 +00:00
Carsten Haitzler d35f3a64d8 no debugging printf
SVN revision: 3318
2000-09-05 01:48:34 +00:00
Carsten Haitzler 2fe8f410e5 db loader/saver needs edb now - much better! :)
SVN revision: 3317
2000-09-05 01:25:01 +00:00
Tom Gilbert 20aa346460 tidy up
SVN revision: 3313
2000-09-04 17:02:58 +00:00
Tom Gilbert 82824227fc slight speedup
SVN revision: 3312
2000-09-04 15:56:59 +00:00
Tom Gilbert cdf8e6ed76 killed a rounding error in line clipping
SVN revision: 3308
2000-09-03 22:43:59 +00:00
Tom Gilbert 6a4d800e92 imlib_image_fill_ellipse()
SVN revision: 3306
2000-09-03 19:31:03 +00:00
Tom Gilbert e3d927d32c Better API, simpler polygon struct. imlib_polygon_new() now, no type member.
Then _draw_polygon(polygon, unsigned int closed), and _fill_polygon(poly).


SVN revision: 3305
2000-09-03 19:14:02 +00:00
Tom Gilbert 222e1b5f32 Polygon filling. Right now only works for convex polygons. Works with a
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
2000-09-03 18:04:00 +00:00
Carsten Haitzler f640137020 get rid of comment
SVN revision: 3297
2000-09-02 07:28:16 +00:00
Carsten Haitzler 6fe8ee962f foudn bug in mmx asm blending.. 1 line hihg blends get skipped.. fix! :)
(ugly fix tho)


SVN revision: 3296
2000-09-02 07:27:50 +00:00
Tom Gilbert 0794fb0f14 imlib_image_draw_ellipse()
Check test/imlib2 for example. Clipped too.

TODO: Not antialiased. yet. point drawing needs to be inlined, or something.


SVN revision: 3287
2000-08-31 22:49:06 +00:00
Carsten Haitzler 1250f13969 possible crash fixed
SVN revision: 3286
2000-08-31 19:02:37 +00:00
Term d0bc2c9c2b First commit. Woohoo!
Fixed the spec file to include imlib2-config.


SVN revision: 3281
2000-08-31 05:01:28 +00:00
Tom Gilbert c46b591e82 Added function to calculate bounds of a polygon.
SVN revision: 3280
2000-08-30 21:57:36 +00:00
Tom Gilbert b5ababf0b7 Polygons. Not filled ones yet =P Empty ones are easier ;-)
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
2000-08-30 19:52:57 +00:00
Tom Gilbert cebd7a0c23 Scratch that. Start again.
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
2000-08-30 18:26:49 +00:00
Tom Gilbert 313c889709 The line clipping function is quite useful, so I made it public.
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
2000-08-30 16:57:16 +00:00
Tom Gilbert e423fc372d Added rectangle clipping, in the form:
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
2000-08-30 16:39:44 +00:00
Carsten Haitzler ee1b52edaa noticed there was a set filter but no get.. addded
SVN revision: 3275
2000-08-30 01:34:19 +00:00
Carsten Haitzler 38c520c050 api call was silly - changed it :)
SVN revision: 3274
2000-08-29 22:29:13 +00:00
Tom Gilbert 4f72d15e1e Added line drawing with clipping.
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
2000-08-29 21:09:49 +00:00
Michael Jennings f16c92658f Miscellaneous fixes I ran across while doing the colormod stuff. One of
which fixes a seg fault bug.


SVN revision: 3243
2000-08-23 05:02:03 +00:00
Carsten Haitzler b99cd06c87 try that
SVN revision: 3240
2000-08-23 01:18:52 +00:00
Tom Gilbert 37e6364bd0 Urm. oops. hehe :)
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
2000-08-23 00:20:24 +00:00
Tom Gilbert 5303cd3cf1 Okay. imlib_free_image_and_decache() was leaking images. I hope I made the
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
2000-08-23 00:11:39 +00:00
Carsten Haitzler 54599eddb6 get rid of that replacement..
SVN revision: 3233
2000-08-22 21:17:28 +00:00
Carsten Haitzler e0da0c9d92 imlib2-config added
SVN revision: 3221
2000-08-22 04:28:38 +00:00
Carsten Haitzler ec7148bb2b fix static gc for multipel servers
SVN revision: 3195
2000-08-20 21:54:21 +00:00
Carsten Haitzler 1896e7b45e add 1 more font routine for getting geometry - useful. you'll need to
update imlib2 too to get evas to compile & work - it uses this routine


SVN revision: 3087
2000-08-10 22:11:40 +00:00
Tom Gilbert 6afed42c4a Don't show duplicates in imlib_list_fonts().
SVN revision: 3079
2000-08-09 19:41:29 +00:00
Tom Gilbert b257c14d76 Fixed imlib_list_fonts()
It was calling stat on filenames without paths, so that was failing.


SVN revision: 3064
2000-08-07 21:39:35 +00:00
Carsten Haitzler c465599b95 fix mem leak in lisitng fonts
SVN revision: 3043
2000-08-06 19:44:05 +00:00
Tom Gilbert 7389e00d31 fix core on imlib_list_fonts()
SVN revision: 3042
2000-08-06 19:41:13 +00:00
Michael Jennings 8d141765c0 Wed Jul 12 22:20:53 PDT 2000
(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
2000-07-13 05:04:36 +00:00
Michael Jennings 8a042f014f Some silly goose decided that these files should #include Imlib2.h. NONE
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
2000-07-13 03:45:15 +00:00
Horms b7e29643b9 rpm -ta now works on a tarball produced by "make distcheck" and friends
SVN revision: 2897
2000-06-29 23:56:57 +00:00
Tom Gilbert ce84557641 Willem's rotation patch.
SVN revision: 2889
2000-06-25 18:13:36 +00:00
Christian Kreibich 00dcd44c89 Bye bye XCF loader. Apparently I stepped on some Gimp people's feet
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
2000-06-25 14:46:38 +00:00
Carsten Haitzler cee044cabc apparently clone doesnt lone EVERYTHING.. now it clones all of it except
attached data tags...


SVN revision: 2865
2000-06-23 19:34:11 +00:00
Christian Kreibich 94c4ad783c Ahem. Of course the load fails when you can't open the file :o)
SVN revision: 2853
2000-06-22 11:22:42 +00:00
Christian Kreibich e9746c22f2 I don't know if the loader has endianness issues
(I guess it does), but this should definitely
work better.


SVN revision: 2848
2000-06-21 16:36:40 +00:00
Christian Kreibich af590f9221 An XCF loader. Currently it can handle layers, layer offsets, layer
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
2000-06-21 14:23:18 +00:00
Carsten Haitzler 8ae5e31dd9 patch to fix loader to handle non line-feed header pnm's :) and ascii too.
SVN revision: 2783
2000-06-15 15:34:19 +00:00
Carsten Haitzler a489b0932c fix endianess problem with loader
SVN revision: 2777
2000-06-12 06:39:20 +00:00