Changeset 4583015 in mainline for uspace/app
- Timestamp:
- 2022-03-07T16:10:44Z (4 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ca2680d
- Parents:
- 5c27e77
- Location:
- uspace/app
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/edit/edit.c
r5c27e77 r4583015 1259 1259 1260 1260 gfx_text_fmt_init(&fmt); 1261 fmt.font = font; 1261 1262 fmt.color = pane->color; 1262 1263 … … 1318 1319 return rc; 1319 1320 1320 rc = gfx_puttext( font,&tpos, &fmt, cbuf);1321 rc = gfx_puttext(&tpos, &fmt, cbuf); 1321 1322 if (rc != EOK) 1322 1323 return rc; -
uspace/app/fontedit/fontedit.c
r5c27e77 r4583015 503 503 504 504 gfx_text_fmt_init(&fmt); 505 fmt.font = fedit->font; 505 506 fmt.color = color; 506 507 … … 508 509 pos.y = y; 509 510 510 return gfx_puttext( fedit->font,&pos, &fmt, str);511 return gfx_puttext(&pos, &fmt, str); 511 512 } 512 513 -
uspace/app/gfxdemo/gfxdemo.c
r5c27e77 r4583015 238 238 239 239 gfx_text_fmt_init(&fmt); 240 fmt.font = font; 240 241 fmt.color = color; 241 242 fmt.halign = gfx_halign_center; … … 244 245 pos.x = w / 2; 245 246 pos.y = h - 1; 246 rc = gfx_puttext( font,&pos, &fmt, text);247 rc = gfx_puttext(&pos, &fmt, text); 247 248 if (rc != EOK) { 248 249 printf("Error rendering text.\n"); … … 689 690 690 691 gfx_text_fmt_init(&fmt); 692 fmt.font = font; 691 693 fmt.color = color; 692 694 693 695 pos.x = rect.p0.x; 694 696 pos.y = rect.p0.y; 695 rc = gfx_puttext( font,&pos, &fmt, "Top left");697 rc = gfx_puttext(&pos, &fmt, "Top left"); 696 698 if (rc != EOK) { 697 699 printf("Error rendering text.\n"); … … 702 704 pos.y = rect.p0.y; 703 705 fmt.halign = gfx_halign_center; 704 rc = gfx_puttext( font,&pos, &fmt, "Top center");706 rc = gfx_puttext(&pos, &fmt, "Top center"); 705 707 if (rc != EOK) 706 708 goto error; … … 709 711 pos.y = rect.p0.y; 710 712 fmt.halign = gfx_halign_right; 711 rc = gfx_puttext( font,&pos, &fmt, "Top right");713 rc = gfx_puttext(&pos, &fmt, "Top right"); 712 714 if (rc != EOK) 713 715 goto error; … … 718 720 pos.y = (rect.p0.y + rect.p1.y - 1) / 2; 719 721 fmt.halign = gfx_halign_left; 720 rc = gfx_puttext( font,&pos, &fmt, "Center left");722 rc = gfx_puttext(&pos, &fmt, "Center left"); 721 723 if (rc != EOK) 722 724 goto error; … … 725 727 pos.y = (rect.p0.y + rect.p1.y - 1) / 2; 726 728 fmt.halign = gfx_halign_center; 727 rc = gfx_puttext( font,&pos, &fmt, "Center");729 rc = gfx_puttext(&pos, &fmt, "Center"); 728 730 if (rc != EOK) 729 731 goto error; … … 732 734 pos.y = (rect.p0.y + rect.p1.y - 1) / 2; 733 735 fmt.halign = gfx_halign_right; 734 rc = gfx_puttext( font,&pos, &fmt, "Center right");736 rc = gfx_puttext(&pos, &fmt, "Center right"); 735 737 if (rc != EOK) 736 738 goto error; … … 741 743 pos.y = rect.p1.y - 1; 742 744 fmt.halign = gfx_halign_left; 743 rc = gfx_puttext( font,&pos, &fmt, "Bottom left");745 rc = gfx_puttext(&pos, &fmt, "Bottom left"); 744 746 if (rc != EOK) 745 747 goto error; … … 748 750 pos.y = rect.p1.y; 749 751 fmt.halign = gfx_halign_center; 750 rc = gfx_puttext( font,&pos, &fmt, "Bottom center");752 rc = gfx_puttext(&pos, &fmt, "Bottom center"); 751 753 if (rc != EOK) 752 754 goto error; … … 755 757 pos.y = rect.p1.y; 756 758 fmt.halign = gfx_halign_right; 757 rc = gfx_puttext( font,&pos, &fmt, "Bottom right");759 rc = gfx_puttext(&pos, &fmt, "Bottom right"); 758 760 if (rc != EOK) 759 761 goto error; … … 762 764 763 765 gfx_text_fmt_init(&fmt); 766 fmt.font = font; 764 767 765 768 for (i = 0; i < 8; i++) { … … 780 783 pos.x = w / 20; 781 784 pos.y = (6 + i) * h / 15; 782 rc = gfx_puttext( font,&pos, &fmt, "The quick brown fox jumps over the lazy dog.");785 rc = gfx_puttext(&pos, &fmt, "The quick brown fox jumps over the lazy dog."); 783 786 if (rc != EOK) 784 787 goto error; -
uspace/app/nav/panel.c
r5c27e77 r4583015 175 175 176 176 gfx_text_fmt_init(&fmt); 177 fmt.font = font; 177 178 rows = panel_page_size(panel); 178 179 … … 219 220 return rc; 220 221 221 rc = gfx_puttext( font,&pos, &fmt, entry->name);222 rc = gfx_puttext(&pos, &fmt, entry->name); 222 223 if (rc != EOK) { 223 224 (void) gfx_set_clip_rect(gc, NULL); … … 236 237 gfx_context_t *gc = ui_window_get_gc(panel->window); 237 238 ui_resource_t *res = ui_window_get_res(panel->window); 238 gfx_text_fmt_t fmt;239 239 panel_entry_t *entry; 240 240 ui_box_style_t bstyle; … … 242 242 int i, lines; 243 243 errno_t rc; 244 245 gfx_text_fmt_init(&fmt);246 244 247 245 rc = gfx_set_color(gc, panel->color);
Note:
See TracChangeset
for help on using the changeset viewer.