| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "gate/tests.hpp" | ||
| 2 | #include "gate/files.hpp" | ||
| 3 | #include "gate/graphics/images.hpp" | ||
| 4 | #include "gate/graphics/drawing.hpp" | ||
| 5 | #include "gate/graphics/imageformats.hpp" | ||
| 6 | #include "gate/graphics/pixmapimages.hpp" | ||
| 7 | #include "gate/graphics/bitmapimages.hpp" | ||
| 8 | #include "gate/graphics/gifimages.hpp" | ||
| 9 | #include "gate/graphics/jpegimages.hpp" | ||
| 10 | #include "gate/graphics/pngimages.hpp" | ||
| 11 | |||
| 12 | using namespace gate; | ||
| 13 | using namespace gate::graph; | ||
| 14 | |||
| 15 |
2/7✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | GATEXX_TEST_UNIT(Images) |
| 16 | { | ||
| 17 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage emptyImage; |
| 18 |
5/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
|
2 | GATEXX_TEST_CHECK(!emptyImage == true); |
| 19 | |||
| 20 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage image(64, 64); |
| 21 |
5/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
|
2 | GATEXX_TEST_CHECK(image.c_impl() != NULL); |
| 22 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(image.getPixelFormat()); |
| 23 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(image.clear(Color::Black)); |
| 24 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(image.setPixel(32, 32, Color::White)); |
| 25 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(image.getPixel(32, 32)); |
| 26 |
5/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 1 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
|
2 | GATEXX_TEST_CHECK(image.getPixelPtr(32, 32) != NULL); |
| 27 | |||
| 28 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | Drawer d(image); |
| 29 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(d.line(0, 0, 32, 16, Color::White)); |
| 30 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(d.rectangle(0, 0, 32, 16, Color::White)); |
| 31 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(d.box(48, 16, 54, 32, Color::White)); |
| 32 | |||
| 33 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage image2 = image.flipX(); |
| 34 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage image3 = image.flipY(); |
| 35 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage image4 = image.rollOver(); |
| 36 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage image5 = image.rotateLeft(); |
| 37 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage image6 = image.rotateRight(); |
| 38 | |||
| 39 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_argb4, image)); |
| 40 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_bgr24, image)); |
| 41 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_bgr32, image)); |
| 42 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_bgra, image)); |
| 43 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_gray8, image)); |
| 44 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_pal8, image)); |
| 45 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgb24, image)); |
| 46 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgb32, image)); |
| 47 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgb555, image)); |
| 48 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgb565, image)); |
| 49 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_rgba, image)); |
| 50 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(RasterImage(RasterImage::PixelFormat_yuv2, image)); |
| 51 | |||
| 52 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
4 | RasterImage dup(image.c_impl()); |
| 53 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(dup.makeGrayscale()); |
| 54 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(dup.makeMonochrome()); |
| 55 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage frame(128, 128); |
| 56 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
|
2 | frame.clear(Color(128, 128, 128, 128)); |
| 57 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(frame.paste(image, 32, 32, 0, 0, 64, 64, true)); |
| 58 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage subset; |
| 59 |
5/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 14 taken 1 times.
✗ Branch 15 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
✗ Branch 25 not taken.
✗ Branch 26 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(subset = frame.subset(32, 32, 64, 64)); |
| 60 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage original(64, 64); |
| 61 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(original.resampleFrom(subset)); |
| 62 | |||
| 63 | 2 | } | |
| 64 | |||
| 65 | |||
| 66 | 5 | static void checkImageFormats(RasterImage const& sourceImage, ImageFormats::FormatEnum format) | |
| 67 | { | ||
| 68 |
1/2✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
|
10 | MemStream stream; |
| 69 |
4/14✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
5 | GATEXX_TEST_CHECK_NOTHROW(ImageFormats::save(sourceImage, format, stream, 0)); |
| 70 |
1/2✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
|
10 | RasterImage newImage = ImageFormats::load(format, stream, 0); |
| 71 |
6/16✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 5 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 5 times.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
5 | GATEXX_TEST_CHECK_EQUAL(newImage.getWidth(), sourceImage.getWidth()); |
| 72 |
6/16✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 5 times.
✗ Branch 13 not taken.
✓ Branch 15 taken 5 times.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
5 | GATEXX_TEST_CHECK_EQUAL(newImage.getHeight(), sourceImage.getHeight()); |
| 73 | 5 | } | |
| 74 | |||
| 75 | 53 | static void paintImage(RasterImage& image) | |
| 76 | { | ||
| 77 |
1/2✓ Branch 1 taken 53 times.
✗ Branch 2 not taken.
|
53 | const unsigned width = image.getWidth(); |
| 78 |
1/2✓ Branch 1 taken 53 times.
✗ Branch 2 not taken.
|
53 | const unsigned height = image.getHeight(); |
| 79 | |||
| 80 |
1/2✓ Branch 1 taken 53 times.
✗ Branch 2 not taken.
|
53 | image.clear(Color::Blue); |
| 81 |
1/2✓ Branch 1 taken 53 times.
✗ Branch 2 not taken.
|
106 | Drawer d(image); |
| 82 |
1/2✓ Branch 1 taken 53 times.
✗ Branch 2 not taken.
|
53 | d.line(0, 0, width - 1, height - 1, Color::Yellow); |
| 83 |
1/2✓ Branch 1 taken 53 times.
✗ Branch 2 not taken.
|
53 | d.rectangle(0, 0, width - 1, height - 1, Color::Green); |
| 84 | 53 | } | |
| 85 | |||
| 86 |
2/7✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | GATEXX_TEST_UNIT(ImageFormats) |
| 87 | { | ||
| 88 | 2 | const unsigned dim = 128; | |
| 89 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage image(dim, dim); |
| 90 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | paintImage(image); |
| 91 | |||
| 92 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkImageFormats(image, ImageFormats::Format_Bitmap); |
| 93 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkImageFormats(image, ImageFormats::Format_Gif); |
| 94 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkImageFormats(image, ImageFormats::Format_Jpeg); |
| 95 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkImageFormats(image, ImageFormats::Format_Pixmap); |
| 96 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkImageFormats(image, ImageFormats::Format_Png); |
| 97 | |||
| 98 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".bmp"), ImageFormats::Format_Bitmap); |
| 99 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".gif"), ImageFormats::Format_Gif); |
| 100 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".jpg"), ImageFormats::Format_Jpeg); |
| 101 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".jpeg"), ImageFormats::Format_Jpeg); |
| 102 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".xpm"), ImageFormats::Format_Pixmap); |
| 103 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 13 taken 1 times.
✗ Branch 14 not taken.
✓ Branch 16 taken 1 times.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 22 not taken.
✗ Branch 23 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::parseFileExtension(".png"), ImageFormats::Format_Png); |
| 104 | |||
| 105 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Bitmap), "bmp"); |
| 106 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Gif), "gif"); |
| 107 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Jpeg), "jpg"); |
| 108 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Pixmap), "xpm"); |
| 109 |
6/16✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✓ Branch 15 taken 1 times.
✗ Branch 16 not taken.
✓ Branch 18 taken 1 times.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
✗ Branch 24 not taken.
✗ Branch 25 not taken.
|
2 | GATEXX_TEST_CHECK_EQUAL(ImageFormats::getFileExtension(ImageFormats::Format_Png), "png"); |
| 110 | |||
| 111 |
2/4✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
|
2 | static const StaticString testFile = "gategraphics_cpp_test_file.bmp"; |
| 112 | |||
| 113 |
4/12✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
|
2 | GATEXX_TEST_REQUIRE_NOTHROW(ImageFormats::save(image, testFile, 0)); |
| 114 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 11 taken 1 times.
✗ Branch 12 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
✗ Branch 21 not taken.
✗ Branch 22 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(ImageFormats::load(testFile, 0)); |
| 115 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(File::removeFile(testFile)); |
| 116 | 2 | } | |
| 117 | |||
| 118 | 5 | static void checkLoaderSaver(RasterImage const& sourceImage, ImageFormats::SaverFunction saver, ImageFormats::LoaderFunction loader) | |
| 119 | { | ||
| 120 |
1/2✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
|
10 | MemStream stream; |
| 121 |
4/14✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
5 | GATEXX_TEST_CHECK_NOTHROW(saver(sourceImage, stream, 0)); |
| 122 |
1/2✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
|
10 | RasterImage newImage; |
| 123 |
4/14✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
5 | GATEXX_TEST_CHECK_NOTHROW(loader(newImage, stream, 0)); |
| 124 | 5 | } | |
| 125 | |||
| 126 |
2/7✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | GATEXX_TEST_UNIT(ImageFormatsDirect) |
| 127 | { | ||
| 128 | 2 | unsigned dim = 128; | |
| 129 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage image(dim, dim); |
| 130 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | image.clear(Color::Blue); |
| 131 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | Drawer d(image); |
| 132 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | d.line(0, 0, dim - 1, dim - 1, Color::Yellow); |
| 133 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | d.rectangle(0, 0, dim - 1, dim - 1, Color::Green); |
| 134 | |||
| 135 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkLoaderSaver(image, &PixmapImages::save, &PixmapImages::load); |
| 136 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkLoaderSaver(image, &BitmapImages::save, &BitmapImages::load); |
| 137 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkLoaderSaver(image, &JpegImages::save, &JpegImages::load); |
| 138 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkLoaderSaver(image, &PngImages::save, &PngImages::load); |
| 139 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | checkLoaderSaver(image, &GifImages::save, &GifImages::load); |
| 140 | 2 | } | |
| 141 | |||
| 142 | static const uint8_t icon256[2102] = { | ||
| 143 | 0x42, 0x4d, 0x36, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x04, 0x00, 0x00, 0x28, 0x00, | ||
| 144 | 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, | ||
| 145 | 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0x00, 0x00, | ||
| 146 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, | ||
| 147 | 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80, | ||
| 148 | 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0x00, 0xc0, 0xdc, 0xc0, 0x00, 0xf0, 0xca, 0xa6, 0x00, 0x00, 0x20, | ||
| 149 | 0x40, 0x00, 0x00, 0x20, 0x60, 0x00, 0x00, 0x20, 0x80, 0x00, 0x00, 0x20, 0xa0, 0x00, 0x00, 0x20, | ||
| 150 | 0xc0, 0x00, 0x00, 0x20, 0xe0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x40, | ||
| 151 | 0x40, 0x00, 0x00, 0x40, 0x60, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x40, | ||
| 152 | 0xc0, 0x00, 0x00, 0x40, 0xe0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x20, 0x00, 0x00, 0x60, | ||
| 153 | 0x40, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x60, 0x80, 0x00, 0x00, 0x60, 0xa0, 0x00, 0x00, 0x60, | ||
| 154 | 0xc0, 0x00, 0x00, 0x60, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00, 0x80, | ||
| 155 | 0x40, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0xa0, 0x00, 0x00, 0x80, | ||
| 156 | 0xc0, 0x00, 0x00, 0x80, 0xe0, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xa0, 0x20, 0x00, 0x00, 0xa0, | ||
| 157 | 0x40, 0x00, 0x00, 0xa0, 0x60, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0xa0, 0xa0, 0x00, 0x00, 0xa0, | ||
| 158 | 0xc0, 0x00, 0x00, 0xa0, 0xe0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x00, 0x00, 0xc0, | ||
| 159 | 0x40, 0x00, 0x00, 0xc0, 0x60, 0x00, 0x00, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0xa0, 0x00, 0x00, 0xc0, | ||
| 160 | 0xc0, 0x00, 0x00, 0xc0, 0xe0, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x20, 0x00, 0x00, 0xe0, | ||
| 161 | 0x40, 0x00, 0x00, 0xe0, 0x60, 0x00, 0x00, 0xe0, 0x80, 0x00, 0x00, 0xe0, 0xa0, 0x00, 0x00, 0xe0, | ||
| 162 | 0xc0, 0x00, 0x00, 0xe0, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x20, 0x00, 0x40, 0x00, | ||
| 163 | 0x40, 0x00, 0x40, 0x00, 0x60, 0x00, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0xa0, 0x00, 0x40, 0x00, | ||
| 164 | 0xc0, 0x00, 0x40, 0x00, 0xe0, 0x00, 0x40, 0x20, 0x00, 0x00, 0x40, 0x20, 0x20, 0x00, 0x40, 0x20, | ||
| 165 | 0x40, 0x00, 0x40, 0x20, 0x60, 0x00, 0x40, 0x20, 0x80, 0x00, 0x40, 0x20, 0xa0, 0x00, 0x40, 0x20, | ||
| 166 | 0xc0, 0x00, 0x40, 0x20, 0xe0, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0x20, 0x00, 0x40, 0x40, | ||
| 167 | 0x40, 0x00, 0x40, 0x40, 0x60, 0x00, 0x40, 0x40, 0x80, 0x00, 0x40, 0x40, 0xa0, 0x00, 0x40, 0x40, | ||
| 168 | 0xc0, 0x00, 0x40, 0x40, 0xe0, 0x00, 0x40, 0x60, 0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x40, 0x60, | ||
| 169 | 0x40, 0x00, 0x40, 0x60, 0x60, 0x00, 0x40, 0x60, 0x80, 0x00, 0x40, 0x60, 0xa0, 0x00, 0x40, 0x60, | ||
| 170 | 0xc0, 0x00, 0x40, 0x60, 0xe0, 0x00, 0x40, 0x80, 0x00, 0x00, 0x40, 0x80, 0x20, 0x00, 0x40, 0x80, | ||
| 171 | 0x40, 0x00, 0x40, 0x80, 0x60, 0x00, 0x40, 0x80, 0x80, 0x00, 0x40, 0x80, 0xa0, 0x00, 0x40, 0x80, | ||
| 172 | 0xc0, 0x00, 0x40, 0x80, 0xe0, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x40, 0xa0, 0x20, 0x00, 0x40, 0xa0, | ||
| 173 | 0x40, 0x00, 0x40, 0xa0, 0x60, 0x00, 0x40, 0xa0, 0x80, 0x00, 0x40, 0xa0, 0xa0, 0x00, 0x40, 0xa0, | ||
| 174 | 0xc0, 0x00, 0x40, 0xa0, 0xe0, 0x00, 0x40, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x20, 0x00, 0x40, 0xc0, | ||
| 175 | 0x40, 0x00, 0x40, 0xc0, 0x60, 0x00, 0x40, 0xc0, 0x80, 0x00, 0x40, 0xc0, 0xa0, 0x00, 0x40, 0xc0, | ||
| 176 | 0xc0, 0x00, 0x40, 0xc0, 0xe0, 0x00, 0x40, 0xe0, 0x00, 0x00, 0x40, 0xe0, 0x20, 0x00, 0x40, 0xe0, | ||
| 177 | 0x40, 0x00, 0x40, 0xe0, 0x60, 0x00, 0x40, 0xe0, 0x80, 0x00, 0x40, 0xe0, 0xa0, 0x00, 0x40, 0xe0, | ||
| 178 | 0xc0, 0x00, 0x40, 0xe0, 0xe0, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x20, 0x00, 0x80, 0x00, | ||
| 179 | 0x40, 0x00, 0x80, 0x00, 0x60, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xa0, 0x00, 0x80, 0x00, | ||
| 180 | 0xc0, 0x00, 0x80, 0x00, 0xe0, 0x00, 0x80, 0x20, 0x00, 0x00, 0x80, 0x20, 0x20, 0x00, 0x80, 0x20, | ||
| 181 | 0x40, 0x00, 0x80, 0x20, 0x60, 0x00, 0x80, 0x20, 0x80, 0x00, 0x80, 0x20, 0xa0, 0x00, 0x80, 0x20, | ||
| 182 | 0xc0, 0x00, 0x80, 0x20, 0xe0, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x40, 0x20, 0x00, 0x80, 0x40, | ||
| 183 | 0x40, 0x00, 0x80, 0x40, 0x60, 0x00, 0x80, 0x40, 0x80, 0x00, 0x80, 0x40, 0xa0, 0x00, 0x80, 0x40, | ||
| 184 | 0xc0, 0x00, 0x80, 0x40, 0xe0, 0x00, 0x80, 0x60, 0x00, 0x00, 0x80, 0x60, 0x20, 0x00, 0x80, 0x60, | ||
| 185 | 0x40, 0x00, 0x80, 0x60, 0x60, 0x00, 0x80, 0x60, 0x80, 0x00, 0x80, 0x60, 0xa0, 0x00, 0x80, 0x60, | ||
| 186 | 0xc0, 0x00, 0x80, 0x60, 0xe0, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x20, 0x00, 0x80, 0x80, | ||
| 187 | 0x40, 0x00, 0x80, 0x80, 0x60, 0x00, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0xa0, 0x00, 0x80, 0x80, | ||
| 188 | 0xc0, 0x00, 0x80, 0x80, 0xe0, 0x00, 0x80, 0xa0, 0x00, 0x00, 0x80, 0xa0, 0x20, 0x00, 0x80, 0xa0, | ||
| 189 | 0x40, 0x00, 0x80, 0xa0, 0x60, 0x00, 0x80, 0xa0, 0x80, 0x00, 0x80, 0xa0, 0xa0, 0x00, 0x80, 0xa0, | ||
| 190 | 0xc0, 0x00, 0x80, 0xa0, 0xe0, 0x00, 0x80, 0xc0, 0x00, 0x00, 0x80, 0xc0, 0x20, 0x00, 0x80, 0xc0, | ||
| 191 | 0x40, 0x00, 0x80, 0xc0, 0x60, 0x00, 0x80, 0xc0, 0x80, 0x00, 0x80, 0xc0, 0xa0, 0x00, 0x80, 0xc0, | ||
| 192 | 0xc0, 0x00, 0x80, 0xc0, 0xe0, 0x00, 0x80, 0xe0, 0x00, 0x00, 0x80, 0xe0, 0x20, 0x00, 0x80, 0xe0, | ||
| 193 | 0x40, 0x00, 0x80, 0xe0, 0x60, 0x00, 0x80, 0xe0, 0x80, 0x00, 0x80, 0xe0, 0xa0, 0x00, 0x80, 0xe0, | ||
| 194 | 0xc0, 0x00, 0x80, 0xe0, 0xe0, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x20, 0x00, 0xc0, 0x00, | ||
| 195 | 0x40, 0x00, 0xc0, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x80, 0x00, 0xc0, 0x00, 0xa0, 0x00, 0xc0, 0x00, | ||
| 196 | 0xc0, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0xc0, 0x20, 0x00, 0x00, 0xc0, 0x20, 0x20, 0x00, 0xc0, 0x20, | ||
| 197 | 0x40, 0x00, 0xc0, 0x20, 0x60, 0x00, 0xc0, 0x20, 0x80, 0x00, 0xc0, 0x20, 0xa0, 0x00, 0xc0, 0x20, | ||
| 198 | 0xc0, 0x00, 0xc0, 0x20, 0xe0, 0x00, 0xc0, 0x40, 0x00, 0x00, 0xc0, 0x40, 0x20, 0x00, 0xc0, 0x40, | ||
| 199 | 0x40, 0x00, 0xc0, 0x40, 0x60, 0x00, 0xc0, 0x40, 0x80, 0x00, 0xc0, 0x40, 0xa0, 0x00, 0xc0, 0x40, | ||
| 200 | 0xc0, 0x00, 0xc0, 0x40, 0xe0, 0x00, 0xc0, 0x60, 0x00, 0x00, 0xc0, 0x60, 0x20, 0x00, 0xc0, 0x60, | ||
| 201 | 0x40, 0x00, 0xc0, 0x60, 0x60, 0x00, 0xc0, 0x60, 0x80, 0x00, 0xc0, 0x60, 0xa0, 0x00, 0xc0, 0x60, | ||
| 202 | 0xc0, 0x00, 0xc0, 0x60, 0xe0, 0x00, 0xc0, 0x80, 0x00, 0x00, 0xc0, 0x80, 0x20, 0x00, 0xc0, 0x80, | ||
| 203 | 0x40, 0x00, 0xc0, 0x80, 0x60, 0x00, 0xc0, 0x80, 0x80, 0x00, 0xc0, 0x80, 0xa0, 0x00, 0xc0, 0x80, | ||
| 204 | 0xc0, 0x00, 0xc0, 0x80, 0xe0, 0x00, 0xc0, 0xa0, 0x00, 0x00, 0xc0, 0xa0, 0x20, 0x00, 0xc0, 0xa0, | ||
| 205 | 0x40, 0x00, 0xc0, 0xa0, 0x60, 0x00, 0xc0, 0xa0, 0x80, 0x00, 0xc0, 0xa0, 0xa0, 0x00, 0xc0, 0xa0, | ||
| 206 | 0xc0, 0x00, 0xc0, 0xa0, 0xe0, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0xc0, 0xc0, 0x20, 0x00, 0xc0, 0xc0, | ||
| 207 | 0x40, 0x00, 0xc0, 0xc0, 0x60, 0x00, 0xc0, 0xc0, 0x80, 0x00, 0xc0, 0xc0, 0xa0, 0x00, 0xf0, 0xfb, | ||
| 208 | 0xff, 0x00, 0xa4, 0xa0, 0xa0, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, | ||
| 209 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, | ||
| 210 | 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 211 | 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 212 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 213 | 0xff, 0xff, 0x00, 0x00, 0xf8, 0x00, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 214 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 215 | 0x00, 0x00, 0xf8, 0xf8, 0xec, 0x00, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 216 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, | ||
| 217 | 0xf8, 0xf8, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, | ||
| 218 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, | ||
| 219 | 0xec, 0xec, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, | ||
| 220 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, | ||
| 221 | 0xec, 0xec, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, | ||
| 222 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec, | ||
| 223 | 0xec, 0xec, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, | ||
| 224 | 0xec, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xeb, 0xec, 0xec, 0x09, | ||
| 225 | 0xed, 0xec, 0xec, 0xeb, 0xec, 0x00, 0xec, 0xec, 0xeb, 0x09, 0x09, 0x08, 0x07, 0x09, 0xec, 0xec, | ||
| 226 | 0xec, 0xec, 0x99, 0x00, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0xec, 0x09, 0x00, 0xf6, 0xff, | ||
| 227 | 0xf6, 0xf6, 0xed, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0x09, 0x00, 0xff, 0xff, 0xff, 0xf6, 0x07, | ||
| 228 | 0xec, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0x09, 0xff, 0xff, 0xff, 0xff, | ||
| 229 | 0xff, 0xf6, 0x08, 0xec, 0xec, 0x00, 0xec, 0xec, 0x09, 0x00, 0xff, 0xf6, 0xf6, 0xff, 0xff, 0xf6, | ||
| 230 | 0x08, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xeb, 0x09, 0xff, 0xff, 0xf6, 0x09, 0x09, | ||
| 231 | 0x00, 0xff, 0xf6, 0xed, 0xec, 0x00, 0xec, 0xec, 0x09, 0xff, 0xf6, 0xf6, 0x07, 0x09, 0x00, 0xff, | ||
| 232 | 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xf3, 0x00, 0xf6, 0x00, 0xeb, 0xeb, 0xec, | ||
| 233 | 0x08, 0x00, 0xf6, 0xf5, 0xec, 0x00, 0xec, 0xec, 0x09, 0xff, 0xf6, 0xec, 0xec, 0xeb, 0xec, 0x00, | ||
| 234 | 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x09, 0x00, 0xf6, 0xed, 0xeb, 0xec, 0xec, | ||
| 235 | 0x09, 0x00, 0xf6, 0x09, 0xec, 0x00, 0xec, 0xec, 0x00, 0xff, 0xf6, 0xec, 0xf3, 0x00, 0xbe, 0x00, | ||
| 236 | 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x08, 0xf6, 0xf6, 0xe4, 0xeb, 0xec, 0x09, | ||
| 237 | 0x09, 0x00, 0xf6, 0xed, 0xec, 0x00, 0xec, 0xec, 0xf4, 0xff, 0xf6, 0xed, 0xf3, 0x00, 0xff, 0xff, | ||
| 238 | 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x08, 0xf6, 0xf6, 0xe4, 0xeb, 0xec, 0xec, | ||
| 239 | 0xbe, 0xff, 0xf6, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0x00, 0xf6, 0x07, 0x09, 0xf5, 0xf6, 0xf6, | ||
| 240 | 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x08, 0xf6, 0xf6, 0xed, 0xec, 0xec, 0x09, | ||
| 241 | 0x00, 0xf6, 0x09, 0xec, 0xec, 0x00, 0xec, 0xec, 0xeb, 0x09, 0xff, 0xf6, 0x09, 0xec, 0xec, 0xec, | ||
| 242 | 0x09, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0x08, 0x00, 0xf6, 0xf6, 0x07, 0x08, 0xff, | ||
| 243 | 0xff, 0x08, 0xec, 0xec, 0xec, 0x00, 0xec, 0xec, 0xec, 0xec, 0x08, 0xff, 0xf6, 0xf6, 0xf5, 0x09, | ||
| 244 | 0x08, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xf4, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 245 | 0x08, 0xec, 0xeb, 0xec, 0x00, 0x00, 0x00, 0xec, 0xec, 0xec, 0x09, 0x08, 0x00, 0xff, 0xff, 0xff, | ||
| 246 | 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0x09, 0x08, 0x00, 0xff, 0x08, 0x09, | ||
| 247 | 0x09, 0xeb, 0x00, 0x00, 0xf8, 0xf8, 0x99, 0x00, 0x00, 0xec, 0xec, 0xec, 0xf5, 0x08, 0xff, 0xff, | ||
| 248 | 0xf6, 0xed, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0xec, 0x09, 0xeb, 0xec, 0xeb, | ||
| 249 | 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xec, 0xeb, 0xec, 0x09, 0x09, | ||
| 250 | 0xed, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x00, 0x00, | ||
| 251 | 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xec, 0xec, 0xec, | ||
| 252 | 0xec, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0xec, 0xec, 0x00, 0x00, 0xf8, 0xf8, | ||
| 253 | 0xec, 0xeb, 0x00, 0xff, 0xff, 0xff, 0xf6, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xec, | ||
| 254 | 0xec, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0xec, 0xec, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, | ||
| 255 | 0xeb, 0x00, 0xf6, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, | ||
| 256 | 0x00, 0xec, 0xec, 0x99, 0x00, 0xff, 0x00, 0xf8, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec, | ||
| 257 | 0xf4, 0xf6, 0xed, 0x00, 0xff, 0xf6, 0xff, 0xff, 0x00, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, | ||
| 258 | 0x99, 0x00, 0x00, 0x99, 0x00, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, | ||
| 259 | 0xf4, 0xf6, 0x09, 0xf6, 0xec, 0x00, 0xf6, 0xf4, 0xf6, 0xed, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, | ||
| 260 | 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0xec, | ||
| 261 | 0x09, 0x00, 0xed, 0x00, 0xee, 0x00, 0xf6, 0xeb, 0x00, 0xee, 0xec, 0xec, 0xec, 0xec, 0xec, 0x99, | ||
| 262 | 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, | ||
| 263 | 0xeb, 0x00, 0xf6, 0x00, 0xff, 0xff, 0xf6, 0x00, 0x00, 0x00, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, | ||
| 264 | 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, | ||
| 265 | 0xec, 0x09, 0x00, 0xf6, 0xec, 0xec, 0xec, 0x00, 0xf6, 0xed, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, | ||
| 266 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, | ||
| 267 | 0xf8, 0xf8, 0xeb, 0x00, 0xff, 0xff, 0xff, 0xf6, 0xed, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, | ||
| 268 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 269 | 0x00, 0x00, 0xf8, 0xf8, 0xec, 0xec, 0xec, 0x99, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 270 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 271 | 0xff, 0xff, 0x00, 0x00, 0xf8, 0xf8, 0x99, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 272 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 273 | 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
| 274 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff | ||
| 275 | }; | ||
| 276 | |||
| 277 | |||
| 278 | static const uint8_t icon16[630] = { | ||
| 279 | 0x42, 0x4d, 0x76, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x28, 0x00, | ||
| 280 | 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, | ||
| 281 | 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0x00, 0x00, | ||
| 282 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, | ||
| 283 | 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80, | ||
| 284 | 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, | ||
| 285 | 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, | ||
| 286 | 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, | ||
| 287 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x70, 0x60, 0x0f, | ||
| 288 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x70, 0x76, 0x60, | ||
| 289 | 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x70, 0x77, 0x76, | ||
| 290 | 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x77, 0x70, 0x77, 0x77, | ||
| 291 | 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x77, 0x77, 0x70, 0x77, 0x77, | ||
| 292 | 0x77, 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x77, 0x77, 0x77, 0x70, 0x77, 0x77, | ||
| 293 | 0x77, 0x77, 0x77, 0x70, 0x0f, 0xff, 0x00, 0x77, 0x77, 0x77, 0x78, 0x87, 0x77, 0x70, 0x77, 0x78, | ||
| 294 | 0x88, 0x88, 0x77, 0x77, 0x60, 0x0f, 0x07, 0x77, 0x77, 0x80, 0xff, 0xff, 0x87, 0x70, 0x77, 0x78, | ||
| 295 | 0x0f, 0xff, 0xf8, 0x77, 0x76, 0x0f, 0x07, 0x77, 0x78, 0xff, 0xff, 0xff, 0x87, 0x70, 0x77, 0x80, | ||
| 296 | 0xff, 0xff, 0xff, 0x87, 0x76, 0x0f, 0x07, 0x77, 0x8f, 0xff, 0x88, 0x0f, 0xf8, 0x70, 0x77, 0x8f, | ||
| 297 | 0xff, 0x88, 0x0f, 0xf8, 0x76, 0x0f, 0x07, 0x77, 0x0f, 0x07, 0x77, 0x80, 0xf8, 0x70, 0x77, 0x8f, | ||
| 298 | 0xf7, 0x77, 0x70, 0xf8, 0x76, 0x0f, 0x07, 0x78, 0x0f, 0x87, 0x77, 0x80, 0xf8, 0x70, 0x77, 0x0f, | ||
| 299 | 0xf7, 0x70, 0x80, 0xf8, 0x76, 0x0f, 0x07, 0x78, 0xff, 0x77, 0x78, 0x80, 0xf8, 0x70, 0x77, 0x8f, | ||
| 300 | 0xf8, 0x70, 0xff, 0xf8, 0x76, 0x0f, 0x07, 0x78, 0xff, 0x77, 0x77, 0x8f, 0xf7, 0x70, 0x77, 0x70, | ||
| 301 | 0xf8, 0x88, 0xff, 0xf8, 0x76, 0x0f, 0x07, 0x78, 0xff, 0x87, 0x78, 0x0f, 0x87, 0x70, 0x77, 0x78, | ||
| 302 | 0xff, 0x87, 0x77, 0x88, 0x76, 0x0f, 0x07, 0x78, 0x0f, 0xf8, 0x8f, 0xf8, 0x77, 0x70, 0x77, 0x77, | ||
| 303 | 0x8f, 0xff, 0x88, 0x87, 0x76, 0x0f, 0x07, 0x78, 0x0f, 0xff, 0xff, 0x87, 0x77, 0x00, 0x07, 0x77, | ||
| 304 | 0x88, 0x0f, 0xff, 0xf8, 0x76, 0x0f, 0x07, 0x77, 0x88, 0x0f, 0x88, 0x87, 0x00, 0x77, 0x60, 0x07, | ||
| 305 | 0x77, 0x88, 0xff, 0xf8, 0x76, 0x0f, 0x07, 0x77, 0x77, 0x87, 0x77, 0x00, 0x77, 0x77, 0x76, 0x60, | ||
| 306 | 0x07, 0x77, 0x88, 0x87, 0x76, 0x0f, 0x07, 0x77, 0x77, 0x77, 0x00, 0x77, 0x77, 0x77, 0x77, 0x76, | ||
| 307 | 0x60, 0x07, 0x77, 0x77, 0x76, 0x0f, 0x07, 0x77, 0x77, 0x00, 0x77, 0x77, 0x0f, 0xff, 0xf7, 0x77, | ||
| 308 | 0x76, 0x60, 0x07, 0x77, 0x76, 0x0f, 0x07, 0x77, 0x00, 0x77, 0x77, 0x70, 0xf7, 0x77, 0x77, 0x77, | ||
| 309 | 0x77, 0x76, 0x60, 0x07, 0x76, 0x0f, 0x07, 0x00, 0x77, 0x77, 0x77, 0x8f, 0x80, 0xff, 0xff, 0x07, | ||
| 310 | 0x77, 0x77, 0x76, 0x60, 0x06, 0x0f, 0x00, 0x77, 0x77, 0x77, 0x77, 0x8f, 0x8f, 0x70, 0xf8, 0xf8, | ||
| 311 | 0x77, 0x77, 0x77, 0x76, 0x60, 0x0f, 0xff, 0x00, 0x77, 0x77, 0x77, 0x80, 0x80, 0x80, 0xf7, 0x08, | ||
| 312 | 0x77, 0x77, 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x70, 0xf0, 0xff, 0xf0, 0x00, | ||
| 313 | 0x77, 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x78, 0x0f, 0x77, 0x70, 0xf8, | ||
| 314 | 0x76, 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x70, 0xff, 0xff, 0x86, | ||
| 315 | 0x60, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x77, 0x76, 0x60, | ||
| 316 | 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x77, 0x60, 0x0f, | ||
| 317 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f, 0xff, | ||
| 318 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff | ||
| 319 | }; | ||
| 320 | |||
| 321 | static const uint8_t icon2[190] = { | ||
| 322 | 0x42, 0x4d, 0xbe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x28, 0x00, | ||
| 323 | 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, | ||
| 324 | 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0x00, 0x00, | ||
| 325 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xfc, | ||
| 326 | 0x7f, 0xff, 0xff, 0xf2, 0x1f, 0xff, 0xff, 0xce, 0x87, 0xff, 0xff, 0x3e, 0xe1, 0xff, 0xfc, 0xfe, | ||
| 327 | 0xf8, 0x7f, 0xf3, 0xfe, 0xfe, 0x1f, 0xcf, 0xfe, 0xff, 0xe7, 0x3f, 0xfe, 0xff, 0xf1, 0x7e, 0xfe, | ||
| 328 | 0xf7, 0xf9, 0x7f, 0xfe, 0xef, 0xf9, 0x7f, 0xde, 0xff, 0x79, 0x75, 0xee, 0xff, 0xb9, 0x77, 0xee, | ||
| 329 | 0xde, 0xb9, 0x7f, 0xee, 0xfe, 0xf9, 0x7f, 0xfe, 0xef, 0xf9, 0x7f, 0xde, 0xff, 0xf9, 0x77, 0xfe, | ||
| 330 | 0xff, 0xf9, 0x77, 0xfc, 0x7d, 0xf9, 0x7d, 0xf3, 0x1f, 0xf9, 0x7f, 0xcf, 0x87, 0xf9, 0x7f, 0x3f, | ||
| 331 | 0xe1, 0xf9, 0x7c, 0xf7, 0xf8, 0x79, 0x73, 0xef, 0xfe, 0x19, 0x4f, 0xfb, 0xdf, 0x81, 0x3f, 0xfe, | ||
| 332 | 0xff, 0xe1, 0xcf, 0xea, 0xdf, 0x87, 0xf3, 0xeb, 0x8e, 0x1f, 0xfc, 0xf7, 0xb8, 0x7f, 0xff, 0x3b, | ||
| 333 | 0xe1, 0xff, 0xff, 0xcf, 0x87, 0xff, 0xff, 0xf3, 0x1f, 0xff, 0xff, 0xfc, 0x7f, 0xff | ||
| 334 | }; | ||
| 335 | |||
| 336 | |||
| 337 | |||
| 338 |
2/7✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | GATEXX_TEST_UNIT(BitmapImagesLoader) |
| 339 | { | ||
| 340 | { // 1-bit image | ||
| 341 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | LocalMemStream stream(&icon2[0], sizeof(icon2)); |
| 342 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage loadedImage; |
| 343 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(BitmapImages::load(loadedImage, stream)); |
| 344 | } | ||
| 345 | |||
| 346 | { // 4-bit image | ||
| 347 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | LocalMemStream stream(&icon16[0], sizeof(icon16)); |
| 348 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage loadedImage; |
| 349 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(BitmapImages::load(loadedImage, stream)); |
| 350 | } | ||
| 351 | |||
| 352 | { // 8-bit image | ||
| 353 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | LocalMemStream stream(&icon256[0], sizeof(icon256)); |
| 354 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage loadedImage; |
| 355 |
4/14✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 1 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 1 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
2 | GATEXX_TEST_CHECK_NOTHROW(BitmapImages::load(loadedImage, stream)); |
| 356 | } | ||
| 357 | 2 | } | |
| 358 | |||
| 359 | static const RasterImage::PixelFormat imageTypes[] = { | ||
| 360 | RasterImage::PixelFormat_rgba, | ||
| 361 | RasterImage::PixelFormat_rgb32, | ||
| 362 | RasterImage::PixelFormat_bgra, | ||
| 363 | RasterImage::PixelFormat_bgr32, | ||
| 364 | |||
| 365 | RasterImage::PixelFormat_rgb24, | ||
| 366 | RasterImage::PixelFormat_bgr24, | ||
| 367 | |||
| 368 | RasterImage::PixelFormat_rgb555, | ||
| 369 | RasterImage::PixelFormat_rgb565, | ||
| 370 | RasterImage::PixelFormat_argb4, | ||
| 371 | RasterImage::PixelFormat_yuv2, | ||
| 372 | |||
| 373 | RasterImage::PixelFormat_pal8, | ||
| 374 | RasterImage::PixelFormat_gray8 | ||
| 375 | }; | ||
| 376 | static const size_t imageTypesCount = sizeof(imageTypes) / sizeof(imageTypes[0]); | ||
| 377 | |||
| 378 | 24 | static void validateImage(RasterImage::PixelFormat const& format, unsigned dim, RasterImage const& src, RasterImage const& dst) | |
| 379 | { | ||
| 380 |
2/2✓ Branch 0 taken 12 times.
✓ Branch 1 taken 12 times.
|
24 | switch(format) |
| 381 | { | ||
| 382 | 12 | case RasterImage::PixelFormat_rgba: | |
| 383 | case RasterImage::PixelFormat_rgb32: | ||
| 384 | case RasterImage::PixelFormat_bgra: | ||
| 385 | case RasterImage::PixelFormat_bgr32: | ||
| 386 | case RasterImage::PixelFormat_rgb24: | ||
| 387 | case RasterImage::PixelFormat_bgr24: | ||
| 388 | { | ||
| 389 |
2/2✓ Branch 0 taken 768 times.
✓ Branch 1 taken 12 times.
|
780 | for (unsigned y = 0; y != dim; ++y) |
| 390 | { | ||
| 391 |
2/2✓ Branch 0 taken 49152 times.
✓ Branch 1 taken 768 times.
|
49920 | for (unsigned x = 0; x != dim; ++x) |
| 392 | { | ||
| 393 |
1/2✓ Branch 1 taken 49152 times.
✗ Branch 2 not taken.
|
49152 | const Color srcPixel = src.getPixel(x, y); |
| 394 |
1/2✓ Branch 1 taken 49152 times.
✗ Branch 2 not taken.
|
49152 | const Color dstPixel = dst.getPixel(x, y); |
| 395 |
5/14✓ Branch 1 taken 49152 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 49152 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 49152 times.
✗ Branch 8 not taken.
✓ Branch 9 taken 49152 times.
✗ Branch 10 not taken.
✓ Branch 12 taken 49152 times.
✗ Branch 13 not taken.
✗ Branch 15 not taken.
✗ Branch 16 not taken.
✗ Branch 18 not taken.
✗ Branch 19 not taken.
|
49152 | GATEXX_TEST_CHECK_EQUAL(srcPixel, dstPixel); |
| 396 | } | ||
| 397 | } | ||
| 398 | 12 | break; | |
| 399 | } | ||
| 400 | } | ||
| 401 | 24 | } | |
| 402 | |||
| 403 |
2/7✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | GATEXX_TEST_UNIT(PngImages) |
| 404 | { | ||
| 405 | 2 | const unsigned dim = 64; | |
| 406 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage defaultImage(dim, dim, RasterImage::PixelFormat_rgb32); |
| 407 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | paintImage(defaultImage); |
| 408 | |||
| 409 |
2/2✓ Branch 0 taken 12 times.
✓ Branch 1 taken 1 times.
|
26 | for (unsigned n = 0; n != imageTypesCount; ++n) |
| 410 | { | ||
| 411 | 24 | const RasterImage::PixelFormat format = imageTypes[n]; | |
| 412 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | RasterImage image(dim, dim, format); |
| 413 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
24 | paintImage(image); |
| 414 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | MemStream stream; |
| 415 |
4/14✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
24 | GATEXX_TEST_CHECK_NOTHROW(PngImages::save(image, stream, PngImages::Flag_Palette)); |
| 416 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | RasterImage loaded; |
| 417 |
4/14✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
24 | GATEXX_TEST_CHECK_NOTHROW(PngImages::load(loaded, stream)); |
| 418 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
24 | validateImage(format, dim, loaded, defaultImage); |
| 419 | } | ||
| 420 | 2 | } | |
| 421 | |||
| 422 |
2/7✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | GATEXX_TEST_UNIT(JpegImages) |
| 423 | { | ||
| 424 | 2 | const unsigned dim = 64; | |
| 425 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage defaultImage(dim, dim, RasterImage::PixelFormat_rgb32); |
| 426 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | paintImage(defaultImage); |
| 427 | |||
| 428 |
2/2✓ Branch 0 taken 12 times.
✓ Branch 1 taken 1 times.
|
26 | for (unsigned n = 0; n != imageTypesCount; ++n) |
| 429 | { | ||
| 430 | 24 | const RasterImage::PixelFormat format = imageTypes[n]; | |
| 431 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | RasterImage image(dim, dim, format); |
| 432 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
24 | paintImage(image); |
| 433 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | MemStream stream; |
| 434 |
4/14✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
24 | GATEXX_TEST_CHECK_NOTHROW(JpegImages::save(image, stream)); |
| 435 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | RasterImage loaded; |
| 436 |
4/14✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
24 | GATEXX_TEST_CHECK_NOTHROW(JpegImages::load(loaded, stream)); |
| 437 | } | ||
| 438 | 2 | } | |
| 439 | |||
| 440 |
2/7✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | GATEXX_TEST_UNIT(GifImages) |
| 441 | { | ||
| 442 | 2 | const unsigned dim = 64; | |
| 443 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage defaultImage(dim, dim, RasterImage::PixelFormat_rgb32); |
| 444 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | paintImage(defaultImage); |
| 445 | |||
| 446 |
2/2✓ Branch 0 taken 12 times.
✓ Branch 1 taken 1 times.
|
26 | for (unsigned n = 0; n != imageTypesCount; ++n) |
| 447 | { | ||
| 448 | 24 | const RasterImage::PixelFormat format = imageTypes[n]; | |
| 449 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | RasterImage image(dim, dim, format); |
| 450 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
24 | paintImage(image); |
| 451 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | MemStream stream; |
| 452 |
4/14✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
24 | GATEXX_TEST_CHECK_NOTHROW(GifImages::save(image, stream)); |
| 453 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | RasterImage loaded; |
| 454 |
4/14✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
24 | GATEXX_TEST_CHECK_NOTHROW(GifImages::load(loaded, stream)); |
| 455 | //validateImage(format, dim, loaded, defaultImage); | ||
| 456 | } | ||
| 457 | 2 | } | |
| 458 | |||
| 459 |
2/7✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | GATEXX_TEST_UNIT(BitmapImages) |
| 460 | { | ||
| 461 | 2 | const unsigned dim = 64; | |
| 462 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage defaultImage(dim, dim, RasterImage::PixelFormat_rgb32); |
| 463 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | paintImage(defaultImage); |
| 464 | |||
| 465 |
2/2✓ Branch 0 taken 12 times.
✓ Branch 1 taken 1 times.
|
26 | for (unsigned n = 0; n != imageTypesCount; ++n) |
| 466 | { | ||
| 467 | 24 | const RasterImage::PixelFormat format = imageTypes[n]; | |
| 468 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | RasterImage image(dim, dim, format); |
| 469 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
24 | paintImage(image); |
| 470 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | MemStream stream; |
| 471 |
4/14✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
24 | GATEXX_TEST_CHECK_NOTHROW(BitmapImages::save(image, stream)); |
| 472 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
48 | RasterImage loaded; |
| 473 |
4/14✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 12 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 12 times.
✗ Branch 11 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
✗ Branch 17 not taken.
✗ Branch 18 not taken.
✗ Branch 20 not taken.
✗ Branch 21 not taken.
|
24 | GATEXX_TEST_CHECK_NOTHROW(BitmapImages::load(loaded, stream)); |
| 474 |
1/2✓ Branch 1 taken 12 times.
✗ Branch 2 not taken.
|
24 | validateImage(format, dim, loaded, defaultImage); |
| 475 | } | ||
| 476 | 2 | } | |
| 477 | |||
| 478 |
2/7✓ Branch 2 taken 1 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✗ Branch 11 not taken.
✗ Branch 12 not taken.
✗ Branch 14 not taken.
✗ Branch 15 not taken.
|
6 | GATEXX_TEST_UNIT(Drawer) |
| 479 | { | ||
| 480 | 2 | unsigned dim = 128; | |
| 481 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage image(dim, dim); |
| 482 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | image.clear(Color::Blue); |
| 483 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | Drawer d(image); |
| 484 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | d.line(0, 0, dim - 1, dim - 1, Color::Yellow); |
| 485 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | d.rectangle(0, 0, dim - 1, dim - 1, Color::Green); |
| 486 | |||
| 487 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage imageSmall(dim / 3, dim / 3); |
| 488 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | imageSmall.clear(Color::Red); |
| 489 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | d.scaledImage(imageSmall); |
| 490 | |||
| 491 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
4 | RasterImage imageLarge(dim * 3, dim * 3); |
| 492 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | imageLarge.clear(Color::Blue); |
| 493 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
2 | d.scaledImage(imageLarge); |
| 494 | 2 | } | |
| 495 |