libdraw: sync allocimage/allocwindow prototypes with man pages

This commit is contained in:
ftrvxmtrx 2015-06-09 10:33:30 +02:00
parent 94333d83ab
commit a314302e64
5 changed files with 15 additions and 14 deletions

View file

@ -13,10 +13,10 @@ allocimage, allocimagemix, freeimage, nameimage, namedimage, setalpha, loadimage
.PP
.ta \w'\fLImage 'u
.B
Image *allocimage(Display *d, Rectangle r,
Image *allocimage(Display *d, Rectangle r,
.br
.B
ulong chan, int repl, int col)
ulong chan, int repl, ulong col)
.PP
.B
Image *allocimagemix(Display *d, ulong one, ulong three)
@ -102,7 +102,8 @@ on
is allocated with
.BR allocimage ;
it will have the rectangle, pixel channel format,
and replication flag
replication flag,
and initial fill color
given by its arguments.
Convenient pixel channels like
.BR GREY1 ,

View file

@ -22,7 +22,7 @@ void freesubfont(Subfont *f)
void installsubfont(char *name, Subfont *f)
.PP
.B
Subfont* lookupsubfont(Subfont *f)
Subfont* lookupsubfont(Display *d, char *name)
.PP
.B
void uninstallsubfont(Subfont *f)

View file

@ -33,7 +33,7 @@ Screen* publicscreen(Display *d, int id, ulong chan)
int freescreen(Screen *s)
.PP
.B
Image* allocwindow(Screen *s, Rectangle r, int ref, int val)
Image* allocwindow(Screen *s, Rectangle r, int ref, int col)
.PP
.B
void bottomwindow(Image *w)
@ -115,7 +115,7 @@ which takes a pointer to the
upon which to create the window, a rectangle
.I r
defining its geometry, an integer pixel value
.I val
.I col
to color the window initially, and a refresh method
.BR ref .
The refresh methods are

View file

@ -3,18 +3,18 @@
#include <draw.h>
Image*
allocimage(Display *d, Rectangle r, ulong chan, int repl, ulong val)
allocimage(Display *d, Rectangle r, ulong chan, int repl, ulong col)
{
Image *i;
i = _allocimage(nil, d, r, chan, repl, val, 0, 0);
i = _allocimage(nil, d, r, chan, repl, col, 0, 0);
if(i != nil)
setmalloctag(i, getcallerpc(&d));
return i;
}
Image*
_allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val, int screenid, int refresh)
_allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong col, int screenid, int refresh)
{
uchar *a;
char *err;
@ -73,7 +73,7 @@ _allocimage(Image *ai, Display *d, Rectangle r, ulong chan, int repl, ulong val,
BPLONG(a+35, clipr.min.y);
BPLONG(a+39, clipr.max.x);
BPLONG(a+43, clipr.max.y);
BPLONG(a+47, val);
BPLONG(a+47, col);
if(flushimage(d, 0) < 0)
goto Error;

View file

@ -107,18 +107,18 @@ Error:
}
Image*
allocwindow(Screen *s, Rectangle r, int ref, ulong val)
allocwindow(Screen *s, Rectangle r, int ref, ulong col)
{
return _allocwindow(nil, s, r, ref, val);
return _allocwindow(nil, s, r, ref, col);
}
Image*
_allocwindow(Image *i, Screen *s, Rectangle r, int ref, ulong val)
_allocwindow(Image *i, Screen *s, Rectangle r, int ref, ulong col)
{
Display *d;
d = s->display;
i = _allocimage(i, d, r, d->screenimage->chan, 0, val, s->id, ref);
i = _allocimage(i, d, r, d->screenimage->chan, 0, col, s->id, ref);
if(i == nil)
return nil;
i->screen = s;