Lines Matching +full:x +full:- +full:y
1 // SPDX-License-Identifier: GPL-2.0+
32 static void ellipse(efi_uintn_t x, efi_uintn_t y, in ellipse() argument
39 efi_uintn_t dx = x1 - x0 + 1; in ellipse()
40 efi_uintn_t dy = y1 - y0 + 1; in ellipse()
42 if (dy * dy * (2 * x - xm) * (2 * x - xm) + in ellipse()
43 dx * dx * (2 * y - ym) * (2 * y - ym) <= dx * dx * dy * dy) in ellipse()
47 static void rectangle(efi_uintn_t x, efi_uintn_t y, in rectangle() argument
52 if (x >= x0 && y >= y0 && x <= x1 && y <= y1) in rectangle()
73 if (*pos >= WIDTH + gop->mode->info->width) in notify()
77 dx = *pos - WIDTH; in notify()
79 if (*pos >= gop->mode->info->width) { in notify()
80 width = WIDTH + gop->mode->info->width - *pos; in notify()
83 sx = WIDTH - *pos; in notify()
88 gop->blt(gop, bitmap, EFI_BLT_BUFFER_TO_VIDEO, sx, 0, dx, DEPTH, in notify()
104 efi_uintn_t x, y; in setup() local
106 boottime = systable->boottime; in setup()
109 ret = boottime->create_event(EVT_TIMER | EVT_NOTIFY_SIGNAL, in setup()
118 ret = boottime->locate_protocol(&efi_gop_guid, NULL, (void **)&gop); in setup()
126 ret = boottime->allocate_pool(EFI_LOADER_DATA, in setup()
133 for (y = 0; y < HEIGHT; ++y) { in setup()
134 for (x = 0; x < WIDTH; ++x) { in setup()
138 ellipse(x, y, 35, 55, 43, 75, BLACK, &pix); in setup()
139 ellipse(x, y, 36, 56, 42, 74, LIGHT_BLUE, &pix); in setup()
141 ellipse(x, y, 35, 75, 43, 95, BLACK, &pix); in setup()
142 ellipse(x, y, 36, 76, 42, 94, LIGHT_BLUE, &pix); in setup()
145 rectangle(x, y, 35, 73, 100, 77, BLACK, &pix); in setup()
148 ellipse(x, y, 120, 10, 160, 50, BLACK, &pix); in setup()
149 ellipse(x, y, 121, 11, 159, 59, YELLOW, &pix); in setup()
150 ellipse(x, y, 130, 20, 150, 40, BLACK, &pix); in setup()
151 ellipse(x, y, 131, 21, 149, 49, DARK_BLUE, &pix); in setup()
152 rectangle(x, y, 135, 10, 160, 50, DARK_BLUE, &pix); in setup()
153 ellipse(x, y, 132, 10, 138, 20, BLACK, &pix); in setup()
154 ellipse(x, y, 133, 11, 139, 19, RED, &pix); in setup()
157 ellipse(x, y, 45, 40, 75, 70, BLACK, &pix); in setup()
158 ellipse(x, y, 46, 41, 74, 69, ORANGE, &pix); in setup()
159 ellipse(x, y, 45, 80, 75, 109, BLACK, &pix); in setup()
160 ellipse(x, y, 46, 81, 74, 108, RED, &pix); in setup()
163 ellipse(x, y, 100, 30, 120, 50, BLACK, &pix); in setup()
164 ellipse(x, y, 101, 31, 119, 49, GREEN, &pix); in setup()
165 ellipse(x, y, 140, 30, 160, 50, BLACK, &pix); in setup()
166 ellipse(x, y, 141, 31, 159, 49, GREEN, &pix); in setup()
167 rectangle(x, y, 110, 30, 150, 50, BLACK, &pix); in setup()
168 rectangle(x, y, 110, 31, 150, 50, GREEN, &pix); in setup()
171 ellipse(x, y, 50, 40, 199, 109, BLACK, &pix); in setup()
172 ellipse(x, y, 51, 41, 198, 108, LIGHT_BLUE, &pix); in setup()
175 ellipse(x, y, 79, 57, 109, 82, BLACK, &pix); in setup()
176 ellipse(x, y, 80, 58, 108, 81, LIGHT_BLUE, &pix); in setup()
177 ellipse(x, y, 83, 61, 105, 78, BLACK, &pix); in setup()
178 ellipse(x, y, 84, 62, 104, 77, YELLOW, &pix); in setup()
181 * ellipse(x, y, 119, 57, 149, 82, BLACK, &pix); in setup()
182 * ellipse(x, y, 120, 58, 148, 81, LIGHT_BLUE, &pix); in setup()
183 * ellipse(x, y, 123, 61, 145, 78, BLACK, &pix); in setup()
184 * ellipse(x, y, 124, 62, 144, 77, YELLOW, &pix); in setup()
186 ellipse(x, y, 159, 57, 189, 82, BLACK, &pix); in setup()
187 ellipse(x, y, 160, 58, 188, 81, LIGHT_BLUE, &pix); in setup()
188 ellipse(x, y, 163, 61, 185, 78, BLACK, &pix); in setup()
189 ellipse(x, y, 164, 62, 184, 77, YELLOW, &pix); in setup()
191 bitmap[WIDTH * y + x] = pix; in setup()
208 ret = boottime->free_pool(bitmap); in teardown()
215 ret = boottime->close_event(event); in teardown()
239 if (!gop->mode) { in execute()
243 info = gop->mode->info; in execute()
244 max_mode = gop->mode->max_mode; in execute()
251 ret = gop->blt(gop, bitmap, EFI_BLT_VIDEO_FILL, 0, 0, 0, 0, in execute()
252 info->width, info->height, 0); in execute()
259 ret = gop->blt(gop, bitmap, EFI_BLT_BUFFER_TO_VIDEO, 0, 0, 0, DEPTH, in execute()
267 ret = gop->blt(gop, bitmap, EFI_BLT_VIDEO_TO_VIDEO, in execute()
276 ret = gop->blt(gop, bitmap, EFI_BLT_VIDEO_TO_BLT_BUFFER, in execute()
286 ret = boottime->set_timer(event, EFI_TIMER_PERIODIC, 250000); in execute()
292 con_out->set_cursor_position(con_out, 0, 0); in execute()
293 con_out->set_attribute(con_out, EFI_WHITE | EFI_BACKGROUND_BLUE); in execute()
297 con_out->set_attribute(con_out, EFI_LIGHTGRAY); in execute()