288 void set_fill_color(
double red,
double green,
double blue,
double alpha = 255) noexcept;
498 void draw_ellipse(
double x,
double y,
double width,
double height = 0) noexcept;
538 void draw_line(
double x1,
double y1,
double x2,
double y2) noexcept;
576 void draw_quad(
double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double x4,
double y4) noexcept;
614 void draw_rectangle(
double x,
double y,
double width,
double height = 0) noexcept;
655 void draw_triangle(
double x1,
double y1,
double x2,
double y2,
double x3,
double y3) noexcept;
1151 void draw_text(const std::wstring& str,
double x,
double y) noexcept;
1195 void draw_text(const std::
string& str,
double x,
double y) noexcept;
1645 void draw_image(const
Image& image,
double x,
double y,
double width,
double height) noexcept;
1711 void draw_image(const
Image& image,
double x,
double y,
double width,
double height,
int texel_x,
1712 int texel_y) noexcept;
1780 void draw_image(const
Image& image,
double x,
double y,
double width,
double height,
int texel_x,
int texel_y,
1781 int texel_width,
int texel_height) noexcept;
1937 void set_tint_color(
double red,
double green,
double blue,
double alpha = 255) noexcept;
2231 void apply_matrix(
double a,
double b,
double c,
double d,
double e,
double f) noexcept;
This is a helper class to easily represent an RGBA color as an int with hexadecimal notation.
Image class to store a 2D array of RGBA colors. Also manages an image on the Graphics Card.
void set_fill_color(HexColor color) noexcept
Sets the color used to fill shapes to the specified HexColor.
void no_outline()
Disables drawing the outline.
void set_outline_color(HexColor color) noexcept
Set the outline and lines of shapes to the specified HexColor.
void no_fill() noexcept
Disables filling geometry.
void clear_background() noexcept
Clear the background to black.
Image end_drawing_to_image(bool smooth_texture=false)
End a session of drawing to an image.
void draw_image(const Image &image, double x, double y) noexcept
Draw an entire image to the screen.
void set_tint_color(HexColor color) noexcept
Sets the fill value for displaying images to the specified HexColor.
void begin_drawing_to_image(int image_width, int image_height, bool apply_antialiasing=true)
Redirect all draw command to draw to an image.
void set_image_mode(RectMode mode) noexcept
Modifies the location from which textures are drawn by changing the way in which parameters given to ...
Image capture_screenshot_to_image()
Captures a screenshot of the whole screen.
void no_tint() noexcept
Removes the current fill value for displaying images and reverts to displaying textures with their or...
void smooth_drawing() noexcept
Draws all geometry with smooth (anti-aliased) edges.
EllipseMode
With set_ellipse_mode(), modifies the location from which ellipses are drawn by changing the way in w...
void set_ellipse_mode(EllipseMode mode) noexcept
Modifies the location from which ellipses are drawn by changing the way in which parameters given to ...
void draw_quad(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) noexcept
Draw a quad.
void draw_line(double x1, double y1, double x2, double y2) noexcept
Draws a line (a direct path between two points) to the screen.
void draw_triangle(double x1, double y1, double x2, double y2, double x3, double y3) noexcept
Draw a triangle to the screen.
void set_outline_width(double line_width) noexcept
Sets the width of the outline used for lines and the border around shapes. All widths are set in unit...
FrameOfReference
Used to define the coordinate system you would like to reference.
RectMode
With set_rectangle_mode(), modifies the location from which rectangles are drawn by changing the way ...
void set_rectangle_mode(RectMode mode) noexcept
Modifies the location from which rectangles are drawn by changing the way in which parameters given t...
void pop_settings() noexcept
The pop_settings() function restores to the previous style settings and transformations,...
void no_smoothing() noexcept
Draws all geometry with jagged (aliased) edges.
void draw_rectangle(double x, double y, double width, double height=0) noexcept
Draws a rectangle to the screen.
void draw_ellipse(double x, double y, double width, double height=0) noexcept
Draws an ellipse (oval) to the screen.
void set_frame_of_reference(FrameOfReference frame_of_reference) noexcept
Change the coordinate system you would like to use when describing your primitives.
void push_settings() noexcept
The push_settings() function saves the current drawing style settings and transformations,...
@ Corner
Interprets the first two parameters of draw_ellipse() as the upper-left or bottom-left corner of the ...
@ Center
Interprets the first two parameters of draw_ellipse() as the shape's center point.
@ LeftHanded_OriginTopLeft
The Origin (0,0) is always in the top left of the screen. Positive x goes to the right and Positive y...
@ RightHanded_OriginCenter
The Origin (0,0) is always in the center of the screen. Positive x goes to the right and Positive y g...
@ RightHanded_OriginBottomLeft
The Origin (0,0) is always in the bottom left of the screen. Positive x goes to the right and Positiv...
@ Corner
The default mode is RectMode::CORNER, which interprets the first two parameters of draw_rectangle() a...
@ Center
RectMode::CENTER interprets the first two parameters of draw_rectangle() as the shape's center point.
void set_font_backdrop_offset(double texel_x, double texel_y) noexcept
Repositions the backdrop of the font characters. Useful for creating a custom drop shadow effect.
int create_distance_field_bitmap_font(const std::filesystem::path &fnt_filepath) noexcept
Given a file path to a *.fnt file it will create a distance field bitmap font.
void set_font_fade_out_interval(double inside_distance, double outside_distance) noexcept
Defines the distance interval to draw font characters and how to fade them out from opaque to translu...
void draw_text(const std::wstring &str, double x, double y) noexcept
Draws wide character based text to the screen.
void set_font_backdrop_fade_out_interval(double inside_distance, double outside_distance) noexcept
Defines the distance interval to draw the backdrop of font characters and how to fade them out from o...
constexpr int DEFAULT_FONT_ID
Holds the ID value for the provided font that comes with doodle.
void set_font_size(double font_size) noexcept
Sets the current font size. This size will be used in all subsequent calls to the draw_text() functio...
void set_font(int font_id) noexcept
Changes the font type to be used when drawing text.
Color is a color represented with four unsigned bytes.