PERFORCE change 219789 for review
Brooks Davis
brooks at FreeBSD.org
Thu Nov 15 01:24:30 UTC 2012
http://p4web.freebsd.org/@@219789?ac=10
Change 219789 by brooks at brooks_zenith on 2012/11/15 01:24:13
Add a new fb_rectangle primative to make it easy to draw boxes
around things.
Affected files ...
.. //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.c#7 edit
.. //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.h#7 edit
Differences ...
==== //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.c#7 (text+ko) ====
@@ -386,6 +386,24 @@
}
void
+fb_rectangle(u_int32_t color, int thickness, int x, int y, int w, int h)
+{
+ int col, row;
+
+ for (row = 0; row < h; row++) {
+ if (row < thickness || row >= h - thickness)
+ for (col = 0; col < w; col++)
+ pfbp[(y + row) * fb_width + (x + col)] = color;
+ else {
+ for (col = 0; col < thickness; col++) {
+ pfbp[(y + row) * fb_width + (x + col)] = color;
+ pfbp[(y + row) * fb_width + (x + col + w - thickness)] = color;
+ }
+ }
+ }
+}
+
+void
fb_fill_region(u_int32_t colour, int x, int y, int w, int h)
{
int col, row;
==== //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libde4tc/de4tc.h#7 (text+ko) ====
@@ -137,6 +137,8 @@
void fb_putpixel(int px, int py, int colour);
int fb_composite(u_int32_t *dbuf, int dwidth, int dheight, int x, int y,
const u_int32_t *sbuf, int swidth, int sheight);
+void fb_rectangle(u_int32_t color, int thickness, int x, int y, int
+ width, int height);
void fb_fill(int col);
void fb_fill_region(u_int32_t colour, int x, int y, int w, int h);
void fb_fill_buf(u_int32_t *buf, u_int32_t color, int width, int height);
More information about the p4-projects
mailing list