The Battle for Wesnoth  1.19.0-dev
Macros | Functions | Variables
draw.cpp File Reference
#include "draw.hpp"
#include "color.hpp"
#include "log.hpp"
#include "sdl/rect.hpp"
#include "sdl/texture.hpp"
#include "sdl/utils.hpp"
#include "video.hpp"
#include <SDL2/SDL_rect.h>
#include <SDL2/SDL_render.h>
Include dependency graph for draw.cpp:

Go to the source code of this file.

Macros

#define DBG_D   LOG_STREAM(debug, log_draw)
 
#define WRN_D   LOG_STREAM(warn, log_draw)
 

Functions

static SDL_Renderer * renderer ()
 
static bool sdl_bad_at_rects ()
 Some versions of SDL have a bad rectangle drawing implementation. More...
 
static void draw_rect_as_lines (const SDL_Rect &rect)
 For some SDL versions, draw rectangles as lines. More...
 
static SDL_RendererFlip get_flip (bool flip_h, bool flip_v)
 

Variables

static lg::log_domain log_draw ("draw")
 

Macro Definition Documentation

◆ DBG_D

#define DBG_D   LOG_STREAM(debug, log_draw)

Definition at line 28 of file draw.cpp.

◆ WRN_D

#define WRN_D   LOG_STREAM(warn, log_draw)

Definition at line 29 of file draw.cpp.

Function Documentation

◆ draw_rect_as_lines()

static void draw_rect_as_lines ( const SDL_Rect &  rect)
static

For some SDL versions, draw rectangles as lines.

Definition at line 135 of file draw.cpp.

References draw::line().

Referenced by draw::rect().

◆ get_flip()

static SDL_RendererFlip get_flip ( bool  flip_h,
bool  flip_v 
)
static

Definition at line 331 of file draw.cpp.

Referenced by draw::flipped(), and draw::tiled_highres().

◆ renderer()

static SDL_Renderer* renderer ( )
static

◆ sdl_bad_at_rects()

static bool sdl_bad_at_rects ( )
static

Some versions of SDL have a bad rectangle drawing implementation.

Definition at line 124 of file draw.cpp.

References sdl::runtime_at_least().

Referenced by draw::rect().

Variable Documentation

◆ log_draw

lg::log_domain log_draw("draw") ( "draw"  )
static