ofxVariableLab/src/LayerComposition.h

34 lines
1.2 KiB
C++

#pragma once
#include "ofMain.h"
#include "AtlasLayerCombo.h"
#include "MsdfAtlasLayerCombo.h"
#include "MsdfLayer.h"
#include "GPUFontAtlasLayerCombo.h"
#include "GPUFontLayer.h"
namespace ofxVariableLab {
class LayerComposition {
public:
void setup();
void update();
void draw() const;
LayerID addLayer(const ComboIdentifier & identifier,
const string & text,
const std::vector <FontVariation> & variations);
LayerID addLayer(const ComboIdentifier & identifier,
const Layer::Props & props,
const std::vector <FontVariation> & variations);
shared_ptr <ofxVariableLab::Layer> getLayer(const LayerID & layerID);
const unordered_map <ComboIdentifier, shared_ptr <AtlasLayerCombo> > & getAtlasLayerCombos() const;
void setVFlip(bool vFlip);
private:
VFlipState vFlipState = V_FLIP_UNKNOWN;
unordered_map <LayerID, shared_ptr <ofxVariableLab::Layer> > layers;
unordered_map <ComboIdentifier, shared_ptr <AtlasLayerCombo> > atlasLayerCombos;
//unordered_map <LayerIdentifier, shared_ptr <ofxVariableLab::Layer> > layers;
};
}