Changeset 4583015 in mainline for uspace/app/gfxdemo/gfxdemo.c
- Timestamp:
- 2022-03-07T16:10:44Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ca2680d
- Parents:
- 5c27e77
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.