diff options
author | falkTX <falktx@falktx.com> | 2022-12-06 13:19:37 +0000 |
---|---|---|
committer | falkTX <falktx@falktx.com> | 2022-12-06 13:19:37 +0000 |
commit | 2e8157e70e1ee415b6a7d7a725f9296cb3cc5ef6 (patch) | |
tree | 6e9018feacf05b313bb31a5b66c5da903f5dd43c /plugins/ZamCompX2/ZamCompX2UI.cpp | |
parent | 59c2cd79ca30a6c891b0c353551b3a795d18a8e6 (diff) |
Fix deprecated warnings
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat (limited to 'plugins/ZamCompX2/ZamCompX2UI.cpp')
-rw-r--r-- | plugins/ZamCompX2/ZamCompX2UI.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/ZamCompX2/ZamCompX2UI.cpp b/plugins/ZamCompX2/ZamCompX2UI.cpp index c5b6797..d0b5f14 100644 --- a/plugins/ZamCompX2/ZamCompX2UI.cpp +++ b/plugins/ZamCompX2/ZamCompX2UI.cpp @@ -30,7 +30,7 @@ ZamCompX2UI::ZamCompX2UI() setSize(ZamCompX2Artwork::zamcompx2Width, ZamCompX2Artwork::zamcompx2Height); // background - fImgBackground = Image(ZamCompX2Artwork::zamcompx2Data, ZamCompX2Artwork::zamcompx2Width, ZamCompX2Artwork::zamcompx2Height, GL_BGR); + fImgBackground = Image(ZamCompX2Artwork::zamcompx2Data, ZamCompX2Artwork::zamcompx2Width, ZamCompX2Artwork::zamcompx2Height, kImageFormatBGR); // led images fLedRedImg = Image(ZamCompX2Artwork::ledredData, ZamCompX2Artwork::ledredWidth, ZamCompX2Artwork::ledredHeight); @@ -249,7 +249,8 @@ void ZamCompX2UI::imageSwitchClicked(ImageSwitch* tog, bool down) void ZamCompX2UI::onDisplay() { - fImgBackground.draw(); + const GraphicsContext& context(getGraphicsContext()); + fImgBackground.draw(context); // draw leds static const float sLedSpacing = 15.5f; @@ -287,8 +288,8 @@ void ZamCompX2UI::onDisplay() numRedLeds = 1; else numRedLeds = 0; - for (int i=numRedLeds; i>0; --i) - fLedRedImg.drawAt(sLedInitialX + (12 - i)*sLedSpacing, sRedLedStaticY); + for (int i=numRedLeds; i>0; --i) + fLedRedImg.drawAt(context, sLedInitialX + (12 - i)*sLedSpacing, sRedLedStaticY); if (fLedYellowValue >= 20.f) numYellowLeds = 19; @@ -332,12 +333,12 @@ void ZamCompX2UI::onDisplay() if (numYellowLeds > 12) { for (int i=12; i<numYellowLeds; ++i) - fLedRedImg.drawAt(sLedInitialX + i*sLedSpacing, sYellowLedStaticY); + fLedRedImg.drawAt(context, sLedInitialX + i*sLedSpacing, sYellowLedStaticY); for (int i=0; i<12; ++i) - fLedYellowImg.drawAt(sLedInitialX + i*sLedSpacing, sYellowLedStaticY); + fLedYellowImg.drawAt(context, sLedInitialX + i*sLedSpacing, sYellowLedStaticY); } else { for (int i=0; i<numYellowLeds; ++i) - fLedYellowImg.drawAt(sLedInitialX + i*sLedSpacing, sYellowLedStaticY); + fLedYellowImg.drawAt(context, sLedInitialX + i*sLedSpacing, sYellowLedStaticY); } } |