| 240 | } |
| 241 | |
| 242 | int XDrawable::drawRectangle(KThread* thread, const std::shared_ptr<XGC>& gc, S32 x, S32 y, U32 width, U32 height) { |
| 243 | if (gc->clip_rects.size() || gc->values.clip_mask || gc->values.clip_x_origin || gc->values.clip_y_origin) { |
| 244 | klog("XDrawable::drawRectangle clipping not implemented"); |
| 245 | } |
| 246 | // draw rectangle with no overlapping pixels |
| 247 | drawLine(thread, gc, x, y, x + width, y); // top (includes left and right) |
| 248 | drawLine(thread, gc, x + width, y + 1, x + width, y + height); // right ( includes bottom but not top) |
| 249 | drawLine(thread, gc, x, y + 1, x, y + height); // left (includes bottom but not top) |
| 250 | drawLine(thread, gc, x + 1, y + height, x + width - 1, y + height); // bottom (does not include left and right) |
| 251 | return Success; |
| 252 | } |
no test coverage detected