|
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++.
|
Functions | |
| void | clear_color (asw::Color color) |
| Clear the screen to a color. | |
| void | sprite (const asw::Texture &tex, const asw::Vec2< float > &position) |
| Draw a sprite. | |
| void | sprite_flip (const asw::Texture &tex, const asw::Vec2< float > &position, bool flip_x, bool flip_y) |
| Draw a sprite with the option to flip it. | |
| void | stretch_sprite (const asw::Texture &tex, const asw::Quad< float > &position) |
| Draw a sprite with the option to stretch it. | |
| void | rotate_sprite (const asw::Texture &tex, const asw::Vec2< float > &position, float angle) |
| Draw a sprite with the option to rotate it. | |
| void | stretch_sprite_blit (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 | stretch_sprite_rotate_blit (const asw::Texture &tex, const asw::Quad< float > &source, const asw::Quad< float > &dest, float angle) |
| Draw a sprite with the option to stretch and rotate a portion of it. | |
| void | text (const asw::Font &font, const std::string &text, const asw::Vec2< float > &position, asw::Color color, asw::TextJustify justify=asw::TextJustify::Left) |
| Draw text. | |
| void | point (const asw::Vec2< float > &position, asw::Color color) |
| Draw a point. | |
| void | line (const asw::Vec2< float > &position1, const asw::Vec2< float > &position2, asw::Color color) |
| Draw a line. | |
| void | rect (const asw::Quad< float > &position, asw::Color color) |
| Draw a rectangle. | |
| void | rect_fill (const asw::Quad< float > &position, asw::Color color) |
| Draw a filled rectangle. | |
| void | circle (const asw::Vec2< float > &position, float radius, asw::Color color) |
| Draw a circle. | |
| void | circle_fill (const asw::Vec2< float > &position, float radius, asw::Color color) |
| Draw a filled circle. | |
| void | set_blend_mode (const asw::Texture &texture, asw::BlendMode mode) |
| Set the blend mode of a texture. | |
| void | set_alpha (const asw::Texture &texture, float alpha) |
| Set the alpha of a texture. | |
| void asw::draw::circle | ( | const asw::Vec2< float > & | position, |
| float | radius, | ||
| asw::Color | color ) |
| void asw::draw::circle_fill | ( | const asw::Vec2< float > & | position, |
| float | radius, | ||
| asw::Color | color ) |
| void asw::draw::clear_color | ( | asw::Color | color | ) |
| void asw::draw::line | ( | const asw::Vec2< float > & | position1, |
| const asw::Vec2< float > & | position2, | ||
| asw::Color | color ) |
| void asw::draw::point | ( | const asw::Vec2< float > & | position, |
| asw::Color | color ) |
| void asw::draw::rect | ( | const asw::Quad< float > & | position, |
| asw::Color | color ) |
| void asw::draw::rect_fill | ( | const asw::Quad< float > & | position, |
| asw::Color | color ) |
| void asw::draw::rotate_sprite | ( | const asw::Texture & | tex, |
| const asw::Vec2< float > & | position, | ||
| float | angle ) |
| void asw::draw::set_alpha | ( | const asw::Texture & | texture, |
| float | alpha ) |
| void asw::draw::set_blend_mode | ( | const asw::Texture & | texture, |
| asw::BlendMode | mode ) |
| void asw::draw::sprite | ( | const asw::Texture & | tex, |
| const asw::Vec2< float > & | position ) |
| void asw::draw::sprite_flip | ( | const asw::Texture & | tex, |
| const asw::Vec2< float > & | position, | ||
| bool | flip_x, | ||
| bool | flip_y ) |
| void asw::draw::stretch_sprite | ( | const asw::Texture & | tex, |
| const asw::Quad< float > & | position ) |
| void asw::draw::stretch_sprite_blit | ( | const asw::Texture & | tex, |
| const asw::Quad< float > & | source, | ||
| const asw::Quad< float > & | dest ) |
| void asw::draw::stretch_sprite_rotate_blit | ( | const asw::Texture & | tex, |
| const asw::Quad< float > & | source, | ||
| const asw::Quad< float > & | dest, | ||
| float | angle ) |
Draw a sprite with the option to stretch and rotate a portion of it.
| tex | The texture to draw. |
| source | The quad defining the portion of the texture to stretch. |
| dest | The quad defining the position and size to stretch the sprite to. |
| angle | The angle to rotate the sprite by in radians. |
| void asw::draw::text | ( | const asw::Font & | font, |
| const std::string & | text, | ||
| const asw::Vec2< float > & | position, | ||
| asw::Color | color, | ||
| asw::TextJustify | justify = asw::TextJustify::Left ) |