From bcadfa267f976fe9f29afa50a635cbe3ea174e38 Mon Sep 17 00:00:00 2001 From: manuel Date: Sat, 2 May 2009 16:44:53 +0200 Subject: - colortable now uses uint32_t as identifier - rewrote xpm colortable parsing to convert their identifiers to our own and vica vi - implemented indexed8::setpixel/getpixel - moved rowsize to member variable in cbitmap - added second test for xpm/indexed8 --- ue2/imgsynth2/test/input_yellow_man1_indexed8 | 4 ++-- ue2/imgsynth2/test/input_yellow_man2_indexed8 | 13 +++++++++++ ue2/imgsynth2/test/yellow_man1_indexed8_ref.xpm | 27 +++++++++++++---------- ue2/imgsynth2/test/yellow_man2_indexed8_in.xpm | 27 +++++++++++++++++++++++ ue2/imgsynth2/test/yellow_man2_indexed8_ref.xpm | 29 +++++++++++++++++++++++++ 5 files changed, 87 insertions(+), 13 deletions(-) create mode 100644 ue2/imgsynth2/test/input_yellow_man2_indexed8 create mode 100644 ue2/imgsynth2/test/yellow_man2_indexed8_in.xpm create mode 100644 ue2/imgsynth2/test/yellow_man2_indexed8_ref.xpm (limited to 'ue2/imgsynth2/test') diff --git a/ue2/imgsynth2/test/input_yellow_man1_indexed8 b/ue2/imgsynth2/test/input_yellow_man1_indexed8 index c0385c3..84c4604 100644 --- a/ue2/imgsynth2/test/input_yellow_man1_indexed8 +++ b/ue2/imgsynth2/test/input_yellow_man1_indexed8 @@ -4,7 +4,7 @@ read(XPM, test/yellow_man1_indexed8_in.xpm) -#fillrect(0,3,6,5,0,255,0) -#fillrect(2,13,7,4,0,0,255) +fillrect(0,3,6,5,0,255,0) +fillrect(2,13,7,4,0,0,255) write(XPM, test/yellow_man1_indexed8_out.xpm) diff --git a/ue2/imgsynth2/test/input_yellow_man2_indexed8 b/ue2/imgsynth2/test/input_yellow_man2_indexed8 new file mode 100644 index 0000000..440c653 --- /dev/null +++ b/ue2/imgsynth2/test/input_yellow_man2_indexed8 @@ -0,0 +1,13 @@ +#in: test/yellow_man2_indexed8_in.xpm +#out: test/yellow_man2_indexed8_out.xpm +#ref: test/yellow_man2_indexed8_ref.xpm + +read(XPM, test/yellow_man2_indexed8_in.xpm) + +fillrect(0,3,6,5,0,255,0) +fillrect(2,13,7,4,0,0,255) +mirror_x() +mirror_y() +invert() + +write(XPM, test/yellow_man2_indexed8_out.xpm) diff --git a/ue2/imgsynth2/test/yellow_man1_indexed8_ref.xpm b/ue2/imgsynth2/test/yellow_man1_indexed8_ref.xpm index bd3beb4..7526656 100644 --- a/ue2/imgsynth2/test/yellow_man1_indexed8_ref.xpm +++ b/ue2/imgsynth2/test/yellow_man1_indexed8_ref.xpm @@ -3,22 +3,27 @@ static char * yellow_man1_default_xpm[] = { "9 17 4 1 0 0 XPMEXT", ". c #000000", "# c #FFF200", -"+ c #00FF00", -"@ c #0000FF", +"b c #00FF00", +"c c #0000FF", ".........", ".........", "...###...", -"++++++...", -"++++++...", -"++++++...", -"++++++#..", -"++++++.#.", +"bbbbbb...", +"bbbbbb...", +"bbbbbb...", +"bbbbbb#..", +"bbbbbb.#.", ".#.###.#.", ".#.###.#.", ".#.###.#.", "...#.#...", "...#.#...", -"..@@@@@@@", -"..@@@@@@@", -"..@@@@@@@", -"..@@@@@@@"}; +"..ccccccc", +"..ccccccc", +"..ccccccc", +"..ccccccc", +"XPMEXT ext1 data1", +"XPMEXT ext2", +"data2_1", +"data2_2", +"XPMENDEXT"}; \ No newline at end of file diff --git a/ue2/imgsynth2/test/yellow_man2_indexed8_in.xpm b/ue2/imgsynth2/test/yellow_man2_indexed8_in.xpm new file mode 100644 index 0000000..bd11b48 --- /dev/null +++ b/ue2/imgsynth2/test/yellow_man2_indexed8_in.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * yellow_man1_default_xpm[] = { +"9 17 2 1 0 0 XPMEXT", +". c #000000 g4 #000000", +"# c #FFF200", +".........", +".........", +"...###...", +"...###...", +"...###...", +"....#....", +"..#####..", +".#.###.#.", +".#.###.#.", +".#.###.#.", +".#.###.#.", +"...#.#...", +"...#.#...", +"...#.#...", +"...#.#...", +".........", +".........", +"XPMEXT ext1 data1", +"XPMEXT ext2", +"data2_1", +"data2_2", +"XPMENDEXT"}; diff --git a/ue2/imgsynth2/test/yellow_man2_indexed8_ref.xpm b/ue2/imgsynth2/test/yellow_man2_indexed8_ref.xpm new file mode 100644 index 0000000..5ff048f --- /dev/null +++ b/ue2/imgsynth2/test/yellow_man2_indexed8_ref.xpm @@ -0,0 +1,29 @@ +/* XPM */ +static char * yellow_man1_default_xpm[] = { +"9 17 4 1 0 0 XPMEXT", +". c #FFFFFF", +"# c #000DFF", +"b c #FF00FF", +"c c #FFFF00", +"ccccccc..", +"ccccccc..", +"ccccccc..", +"ccccccc..", +"...#.#...", +"...#.#...", +".#.###.#.", +".#.###.#.", +".#.###.#.", +".#.bbbbbb", +"..#bbbbbb", +"...bbbbbb", +"...bbbbbb", +"...bbbbbb", +"...###...", +".........", +".........", +"XPMEXT ext1 data1", +"XPMEXT ext2", +"data2_1", +"data2_2", +"XPMENDEXT"}; \ No newline at end of file -- cgit v1.2.3