Skip to content

Commit 7d5fb74

Browse files
committed
window management
1 parent 99b861c commit 7d5fb74

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

example/demo1.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,24 +128,20 @@ void rotationDemo() {
128128

129129
Image tmpimg = Image(tmpWidth, tmpHeight, BLACK);
130130

131-
tmpimg.drawLine(00, 00, 99, 00, WHITE, SOLID, 1); // top
132-
tmpimg.drawLine(00, 00, 00, 50, WHITE, SOLID, 1); // left
133-
tmpimg.drawLine(99, 00, 99, 50, WHITE, SOLID, 1); // right
134-
tmpimg.drawLine(00, 50, 99, 50, WHITE, SOLID, 1); // bottom
131+
tmpimg.drawLine( 0, 0, tmpWidth-1, 0, WHITE, SOLID, 1); // top
132+
tmpimg.drawLine( 0, 0, 0, tmpHeight-1, WHITE, SOLID, 1); // left
133+
tmpimg.drawLine(tmpWidth-1, 0, tmpWidth-1, tmpHeight-1, WHITE, SOLID, 1); // right
134+
tmpimg.drawLine( 0, tmpHeight-1, tmpWidth-1, tmpHeight-1, WHITE, SOLID, 1); // bottom
135135

136-
printf("--- DEGREE_0 --------------------------------------------------\n");
137136
tmpimg.drawText(10, 10, "D_0", &Font24, BLACK, RED);
138137
d1.showImage(tmpimg, Point(30, 10), Point(30 + tmpWidth - 1, 10 + tmpHeight - 1), DEGREE_0); // RED
139138

140-
printf("--- DEGREE_90 --------------------------------------------------\n");
141139
tmpimg.drawText(10, 10, "D_90", &Font24, BLACK, YELLOW);
142140
d1.showImage(tmpimg, Point(30, 10), Point(30 + tmpWidth - 1, 10 + tmpHeight - 1), DEGREE_90); // YELLOW
143141

144-
printf("--- DEGREE_180 --------------------------------------------------\n");
145142
tmpimg.drawText(10, 10, "D_180", &Font24, BLACK, GREEN);
146143
d1.showImage(tmpimg, Point(30, 10), Point(30 + tmpWidth - 1, 10 + tmpHeight - 1), DEGREE_180); // GREEN
147144

148-
printf("--- DEGREE_270 --------------------------------------------------\n");
149145
tmpimg.drawText(10, 10, "D_270", &Font24, BLACK, CYAN);
150146
d1.showImage(tmpimg, Point(30, 10), Point(30 + tmpWidth - 1, 10 + tmpHeight - 1), DEGREE_270); // CYAN
151147

0 commit comments

Comments
 (0)