23 std::tr1::shared_ptr<Impl> pimpl;
33 unsigned fontHeight,
unsigned fontFlags =
ffBold);
36 std::wstring
name()
const;
42 unsigned flags()
const;
45 double textWidth(
const std::wstring& text,
double factorX = 1)
const;
49 void draw(
const std::wstring& text,
double x,
double y,
ZPos z,
50 double factorX = 1,
double factorY = 1,
59 void drawRel(
const std::wstring& text,
double x,
double y,
ZPos z,
60 double relX,
double relY,
double factorX = 1,
double factorY = 1,
75 void drawRot(
const std::wstring& text,
double x,
double y,
ZPos z,
double angle,
78 double factorX = 1,
double factorY = 1,
Includes all parts of C++03 (TR1) that are relevant for Gosu.
void setImage(wchar_t wc, unsigned fontFlags, const Gosu::Image &image)
Maps a letter to a specific image instead of generating one using Gosu's built-in text rendering...
Contains declarations of all of Gosu's available classes.
Represents an RGBA color value with 8 bits for each channel.
double textWidth(const std::wstring &text, double factorX=1) const
Returns the width, in pixels, the given text would occupy if drawn.
unsigned flags() const
Returns the flags used to create the font characters.
GOSU_DEPRECATED void drawRot(const std::wstring &text, double x, double y, ZPos z, double angle, double factorX=1, double factorY=1, Color c=Color::WHITE, AlphaMode mode=amDefault) const
DEPRECATED: Analogous to draw, but rotates the text by a given angle.
double ZPos
Represents the Z position of something drawn with Gosu's graphics system.
A font can be used to draw text on a Graphics object very flexibly.
The color's channels will be interpolated.
void draw(const std::wstring &text, double x, double y, ZPos z, double factorX=1, double factorY=1, Color c=Color::WHITE, AlphaMode mode=amDefault) const
Draws text so the top left corner of the text is at (x; y).
Font(Graphics &graphics, const std::wstring &fontName, unsigned fontHeight, unsigned fontFlags=ffBold)
Constructs a font that can be drawn onto the graphics object.
Serves as the target of all drawing and provides primitive drawing functionality. ...
std::wstring name() const
Returns the name of the font that was used to create it.
AlphaMode
Determines the way colors are combined when one is drawn onto another.
Interface of the Color class.
Provides functionality for drawing rectangular images.
void drawRel(const std::wstring &text, double x, double y, ZPos z, double relX, double relY, double factorX=1, double factorY=1, Color c=Color::WHITE, AlphaMode mode=amDefault) const
Draws text at a position relative to (x; y).
double angle(double fromX, double fromY, double toX, double toY, double def=0)
Returns the angle from point 1 to point 2 in degrees, where 0.0 means upwards.
unsigned height() const
Returns the height of the font, in pixels.
Contains general typedefs and enums related to graphics.