peacock graphics

This commit is contained in:
Gordon JC Pearce 2024-12-31 21:52:21 +00:00
parent 3260430800
commit d512c6b4ff
6 changed files with 15654 additions and 12 deletions

View File

@ -16,7 +16,7 @@ FILES_DSP = \
voice.cpp voice.cpp
FILES_UI = \ FILES_UI = \
back.cpp \ peacock.cpp \
ui.cpp ui.cpp
UI_TYPE = generic UI_TYPE = generic

View File

@ -1,9 +1,11 @@
#pragma once #ifndef _BACK_HPP
#include <cstdint> #define _BACK_HPP
namespace Artwork { namespace Artwork {
extern const char *backgroundData; extern const char *backgroundData;
const uint32_t backgroundDataSize = 677980; const unsigned int backgroundDataSize = 677980;
const uint32_t backgroundWidth = 545; const unsigned int backgroundWidth = 545;
const uint32_t backgroundHeight = 311; const unsigned int backgroundHeight = 311;
} // namespace Artwork } // namespace Artwork
#endif

15620
plugin/peacock.cpp Normal file

File diff suppressed because it is too large Load Diff

15
plugin/peacock.hpp Normal file
View File

@ -0,0 +1,15 @@
#pragma once
namespace Artwork {
/*
extern const char *orangeData;
const uint32_t orangeDataSize = 38*17*3;
const uint32_t orangeWidth = 38;
const uint32_t orangeHeight = 17;
*/
extern const char *backgroundData;
const unsigned int backgroundDataSize = 700*400*3;
const unsigned int backgroundWidth = 700;
const unsigned int backgroundHeight = 400;
} // namespace Artwork

View File

@ -1,6 +1,6 @@
#include "ui.hpp" #include "ui.hpp"
#include "back.hpp" #include "chassis.hpp"
START_NAMESPACE_DISTRHO START_NAMESPACE_DISTRHO
@ -8,16 +8,16 @@ namespace Art = Artwork;
DistrhoUIchassis::DistrhoUIchassis() : UI(Art::backgroundWidth, Art::backgroundHeight, true), DistrhoUIchassis::DistrhoUIchassis() : UI(Art::backgroundWidth, Art::backgroundHeight, true),
// UI // UI
fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, kImageFormatRGBA) fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, kImageFormatRGB)
{ {
} }
void DistrhoUIchassis::programLoaded(uint32_t index) { void DistrhoUIchassis::programLoaded(uint32_t index) {
printf("in programLoaded %d\n", index); //printf("in programLoaded %d\n", index);
} }
void DistrhoUIchassis::parameterChanged(uint32_t index, float value) { void DistrhoUIchassis::parameterChanged(uint32_t index, float value) {
printf("in parameterchanged %d %f\n", index, value); //printf("in parameterchanged %d %f\n", index, value);
} }
void DistrhoUIchassis::onDisplay() { void DistrhoUIchassis::onDisplay() {

View File

@ -1,8 +1,11 @@
#pragma once #ifndef _UI_HPP
#define _UI_HPP
#include "DistrhoUI.hpp" #include "DistrhoUI.hpp"
#include "ImageWidgets.hpp" #include "ImageWidgets.hpp"
#include "peacock.hpp"
START_NAMESPACE_DISTRHO START_NAMESPACE_DISTRHO
class DistrhoUIchassis : public UI { class DistrhoUIchassis : public UI {
@ -21,3 +24,5 @@ class DistrhoUIchassis : public UI {
}; };
END_NAMESPACE_DISTRHO END_NAMESPACE_DISTRHO
#endif