The Battle for Wesnoth  1.17.6+dev
Macros | Functions | Variables
draw.cpp File Reference
#include "draw.hpp"
#include "color.hpp"
#include "log.hpp"
#include "sdl/rect.hpp"
#include "sdl/surface.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)

◆ WRN_D

#define WRN_D   LOG_STREAM(warn, log_draw)

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 126 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 322 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 115 of file draw.cpp.

References sdl::runtime_at_least().

Referenced by draw::rect().

Variable Documentation

◆ log_draw

lg::log_domain log_draw("draw")
static