Age | Commit message (Collapse) | Author | |
---|---|---|---|
2017-04-29 | libmemdraw: get rid of kernel iprint() emulation | cinap_lenrek | |
2017-04-29 | libmemdraw/libmemlayer: get rid of drawdebug prints | cinap_lenrek | |
2016-11-17 | libmemdraw: cleanup fillpoly(), remove unused fillcolor hack | cinap_lenrek | |
2016-11-17 | libmemdraw: remove unused static drawbuf variables and ptrfn() declaration | cinap_lenrek | |
2016-05-29 | libmemdraw: remove unused static variable from memimagedraw() | cinap_lenrek | |
2015-03-01 | libdraw: use readn() to read headers and Fontchar array | cinap_lenrek | |
the Fontchar array might be bigger than the i/o unit, so we have to use readn() to properly read it. | |||
2015-02-24 | libdraw: check fontchar count in openmemsubfont() and readsubfont() | cinap_lenrek | |
2014-12-30 | libmemdraw: never point Buffer.alpha to nil (thanks mischief) | cinap_lenrek | |
the boolcopy optimization doesnt doesnt use Buffer.alpha, tho the debug function dumpbuf() still can dereference it. to keep it simple, always have Buffer.alpha point to the channel or &ones when not used. | |||
2014-12-28 | libmemdraw: fix fd leak in openmemsubfont and memory leak in freememsubfont | mischief | |
2014-09-19 | libmemdraw: fix byte ordering in memfillcolor() | cinap_lenrek | |
memfillcolor() used to write longs in host byte order which is wrong. have to always use little endian. to simplify, moved little endian conversion into memsetl() and memsets() avoiding code duplication. | |||
2014-09-14 | libmemdraw: update drawtest to use same rounding in alpha calculation as ↵ | cinap_lenrek | |
libmemdraw | |||
2014-04-12 | libmemdraw: improve readbyte() and writebyte() routines | cinap_lenrek | |
remove unused memsetb() routine. replace foo ? 1 : 0 with foo != 0 avoid double calculation of rgb components in readbyte() handle byte aligned color components in writebyte() which lets us avoid the read-modify-write and the shifting. surprisingly, the branches in the loop are way less important than avoiding the memory access. this change makes ganes/snes playable at -3 scaling. | |||
2014-02-01 | libmemdraw: apply erik quanstros fix for sign preserving in byteaddr() | cinap_lenrek | |
2013-12-09 | draw: fix drawing of replicated source image on memlayer with a clip rectangle | cinap_lenrek | |
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-11-12 | libmemdraw: change memimageinit() to return integer error (for kernel), ↵ | cinap_lenrek | |
minor cleanups | |||
2013-06-16 | draw: add badrect() function to reject zero, negative size or orverly huge ↵ | cinap_lenrek | |
rectangles not checking the rectangle dimensions causes integer overflows and memory corruption. adding a new badrect() function that checks for these cases. | |||
2013-06-16 | libmemdraw: fix drawing to color mapped with alpha chan (m8a8) | cinap_lenrek | |
2011-09-04 | libdraw: reduce memory for writeimage/writememimage | cinap_lenrek | |
2011-09-04 | libdraw: fix unloadimage() for wide images, libmemdraw: work arround width ↵ | cinap_lenrek | |
limit by outputting uncompressed image in writememimage() if compressed blocksize exceeds chunk limit | |||
2011-04-11 | vesa-changes | cinap_lenrek | |
2011-03-30 | Import sources from 2011-03-30 iso image - lib | Taru Karttunen | |
2011-03-30 | Import sources from 2011-03-30 iso image | Taru Karttunen | |