Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Jeff Higgins <jeff@invalid.invalid> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: chosing "small 2d graphics library" interface |
| Date | 2015-03-29 09:33 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <mf8v04$8eg$1@dont-email.me> (permalink) |
| References | <ba08a0b0-e761-430f-9c23-458f7f14667d@googlegroups.com> <42b93617-513d-47db-88c0-21e9ca3a7422@googlegroups.com> |
On 03/29/2015 05:59 AM, Malcolm McLean wrote: > On Sunday, March 29, 2015 at 2:43:53 AM UTC+1, fir wrote: >> Im not sure if this question qill find >> good answers here but imo problem is >> quite important (also interesting) >> >> I got something like that, small 2d per >> pixel library on my own but the interface >> is a bit mess (not hard mess but i would >> like (ewentually) to get it really clean >> and tidy ;-) (im blinking becouse in my case >> it may be hard, but at least rethinking the >> interface is not bad) >> >> I need ExACT c intarface (small header) >> some questions to consider >> >> - should i make tlis library .lib or .dll, >> maybe source (if source should I put it in one file or more?) >> >> - should i make this library biger or smaller? >> I think smaller is beter, though it is not really >> clen if watching carefully, fir example if >> i care about optimisation then i need like to provide more versions of routines) [such liberery is form its nature rather small do not need >> vary many api calls, it seem that it should >> be forexample between 10 to 50 functions >> exposed, draw line, set pixel, ew drav bezier >> draw sprite etc >> >> - what should i put here (what functions ) to make it small but complete ? >> >> - if i make variants for functions (for example >> draw line with antialiasing and without) should i make separate function calls of parametrise the one? >> >> - what style of function names should i exactly chose (this is most iportant question) >> [ciould someone maybe wrote down the complete exact header examle?] >> >> - such library is a set of functions operating (writing to) a 2 dimensional pixel buffer (of size SIZE_X, SIZE_Y) i am not totally convinced how i should use this buffer, should it be >> encompased in library or should it be on the client code side and should i pass the pointer >> (and sizes) in each api call >> (efficiency is important so if i should pass >> those 3 values BUFF, SIZE_X, SIZE_Y to each >> draw pixel, drawline it would be probably a >> waste, so what options do i have? >> > I'd pass an rgba buffer, width and height. > > An IMAGE structure is just a nuisance. Calling code has to set up the image, then convert > back to its own essentially similar image structure. Defining point strutters is the same > problem as defining bool. Before bool was standardised, I used to have the saying > "Bool breaks libraries". > I'm curious what the experts think of what the Leptonica implementation has to offer. I'm using it in a couple of applications and it has so far been fast enough and easy to use. But I'm not using it for interactive drawing as fir seems hoping for.(I may be wrong here) Basic file defining image and image-related structs <http://tpgit.github.io/Leptonica/pix_8h_source.html> Implements Pix (image) class - the fundamental one for this library. <http://tpgit.github.io/Leptonica/pix1_8c_source.html> Pixel poking of image, pad and border pixels. <http://tpgit.github.io/Leptonica/pix2_8c_source.html> Masking and logical ops, counting, mirrored tiling. <http://tpgit.github.io/Leptonica/pix3_8c_source.html> Histograms, fg/bg estimation, rectangle extraction. <http://tpgit.github.io/Leptonica/pix4_8c_source.html>
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-28 18:43 -0700
Re: chosing "small 2d graphics library" interface Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-29 02:59 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-29 03:51 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-03-29 12:03 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-29 05:00 -0700
Re: chosing "small 2d graphics library" interface gof@somewhere.invalid (Gof) - 2015-04-01 08:02 +0000
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-01 09:40 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-01 04:04 -0700
Re: chosing "small 2d graphics library" interface Nobody <nobody@nowhere.invalid> - 2015-03-29 12:50 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-29 05:08 -0700
Re: chosing "small 2d graphics library" interface Jeff Higgins <jeff@invalid.invalid> - 2015-03-29 09:33 -0400
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-29 07:00 -0700
Re: chosing "small 2d graphics library" interface Jeff Higgins <jeff@invalid.invalid> - 2015-03-29 10:38 -0400
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-29 07:43 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-29 07:24 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-29 07:32 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-01 05:00 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-01 07:25 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-29 07:36 -0700
Re: chosing "small 2d graphics library" interface Jeff Higgins <jeff@invalid.invalid> - 2015-03-29 14:33 -0400
Re: chosing "small 2d graphics library" interface Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-03-29 12:36 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-03-29 13:01 -0700
chosing "small 2d graphics library" interface asetofsymbols@gmail.com - 2015-04-02 04:12 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 04:56 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 05:10 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 05:31 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 09:40 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 13:32 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 05:50 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 14:01 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 06:37 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 14:58 +0100
Re: chosing "small 2d graphics library" interface Bartc <bc@freeuk.com> - 2015-04-02 15:11 +0100
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 15:18 +0100
Re: chosing "small 2d graphics library" interface Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-02 09:21 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 09:34 -0700
Re: chosing "small 2d graphics library" interface Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-02 09:47 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 09:45 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 09:57 -0700
Re: chosing "small 2d graphics library" interface Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-02 10:15 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 18:34 +0100
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 18:35 +0100
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 17:45 +0100
Re: chosing "small 2d graphics library" interface Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-02 10:12 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 18:28 +0100
Re: chosing "small 2d graphics library" interface Bartc <bc@freeuk.com> - 2015-04-03 01:06 +0100
Re: chosing "small 2d graphics library" interface luser droog <luser.droog@gmail.com> - 2015-04-02 17:05 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 07:51 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 15:56 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 08:14 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 16:25 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 08:45 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 17:00 +0100
Re: chosing "small 2d graphics library" interface Keith Thompson <kst-u@mib.org> - 2015-04-02 13:03 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-05 14:25 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 09:06 -0700
Re: chosing "small 2d graphics library" interface Rosario19 <Ros@invalid.invalid> - 2015-04-02 18:22 +0200
Re: chosing "small 2d graphics library" interface Rosario19 <Ros@invalid.invalid> - 2015-04-02 18:40 +0200
Re: chosing "small 2d graphics library" interface Robert Wessel <robertwessel2@yahoo.com> - 2015-04-03 00:20 -0500
Re: chosing "small 2d graphics library" interface Rosario19 <Ros@invalid.invalid> - 2015-04-04 10:35 +0200
Re: chosing "small 2d graphics library" interface CHIN Dihedral <dihedral88888@gmail.com> - 2015-04-04 09:53 -0700
Re: chosing "small 2d graphics library" interface Noob <root@127.0.0.1> - 2015-04-03 14:27 +0200
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-03 05:38 -0700
Re: chosing "small 2d graphics library" interface Jeff Higgins <jeff@invalid.invalid> - 2015-04-02 19:23 -0400
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-02 23:46 -0700
Re: chosing "small 2d graphics library" interface asetofsymbols@gmail.com - 2015-04-02 08:03 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-02 16:14 +0100
Re: chosing "small 2d graphics library" interface Keith Thompson <kst-u@mib.org> - 2015-04-02 12:42 -0700
Re: chosing "small 2d graphics library" interface CHIN Dihedral <dihedral88888@gmail.com> - 2015-04-03 14:27 -0700
Re: chosing "small 2d graphics library" interface Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-03 14:50 -0700
Re: chosing "small 2d graphics library" interface Keith Thompson <kst-u@mib.org> - 2015-04-02 10:47 -0700
Re: chosing "small 2d graphics library" interface Bartc <bc@freeuk.com> - 2015-04-02 20:09 +0100
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-03 06:02 +0100
Re: chosing "small 2d graphics library" interface Bartc <bc@freeuk.com> - 2015-04-03 11:40 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-03 03:52 -0700
Re: chosing "small 2d graphics library" interface Bartc <bc@freeuk.com> - 2015-04-03 12:05 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-03 04:36 -0700
Re: chosing "small 2d graphics library" interface Bartc <bc@freeuk.com> - 2015-04-03 13:28 +0100
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-03 06:04 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-03 07:28 -0700
Re: chosing "small 2d graphics library" interface fir <profesor.fir@gmail.com> - 2015-04-03 12:43 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-03 12:57 +0100
Re: chosing "small 2d graphics library" interface asetofsymbols@gmail.com - 2015-04-03 22:25 -0700
Re: chosing "small 2d graphics library" interface asetofsymbols@gmail.com - 2015-04-03 22:34 -0700
Re: chosing "small 2d graphics library" interface asetofsymbols@gmail.com - 2015-04-03 23:09 -0700
Re: chosing "small 2d graphics library" interface Richard Heathfield <rjh@cpax.org.uk> - 2015-04-04 09:23 +0100
chosing "small 2d graphics library" interface asetofsymbols@gmail.com - 2015-04-02 07:26 -0700
csiph-web