2023-03-25 18:59:58 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ofMain.h"
|
2023-04-12 10:58:53 +02:00
|
|
|
#include "AtlasLayerCombo.h"
|
|
|
|
#include "MsdfAtlasLayerCombo.h"
|
2023-04-06 11:17:22 +02:00
|
|
|
#include "MsdfLayer.h"
|
2023-04-12 10:58:53 +02:00
|
|
|
#include "GPUFontAtlasLayerCombo.h"
|
2023-04-12 09:28:47 +02:00
|
|
|
#include "GPUFontLayer.h"
|
2023-03-25 18:59:58 +01:00
|
|
|
|
|
|
|
namespace ofxVariableLab {
|
|
|
|
|
|
|
|
class LayerComposition {
|
|
|
|
public:
|
|
|
|
void setup();
|
|
|
|
void update();
|
|
|
|
void draw() const;
|
2023-04-07 16:17:07 +02:00
|
|
|
LayerID addLayer(const ComboIdentifier & identifier,
|
|
|
|
const string & text,
|
|
|
|
const std::vector <FontVariation> & variations);
|
2023-04-11 12:23:14 +02:00
|
|
|
LayerID addLayer(const ComboIdentifier & identifier,
|
|
|
|
const Layer::Props & props,
|
|
|
|
const std::vector <FontVariation> & variations);
|
2023-04-07 16:17:07 +02:00
|
|
|
shared_ptr <ofxVariableLab::Layer> getLayer(const LayerID & layerID);
|
2023-04-11 12:23:14 +02:00
|
|
|
const unordered_map <ComboIdentifier, shared_ptr <AtlasLayerCombo> > & getAtlasLayerCombos() const;
|
2023-04-11 13:17:30 +02:00
|
|
|
void setVFlip(bool vFlip);
|
2023-03-25 18:59:58 +01:00
|
|
|
|
|
|
|
private:
|
2023-04-11 13:17:30 +02:00
|
|
|
VFlipState vFlipState = V_FLIP_UNKNOWN;
|
2023-04-07 16:17:07 +02:00
|
|
|
unordered_map <LayerID, shared_ptr <ofxVariableLab::Layer> > layers;
|
2023-04-06 11:17:22 +02:00
|
|
|
unordered_map <ComboIdentifier, shared_ptr <AtlasLayerCombo> > atlasLayerCombos;
|
|
|
|
//unordered_map <LayerIdentifier, shared_ptr <ofxVariableLab::Layer> > layers;
|
2023-03-25 18:59:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|