reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofBitmapFont.h
Go to the documentation of this file.
1#pragma once
2
3#include "ofRectangle.h"
4#include "ofPixels.h"
5#include "ofTexture.h"
6#include "ofGraphics.h"
7#include "ofConstants.h"
8
9
10/*
11
12 note, the data in this code is taken from freeglut, and included in OF for compatability
13 with non glut windowing toolkits. see .cpp for license info
14
15 also, note that while this is used internally in ofGraphics, it's not really useful for end user usage.
16
17 */
18
20public:
23 ofMesh getMesh(const std::string & text, int x, int y, ofDrawBitmapMode mode=OF_BITMAPMODE_MODEL_BILLBOARD, bool vFlipped=true) const;
24 const ofTexture & getTexture() const;
25 ofRectangle getBoundingBox(const std::string & text, int x, int y, ofDrawBitmapMode mode = ofGetStyle().drawBitmapMode, bool vFlipped = ofIsVFlipped()) const;
26private:
27 static void init();
28 static ofPixels pixels;
29 void unloadTexture();
30 mutable ofTexture texture;
31};
Definition ofBitmapFont.h:19
ofBitmapFont()
Definition ofBitmapFont.cpp:455
const ofTexture & getTexture() const
Definition ofBitmapFont.cpp:471
ofMesh getMesh(const std::string &text, int x, int y, ofDrawBitmapMode mode=OF_BITMAPMODE_MODEL_BILLBOARD, bool vFlipped=true) const
Definition ofBitmapFont.cpp:397
~ofBitmapFont()
Definition ofBitmapFont.cpp:461
ofRectangle getBoundingBox(const std::string &text, int x, int y, ofDrawBitmapMode mode=ofGetStyle().drawBitmapMode, bool vFlipped=ofIsVFlipped()) const
Definition ofBitmapFont.cpp:481
A class representing a 2D rectangle.
Definition ofRectangle.h:87
A wrapper class for an OpenGL texture.
Definition ofTexture.h:253
bool ofIsVFlipped()
Get if view is flipped vertically.
Definition ofGraphics.cpp:86
ofStyle ofGetStyle()
Definition ofGraphics.cpp:640
ofDrawBitmapMode
Sets the bitmap drawing mode for text.
Definition ofGraphicsConstants.h:125
@ OF_BITMAPMODE_MODEL_BILLBOARD
Definition ofGraphicsConstants.h:130