29void setColor(
unsigned char red,
unsigned char green,
unsigned char blue);
31void setColor(
unsigned char red,
unsigned char green,
unsigned char blue,
unsigned char alpha);
37[[deprecated(
"Use setAlpha instead")]]
41[[deprecated(
"Use setAlpha instead")]]
45[[deprecated(
"Pass line width to drawLine instead")]]
51[[deprecated(
"Use drawLine(Vec2, Vec2, float lineWidth) instead")]]
60[[deprecated(
"Use drawLine(Vec2, Vec2, float lineWidth) instead")]]
62void drawLine(
double xstart,
double ystart,
double xend,
double yend);
66[[deprecated(
"Use drawLine(Mat3, Vec2, Vec2, float lineWidth) instead")]]
77[[deprecated(
"Use drawLine(const Mat3&, Vec2, float lineWidth, Rgba) instead")]]
82[[deprecated(
"Use drawLine(const Mat3&, Vec2, float lineWidth, Rgba) instead")]]
88[[deprecated(
"Use drawEllipse(Mat3, float, float, float) instead")]]
90void drawEllipse(
float xmid,
float ymid,
float width,
float height,
float startAngle = 0);
131[[deprecated(
"Use drawCircle instead")]]
138[[deprecated(
"Use drawTriangle(Vec2, Vec2, Vec2) instead")]]
140void drawTriangle(
double A_x,
double A_y,
double B_x,
double B_y,
double C_x,
double C_y);
149[[deprecated(
"Use drawRect(const Mat3&, Vec2, Color) instead")]]
150void drawRect(
double xposition,
double yposition,
double width,
double height);
194template <
class Vect>
void drawRect(Vect pos, Vect size) {
195 drawRect(pos.x, pos.y, size.x, size.y);
Contains jngl::Rgba class.
Contains jngl::Vec2 class.
Object representing a RGB color, new version of jngl::Color (which will be deprecated in the future)
Object representing a RGBA color.
void drawRectOutline(Mat3 modelview, Vec2 size, float lineWidth, Rgba color)
Draws the outline of a rectangle (so □ instead of ■) of size centered at (0, 0) in color.
void drawSquare(const Mat3 &modelview, Rgba color)
Draws a (filled) square of size 1x1 centered at (0, 0) with the specified color.
void drawTriangle(Vec2 a, Vec2 b, Vec2 c)
Draws the triangle a -> b -> c.
void setAlpha(uint8_t alpha)
Sets the alpha value which should be used to draw primitives (0 = fully transparent,...
void pushAlpha(unsigned char alpha)
void drawSquareOutline(Mat3 modelview, float lineWidth, Rgba color)
Draws the outline of a square (so □ instead of ■) of size 1x1 centered at (0, 0) with the specified c...
void setColor(Rgb)
Sets the color which should be used to draw primitives.
void drawEllipse(float xmid, float ymid, float width, float height, float startAngle=0)
void drawPoint(double x, double y)
void setLineWidth(float width)
jngl::Mat3 modelview()
Returns a copy of the global ModelView matrix.
void drawCircle(Vec2, float radius, float startAngle=0)
Angles in radian.
void drawLine(Vec2 start, Vec2 end)
Draws a line from start to end, the width can be set using setLineWidth.
void drawRect(double xposition, double yposition, double width, double height)
Draws a rectangle at { xposition, yposition }.