Changeset a65b0c8 in mainline
- Timestamp:
- 2020-06-08T18:18:40Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 84e74ea
- Parents:
- 8aef01c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/window.c
r8aef01c ra65b0c8 247 247 gfx_color_t *color; 248 248 gfx_rect_t prect; 249 gfx_rect_t drect; 249 gfx_rect_t dr; 250 gfx_rect_t pr; 250 251 gfx_context_t *gc; 251 252 log_msg(LOG_DEFAULT, LVL_DEBUG, "ds_window_paint_preview");253 252 254 253 /* … … 262 261 } 263 262 264 /* Clip rendering to the clipping rectangle */265 gfx_rect_clip(&prect, rect, &drect);263 log_msg(LOG_DEFAULT, LVL_DEBUG, "ds_window_paint_preview"); 264 prect.p0.x, prect.p0.y, prect.p1.x, prect.p1.y); 266 265 267 266 rc = gfx_color_new_rgb_i16(0xffff, 0xffff, 0xffff, &color); … … 272 271 if (gc != NULL) { 273 272 gfx_set_color(gc, color); 274 gfx_fill_rect(gc, &drect); 273 274 /* 275 * TODO: Ideally we'd want XOR operation to make the preview 276 * frame visible on any background. If we wanted to get really 277 * fancy, we'd fill it with a pattern 278 */ 279 280 pr.p0.x = prect.p0.x; 281 pr.p0.y = prect.p0.y; 282 pr.p1.x = prect.p1.x; 283 pr.p1.y = prect.p0.y + 1; 284 gfx_rect_clip(&pr, rect, &dr); 285 gfx_fill_rect(gc, &dr); 286 287 pr.p0.x = prect.p0.x; 288 pr.p0.y = prect.p1.y - 1; 289 pr.p1.x = prect.p1.x; 290 pr.p1.y = prect.p1.y; 291 gfx_rect_clip(&pr, rect, &dr); 292 gfx_fill_rect(gc, &dr); 293 294 pr.p0.x = prect.p0.x; 295 pr.p0.y = prect.p0.y; 296 pr.p1.x = prect.p0.x + 1; 297 pr.p1.y = prect.p1.y; 298 gfx_rect_clip(&pr, rect, &dr); 299 gfx_fill_rect(gc, &dr); 300 301 pr.p0.x = prect.p1.x - 1; 302 pr.p0.y = prect.p0.y; 303 pr.p1.x = prect.p1.x; 304 pr.p1.y = prect.p1.y; 305 gfx_rect_clip(&pr, rect, &dr); 306 gfx_fill_rect(gc, &dr); 307 275 308 } 276 309
Note:
See TracChangeset
for help on using the changeset viewer.