Gosu
GraphicsBase.hpp
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include <Gosu/Platform.hpp>
7 #include <array>
8 
9 namespace Gosu
10 {
14  typedef double ZPos;
15 
18  enum AlphaMode
19  {
30  };
31 
32  enum FontFlags
33  {
34  FF_BOLD = 1,
35  FF_ITALIC = 2,
38  };
39 
40  enum Alignment
41  {
46  };
47 
50  {
51  IF_SMOOTH = 0,
52 
53  // Note: No constant for '1', but Gosu treats '1' as if_tileable for
54  // backward compatibility reasons (this parameter used to be a bool).
55 
56  IF_TILEABLE_LEFT = 1 << 1,
57  IF_TILEABLE_TOP = 1 << 2,
61 
64  IF_RETRO = 1 << 5
65  };
66 
67  typedef std::array<double, 16> Transform;
68  Transform translate(double x, double y);
69  Transform rotate(double angle, double around_x = 0, double around_y = 0);
70  Transform scale(double factor);
71  Transform scale(double scale_x, double scale_y, double from_x = 0, double from_y = 0);
72  Transform concat(const Transform& lhs, const Transform& rhs);
73 }
ImageFlags
Flags that affect the tileability or interpolation of an image.
Definition: Audio.hpp:12
Transform scale(double factor)
Apply nearest-neighbor interpolation when scaling this image up or down.
std::array< double, 16 > Transform
Transform concat(const Transform &lhs, const Transform &rhs)
double ZPos
Represents the Z position of something drawn with Gosu&#39;s graphics system.
Transform rotate(double angle, double around_x=0, double around_y=0)
double angle(double from_x, double from_y, double to_x, double to_y, double def=0)
Returns the angle from point 1 to point 2 in degrees, where 0.0 means upwards.
The color&#39;s channels will be interpolated.
Transform translate(double x, double y)
Macros and utility functions to facilitate programming on all of Gosu&#39;s supported platforms...
AlphaMode
Determines the way colors are combined when one is drawn onto another.
The color&#39;s channels will be multiplied with each other.
The colors&#39; channels will be added.