This commit is contained in:
Gordon Williams 2020-05-29 14:19:48 +01:00
parent c934c211b9
commit 4d59fc198f
2 changed files with 124 additions and 124 deletions

View File

@ -473,8 +473,8 @@ void graphicsFillPoly(JsGraphics *gfx, int points, short *vertices) {
int vx = v[i].x;
int vy = v[i].y;
graphicsToDeviceCoordinates16x(gfx, &vx, &vy);
v[i].x = (short)vx;
v[i].y = (short)vy;
v[i].x = (short)(vx-8);
v[i].y = (short)(vy-8);
// work out min and max
short y = v[i].y>>4;
if (y<miny) miny=y;

View File

@ -24,37 +24,37 @@ function SHOULD_BE(a) {
g.clear().fillPoly([ 16, 0, 31, 31, 26, 31, 16, 12, 6, 28, 0, 27 ]);
SHOULD_BE(`
................#...............
...............##...............
...............##...............
..............####..............
..............####..............
...............#................
...............#................
..............###...............
.............####...............
.............#####..............
.............######.............
............######..............
............#######.............
...........########.............
...........#########............
...........#########............
..........###########...........
..........###########...........
.........#############..........
........#######..#####..........
........#######..######.........
.......#######....#####.........
.......#######....######........
......#######......#####........
.....#######.......######.......
.....#######........#####.......
....#######.........######......
....######...........#####......
...#######...........######.....
..#######.............#####.....
..#######.............######....
.#######...............#####....
.######................######...
#######.................#####...
........................######..
..........##########............
.........############...........
.........############...........
........#######.######..........
........#######.######..........
.......#######...######.........
......#######....######.........
......#######.....######........
.....#######......######........
.....######........######.......
....#######........######.......
...#######..........#####.......
...#######...........#####......
..#######............#####......
..######..............#####.....
.#######..............#####.....
#######................#####....
######.................#####....
...###..................#####...
........................#####...
.........................#####..
.........................#####..
.........................######.
................................`);
g.clear();
@ -62,34 +62,34 @@ g.fillPoly([16,2, 30,16, 16,30, 2,16]);
SHOULD_BE(`
................................
................................
................#...............
...............##...............
..............####..............
.............######.............
............########............
...........##########...........
..........############..........
.........##############.........
........################........
.......##################.......
......####################......
.....######################.....
....########################....
...##########################...
..############################..
...##########################...
....########################....
.....######################.....
......####################......
.......##################.......
........################........
.........##############.........
..........############..........
...........##########...........
............########............
.............######.............
..............####..............
...............##...............
...............#................
..............###...............
.............#####..............
............#######.............
...........#########............
..........###########...........
.........#############..........
........###############.........
.......#################........
......###################.......
.....#####################......
....#######################.....
...#########################....
..###########################...
..###########################...
...#########################....
....#######################.....
.....#####################......
......###################.......
.......#################........
........###############.........
.........#############..........
..........###########...........
...........#########............
............#######.............
.............#####..............
..............###...............
...............#................
................................
................................`);
@ -98,34 +98,34 @@ g.fillPoly([16,2, 30,12, 16,30, 2,20]);
SHOULD_BE(`
................................
................................
................#...............
...............##...............
...............####.............
..............######............
.............#########..........
............###########.........
...........#############........
...........###############......
..........#################.....
.........####################...
........######################..
...............#................
..............####..............
..............#####.............
.............#######............
............##########..........
...........############.........
...........##############.......
..........################......
.........##################.....
........#####################...
.......######################...
.......#####################....
......######################....
.....######################.....
....######################......
....#####################.......
...######################.......
...#####################........
..######################........
...####################.........
.....#################..........
..#####################.........
....##################..........
.....################...........
......###############...........
........#############...........
.........###########............
..........#########.............
............######..............
.............#####..............
...............##...............
........############............
.........##########.............
...........#######..............
............#####...............
.............####...............
...............#................
................................
................................`);
@ -170,38 +170,38 @@ g.clear();
g.setFont("Vector",32);
g.drawString("X");
SHOULD_BE(`
...#####................#####...
...######..............######...
....#####..............#####....
.....#####............#####.....
.....######..........######.....
......#####..........#####......
.......#####........#####.......
.......######......######.......
........#####......#####........
.........#####....#####.........
.........######..######.........
..........#####..#####..........
...........##########...........
...........##########...........
............########............
.............######.............
.............######.............
.............######.............
............########............
...........##########...........
...........##########...........
..........#####..#####..........
.........######..######.........
.........#####....#####.........
........#####......#####........
.......######......######.......
.......#####........#####.......
......#####..........#####......
.....######..........######.....
.....#####............#####.....
....#####..............#####....
...######..............######...`);
...#####...............#####....
...#####...............#####....
....#####.............#####.....
.....#####...........#####......
.....#####...........#####......
......#####.........#####.......
.......#####.......#####........
.......#####.......#####........
........#####.....#####.........
.........#####...#####..........
.........#####...#####..........
..........#####.#####...........
...........#########............
...........#########............
............#######.............
.............#####..............
.............#####..............
............#######.............
...........#########............
...........#########............
..........#####.#####...........
.........#####...#####..........
.........#####...#####..........
........#####.....#####.........
.......#####.......#####........
.......#####.......#####........
......#####.........#####.......
.....#####...........#####......
.....#####...........#####......
....#####.............#####.....
...#####...............#####....
...#####...............#####....`);
g.clear();
g.fillPoly([ 12, 0, 18, 0, 18, 15, 30, 24, 27, 30, 18, 24, 18, 36, 12, 36, 12, 24, 3, 30, 0, 24, 12, 15, 12, 0 ]);
@ -221,21 +221,21 @@ SHOULD_BE(`
............######..............
............######..............
............######..............
............######..............
...........########.............
.........############...........
........##############..........
.......################.........
.....####################.......
....######################......
...########################.....
.############################...
##############################..
.##########.######..##########..
.########...######...########...
..######....######.....######...
..####......######......####....
...##.......######........##....
...........#######..............
..........##########............
........#############...........
.......###############..........
......##################........
....#####################.......
...#######################......
..##########################....
#############################...
###########.#################...
#########...######..#########...
.#######....######...#######....
.#####......######.....#####....
..###.......######......###.....
..#.........######........#.....
............######..............
............######..............`);