explicit std namespace
This commit is contained in:
parent
efb704185f
commit
e14da13d02
3 changed files with 12 additions and 12 deletions
18
src/Atlas.h
18
src/Atlas.h
|
@ -27,7 +27,7 @@ struct AtlasSettings {
|
||||||
float pixelRange = 2.0;
|
float pixelRange = 2.0;
|
||||||
float miterLimit = 1.0;
|
float miterLimit = 1.0;
|
||||||
float maxInterpolationStepSize = 42.0;
|
float maxInterpolationStepSize = 42.0;
|
||||||
string characters = "charset::ascii";
|
std::string characters = "charset::ascii";
|
||||||
#ifdef TARGET_EMSCRIPTEN
|
#ifdef TARGET_EMSCRIPTEN
|
||||||
int threadCount = 1;
|
int threadCount = 1;
|
||||||
#else
|
#else
|
||||||
|
@ -35,7 +35,7 @@ struct AtlasSettings {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
struct FontVariation {
|
struct FontVariation {
|
||||||
string name;
|
std::string name;
|
||||||
float value;
|
float value;
|
||||||
bool operator==(const FontVariation & other) const {
|
bool operator==(const FontVariation & other) const {
|
||||||
return (name == other.name
|
return (name == other.name
|
||||||
|
@ -43,7 +43,7 @@ struct FontVariation {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
struct FontVariationAxis {
|
struct FontVariationAxis {
|
||||||
string name;
|
std::string name;
|
||||||
float minValue;
|
float minValue;
|
||||||
float maxValue;
|
float maxValue;
|
||||||
float defaultValue;
|
float defaultValue;
|
||||||
|
@ -84,8 +84,8 @@ class Atlas {
|
||||||
public:
|
public:
|
||||||
Atlas();
|
Atlas();
|
||||||
~Atlas();
|
~Atlas();
|
||||||
void setup(string _fontPath);
|
void setup(std::string _fontPath);
|
||||||
void setup(string _fontPath, AtlasSettings _settings);
|
void setup(std::string _fontPath, AtlasSettings _settings);
|
||||||
void addVariations(vector <FontVariation> variations);
|
void addVariations(vector <FontVariation> variations);
|
||||||
bool generate(bool useCache = true,
|
bool generate(bool useCache = true,
|
||||||
bool saveToCache = false);
|
bool saveToCache = false);
|
||||||
|
@ -106,13 +106,13 @@ class Atlas {
|
||||||
AtlasSettings settings;
|
AtlasSettings settings;
|
||||||
msdfgen::FontHandle * font;
|
msdfgen::FontHandle * font;
|
||||||
msdfgen::FreetypeHandle * ft;
|
msdfgen::FreetypeHandle * ft;
|
||||||
string getAtlasPathDir();
|
std::string getAtlasPathDir();
|
||||||
string getAtlasPath();
|
std::string getAtlasPath();
|
||||||
private:
|
private:
|
||||||
string fontPath;
|
std::string fontPath;
|
||||||
ofImage atlasImage;
|
ofImage atlasImage;
|
||||||
vector <GlyphGeometry> glyphGeometries;
|
vector <GlyphGeometry> glyphGeometries;
|
||||||
unordered_map <GlyphVariationKey, int> glyphGeometryMap;
|
std::unordered_map <GlyphVariationKey, int> glyphGeometryMap;
|
||||||
vector <FontVariationAxis> variationAxesAvailable;
|
vector <FontVariationAxis> variationAxesAvailable;
|
||||||
vector <FontVariation> variationExtremes;
|
vector <FontVariation> variationExtremes;
|
||||||
vector <FontVariation> variationSteps;
|
vector <FontVariation> variationSteps;
|
||||||
|
|
|
@ -30,11 +30,11 @@ void ofxMsdfgen::toOfImage(const msdfgen::Bitmap <float, 3> bitmap,
|
||||||
image.update();
|
image.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ofxMsdfgen::toOfImage(const msdfgen::Bitmap <byte, 3> bitmap,
|
void ofxMsdfgen::toOfImage(const msdfgen::Bitmap <std::byte, 3> bitmap,
|
||||||
ofImage & image){
|
ofImage & image){
|
||||||
image.allocate(bitmap.width(), bitmap.height(), OF_IMAGE_COLOR);
|
image.allocate(bitmap.width(), bitmap.height(), OF_IMAGE_COLOR);
|
||||||
image.getTexture().getTextureData().bFlipTexture = true;
|
image.getTexture().getTextureData().bFlipTexture = true;
|
||||||
memcpy(image.getPixels().getData(), static_cast <const byte *>(bitmap), bitmap.width() * bitmap.height() * 3 * sizeof(byte));
|
memcpy(image.getPixels().getData(), static_cast <const std::byte *>(bitmap), bitmap.width() * bitmap.height() * 3 * sizeof(std::byte));
|
||||||
|
|
||||||
image.update();
|
image.update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ void toOfImage(const msdfgen::Bitmap <float, 3> bitmap,
|
||||||
ofFloatImage & image);
|
ofFloatImage & image);
|
||||||
void toOfImage(const msdfgen::Bitmap <float, 3> bitmap,
|
void toOfImage(const msdfgen::Bitmap <float, 3> bitmap,
|
||||||
ofImage & image);
|
ofImage & image);
|
||||||
void toOfImage(const msdfgen::Bitmap <byte, 3> bitmap,
|
void toOfImage(const msdfgen::Bitmap <std::byte, 3> bitmap,
|
||||||
ofImage & image);
|
ofImage & image);
|
||||||
ofImage toOfImage(const msdfgen::Bitmap <float, 3>);
|
ofImage toOfImage(const msdfgen::Bitmap <float, 3>);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue