| 45 | |
| 46 | public: |
| 47 | NanoImageExample(Application& app) |
| 48 | : NanoStandaloneWindow(app), |
| 49 | imgTop1st(1), |
| 50 | imgTop2nd(2), |
| 51 | imgTop3rd(3), |
| 52 | img1x(0), |
| 53 | img2x(kImg2max), |
| 54 | img3y(kImg3max), |
| 55 | img1rev(false), |
| 56 | img2rev(true), |
| 57 | img3rev(true), |
| 58 | img1(createImageFromRawMemory(CatPics::cat1Width, CatPics::cat1Height, (uchar*)CatPics::cat1Data, 0, kImageFormatBGR)), |
| 59 | img2(createImageFromRawMemory(CatPics::cat2Width, CatPics::cat2Height, (uchar*)CatPics::cat2Data, 0, kImageFormatBGR)), |
| 60 | img3(createImageFromRawMemory(CatPics::cat3Width, CatPics::cat3Height, (uchar*)CatPics::cat3Data, 0, kImageFormatBGR)) |
| 61 | { |
| 62 | DISTRHO_SAFE_ASSERT(img1.isValid()); |
| 63 | DISTRHO_SAFE_ASSERT(img2.isValid()); |
| 64 | DISTRHO_SAFE_ASSERT(img3.isValid()); |
| 65 | |
| 66 | DISTRHO_SAFE_ASSERT_UINT2(img1.getSize().getWidth() == CatPics::cat1Width, |
| 67 | img1.getSize().getWidth(), CatPics::cat1Width); |
| 68 | |
| 69 | DISTRHO_SAFE_ASSERT_UINT2(img1.getSize().getHeight() == CatPics::cat1Height, |
| 70 | img1.getSize().getHeight(), CatPics::cat1Height); |
| 71 | |
| 72 | DISTRHO_SAFE_ASSERT_UINT2(img2.getSize().getWidth() == CatPics::cat2Width, |
| 73 | img2.getSize().getWidth(), CatPics::cat2Width); |
| 74 | |
| 75 | DISTRHO_SAFE_ASSERT_UINT2(img2.getSize().getHeight() == CatPics::cat2Height, |
| 76 | img2.getSize().getHeight(), CatPics::cat2Height); |
| 77 | |
| 78 | DISTRHO_SAFE_ASSERT_UINT2(img3.getSize().getWidth() == CatPics::cat3Width, |
| 79 | img3.getSize().getWidth(), CatPics::cat3Width); |
| 80 | |
| 81 | DISTRHO_SAFE_ASSERT_UINT2(img3.getSize().getHeight() == CatPics::cat3Height, |
| 82 | img3.getSize().getHeight(), CatPics::cat3Height); |
| 83 | |
| 84 | setResizable(true); |
| 85 | setSize(500, 500); |
| 86 | setGeometryConstraints(500, 500, false, true); |
| 87 | setTitle("NanoImage"); |
| 88 | done(); |
| 89 | |
| 90 | addIdleCallback(this); |
| 91 | } |
| 92 | |
| 93 | protected: |
| 94 | void onNanoDisplay() override |
nothing calls this directly
no test coverage detected