MCPcopy Create free account
hub / github.com/DISTRHO/DPF / setupImagePaint

Method setupImagePaint

tests/NanoImage.cpp:175–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173
174private:
175 Paint setupImagePaint(const int imgId) noexcept
176 {
177 switch (imgId)
178 {
179 case 1:
180 rect(img1x, kImg1y, CatPics::cat1Width, CatPics::cat1Height);
181 return imagePattern(img1x, kImg1y, CatPics::cat1Width, CatPics::cat1Height, 0, img1, 1.0f);
182 case 2:
183 rect(img2x, kImg2y, CatPics::cat2Width, CatPics::cat2Height);
184 return imagePattern(img2x, kImg2y, CatPics::cat2Width, CatPics::cat2Height, 0, img2, 1.0f);
185 case 3:
186 rect(kImg3x, img3y, CatPics::cat3Width, CatPics::cat3Height);
187 return imagePattern(kImg3x, img3y, CatPics::cat3Width, CatPics::cat3Height, 0, img3, 1.0f);
188 };
189
190 return Paint();
191 }
192
193 void setNewTopImg(const int imgId) noexcept
194 {

Callers

nothing calls this directly

Calls 1

PaintClass · 0.85

Tested by

no test coverage detected