ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
draw.h File Reference

Routines for drawing sprites and primitives to the screen. More...

#include "./geometry.h"
#include "./types.h"
Include dependency graph for draw.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  asw
 
namespace  asw::draw
 

Functions

void asw::draw::clearColor (asw::Color color)
 Clear the screen to a color.
 
void asw::draw::sprite (const asw::Texture &tex, const asw::Vec2< float > &position)
 Draw a sprite.
 
void asw::draw::spriteFlip (const asw::Texture &tex, const asw::Vec2< float > &position, bool flipX, bool flipY)
 Draw a sprite with the option to flip it.
 
void asw::draw::stretchSprite (const asw::Texture &tex, const asw::Quad< float > &position)
 Draw a sprite with the option to stretch it.
 
void asw::draw::rotateSprite (const asw::Texture &tex, const asw::Vec2< float > &position, double angle)
 Draw a sprite with the option to rotate it.
 
void asw::draw::stretchSpriteBlit (const asw::Texture &tex, const asw::Quad< float > &source, const asw::Quad< float > &dest)
 Draw a sprite with the option to stretch a portion of it.
 
void asw::draw::stretchSpriteRotateBlit (const asw::Texture &tex, const asw::Quad< float > &source, const asw::Quad< float > &dest, double angle)
 Draw a sprite with the option to stretch and rotate a portion of it.
 
void asw::draw::text (const asw::Font &font, const std::string &text, const asw::Vec2< float > &position, asw::Color color)
 Draw text left aligned.
 
void asw::draw::textCenter (const asw::Font &font, const std::string &text, const asw::Vec2< float > &position, asw::Color color)
 Draw text center aligned.
 
void asw::draw::textRight (const asw::Font &font, const std::string &text, const asw::Vec2< float > &position, asw::Color color)
 Draw text right aligned.
 
void asw::draw::point (const asw::Vec2< float > &position, asw::Color color)
 Draw a point.
 
void asw::draw::line (const asw::Vec2< float > &position1, const asw::Vec2< float > &position2, asw::Color color)
 Draw a line.
 
void asw::draw::rect (const asw::Quad< float > &position, asw::Color color)
 Draw a rectangle.
 
void asw::draw::rectFill (const asw::Quad< float > &position, asw::Color color)
 Draw a filled rectangle.
 
void asw::draw::circle (const asw::Vec2< float > &position, float radius, asw::Color color)
 Draw a circle.
 
void asw::draw::circleFill (const asw::Vec2< float > &position, float radius, asw::Color color)
 Draw a filled circle.
 
void asw::draw::setBlendMode (const asw::Texture &texture, asw::BlendMode mode)
 Set the blend mode of a texture.
 
void asw::draw::setAlpha (const asw::Texture &texture, float alpha)
 Set the alpha of a texture.
 

Detailed Description

Routines for drawing sprites and primitives to the screen.

Author
Allan Legemaate (alege.nosp@m.maat.nosp@m.e@gma.nosp@m.il.c.nosp@m.om)
Date
2023-09-20

Definition in file draw.h.