Date: Tue, 4 Dec 2012 22:53:26 GMT From: Brooks Davis <brooks@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 219880 for review Message-ID: <201212042253.qB4MrQE1031979@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@219880?ac=10 Change 219880 by brooks@brooks_zenith on 2012/12/04 22:52:29 Always center and left extend under-width title slides. Correct the position of the sandbox indicator when the slides aren't left aligned. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd/cheripoint/cheripoint.c#17 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/cheripoint/cheripoint.c#17 (text+ko) ==== @@ -443,7 +443,7 @@ render_cover(int dfd, const char *cover) { int pfd; - uint32_t r; + uint32_t r, fcol; struct iboxstate *is; busy(1); @@ -461,24 +461,25 @@ warnx("png_read_finish() failed for %s", cover); return (-1); } + fcol = slide_fcol + ((slide_width - is->width) / 2); fb_fill_region(white, 0, 0, fb_width, fb_height); - fb_post_region(__DEVOLATILE(uint32_t *, is->buffer), slide_fcol, 0, + fb_post_region(__DEVOLATILE(uint32_t *, is->buffer), fcol, 0, is->width, is->height); - if (slide_fcol > 0) { + if (fcol > 0) { /* Left extend the image if needed */ for (r = 0; r < is->height; r++) fb_fill_region(is->buffer[r * is->width], - 0, r, slide_fcol, 1); + 0, r, fcol, 1); } if (is->width < (uint)fb_width) { /* Right extend the image if needed */ for (r = 0; r < is->height; r++) fb_fill_region(is->buffer[((r + 1) * is->width) - 1], - slide_fcol + is->width, r, - fb_width - (slide_fcol + is->width), 1); + fcol + is->width, r, + fb_width - (fcol + is->width), 1); } if (sb_vis && sb != SB_NONE) - fb_rectangle(red, 2, 0, 0, is->width, is->height); + fb_rectangle(red, 2, fcol, 0, is->width, is->height); iboxstate_free(is); unbusy();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212042253.qB4MrQE1031979>
