Commit graph

93 commits

Author SHA1 Message Date
cinap_lenrek
803bc88a5f add medium to low quality json(2) manual page 2013-12-19 19:56:04 +01:00
cinap_lenrek
71dbddef16 draw: fix drawing of replicated source image on memlayer with a clip rectangle
when a replicated source image with a clipr with clipr.min > Pt(0, 0),
drawclip() would properly translate the src->clipr on the dstr
but then clamp the source rectangle back on src->r.

while traversing down multiple layers, this would cause the translation to
be applied multiple times to the dst rectangle giving the wrong image result.

this change adds a new drawclipnorepl() function that avoids the clamping
of source and mask rectangles to src->r and mask->r. this is then used in
libmemlayer.

the final memimagedraw() call will call drawclip() which will do the final
claming.

a testcase is provided:

#include <u.h>
#include <libc.h>
#include <draw.h>

Image *blue;
Image *red;

void
main(int, char *argv[])
{
	Image *i;

	if(initdraw(nil, nil, argv[0]) < 0)
		sysfatal("initdraw: %r");
	i = allocimage(display, screen->r, screen->chan, 1, DWhite);

	red = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DRed);
	blue = allocimage(display, Rect(0,0,1,1), screen->chan, 1, DPaleblue);
	replclipr(red, 1, Rect(10, 10, 110, 110));
	replclipr(blue, 1, Rect(11, 11, 111, 111));

	/* draw on non-layer, works correctly */
	draw(i, i->r, red, nil, ZP);
	draw(i, i->r, blue, nil, ZP);
	draw(screen, screen->r, i, nil, i->r.min);
	flushimage(display, 1);

	/* draw on (screen) layer is too far to the right */
	draw(screen, screen->r, red, nil, ZP);
	draw(screen, screen->r, blue, nil, ZP);
	flushimage(display, 1);

	for(;;){
		sleep(1000);
	}
}
2013-12-09 03:35:01 +01:00
cinap_lenrek
d56a6fadc5 libmemdraw: change memimageinit() to return integer error (for kernel), minor cleanups 2013-11-12 21:42:05 +01:00
cinap_lenrek
235e06c988 arch(3), aml(2): document /dev/acpitbls file 2013-11-10 21:26:11 +01:00
cinap_lenrek
eb060fbfb1 aml(2): tabelize by function, move hardware linkage on separate page 2013-11-10 18:58:00 +01:00
stanley lieber
f637986cae aml(2): english 2013-11-03 20:01:03 -05:00
cinap_lenrek
f73bf5f90d aml(2): fix amldelay() decscription. it takes microseconds, not milliseconds. 2013-11-04 00:09:28 +01:00
cinap_lenrek
65829e635c add aml(2) manual page 2013-11-03 22:13:03 +01:00
cinap_lenrek
e30f50283c 9p(2): correct usage for srvrelease()/srvacquire()
the process is *NOT* allowed to exit after a srvrelease() as
it still holds a reference (srv->rref) preventing the srv
from beging freed/ended (listensrv) before srvacquire().
2013-10-17 08:26:05 +02:00
cinap_lenrek
65653a1840 pushssl(2), pushtls(2): clarify filedescriptor closing 2013-09-20 17:44:14 +02:00
ppatience0
2502ba5acc auth(2): auth_getkey only takes a single argument: char *params 2013-06-01 14:00:19 -04:00
cinap_lenrek
7aea1204b9 graphics(2): remove non existing char *mousedir argument from geninitdraw (from sources / geninitdraw-no-mousedir patch) 2013-05-25 04:39:53 +02:00
cinap_lenrek
35b5df0302 fix <mach.h> types in manual (erik quanstros machmantype patch) 2013-04-25 00:13:19 +02:00
cinap_lenrek
44c32071dc graphics(2): add newwindow() key reference 2013-04-22 22:14:08 +02:00
ftrvxmtrx
412c23204d ndb(2): fix wrong attr names 2013-02-22 22:52:52 +01:00
ftrvxmtrx
884c70cc22 ndb(2): add information about ipv6, srv and txt query types 2006-02-05 22:03:51 +01:00
cinap_lenrek
1c69f9c023 vac(1), ec(2), usb(3), hjfs(8): fix source reference 2013-01-09 08:17:09 +01:00
cinap_lenrek
7ceff03db3 bio: remove useless Breadn() as it does the same as Bread()
Bread() always reads exactly nbytes of data if it can. only
when it reaches end of file or an error it will return less.
so the Breadn() function that was introduced has been removed.

sorry for the confusion.
2012-12-25 02:45:28 +01:00
cinap_lenrek
7f22b32e63 isodate in libc? revert every commit for great justice! 2012-09-01 14:12:29 +02:00
google
cdb7bdde96 Add isotime() and isodate() functions to libc. 2012-09-02 23:05:41 +12:00
cinap_lenrek
fcc5e75d07 tsemacquire: manpage and syscallfmt 2012-07-30 22:45:49 +02:00
cinap_lenrek
e077349fef dial(2): not in parallel on 9front 2012-06-25 16:53:33 +02:00
stanley lieber
9decd26354 ec(2): english 2012-06-05 20:05:24 -05:00
aiju
1ffd5f9af1 added ec(2), added ripemd160 to sechash(2) 2012-06-04 12:27:38 +02:00
cinap_lenrek
9c844d90e1 lib9p: add Srv.start 2012-03-30 20:06:33 +02:00
cinap_lenrek
3bd600c01e rand(2): fix nroff output 2011-11-27 00:50:53 +01:00
cinap_lenrek
aa369a07a9 mouse(2): .IR syntax 2011-11-03 23:57:57 +01:00
cinap_lenrek
b2ba90e7b6 mouse(2): fix bad cross reference syntax 2011-11-02 00:26:29 +01:00
stanley lieber
29f4691e1a event(2): english 2011-10-31 17:53:32 -05:00
cinap_lenrek
278d4f8477 libdraw: added enter() and eenter() functions 2011-10-31 19:41:48 +01:00
cinap_lenrek
c0c9a9927f libbio: add Breadn 2011-10-06 00:39:05 +02:00
cinap_lenrek
3cf8b41f8b proto(2): document 9front extensions 2011-09-01 11:58:16 +02:00
cinap_lenrek
c7533af99a ioproc(2): document iosleep 2011-08-26 10:06:10 +02:00
cinap_lenrek
4be523b7e1 9p(2): add reference 2011-08-26 06:27:00 +02:00
cinap_lenrek
49c122665f 9p(2): document postsharesrv and srvrelease/srvacquire 2011-08-26 06:24:42 +02:00
cinap_lenrek
1404cc5077 nusb: fix documentation, cleanup, remove /sys/src/cmd/usb 2011-08-26 05:24:55 +02:00
cinap_lenrek
08c39320a4 libthread: reimplemented i/o procs using new interrupt ctl message 2011-08-22 03:03:27 +02:00
aiju
2ebf18958e fixed bio(2) man page 2011-07-14 12:48:16 +02:00
aiju
34f333404f updated bio(2) man page 2011-07-13 09:17:47 +02:00
cinap_lenrek
54a313181e fix manpages 2011-05-04 09:02:04 +00:00
aiju
d5162b8023 add reference to postnote(2) in notify(2) 2011-04-23 18:33:49 +02:00
Taru Karttunen
a9060cc06b Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
Taru Karttunen
b41b903422 Import sources from 2011-03-30 iso image - sys/man 2011-03-30 16:49:47 +03:00