Implementation of canvas.hpp. More...
#include "gui/core/canvas.hpp"
#include "config.hpp"
#include "image.hpp"
#include "formatter.hpp"
#include "gettext.hpp"
#include "gui/auxiliary/formula.hpp"
#include "gui/core/log.hpp"
#include "gui/widgets/helper.hpp"
#include "sdl/rect.hpp"
#include "text.hpp"
#include "video.hpp"
#include "wml_exception.hpp"
Go to the source code of this file.
Namespaces | |
gui2 | |
A class inherited from ttext_box that displays its input as stars. | |
Macros | |
#define | GETTEXT_DOMAIN "wesnoth-lib" |
Implementation of canvas.hpp.
Definition in file canvas.cpp.
#define GETTEXT_DOMAIN "wesnoth-lib" |
Definition at line 20 of file canvas.cpp.
Uint32 border_color_ |
The border color of the rectangle.
If the color is fully transparent the border isn't drawn.
Definition at line 699 of file canvas.cpp.
unsigned border_thickness_ |
Border thickness.
If 0 the fill color is used for the entire widget.
Definition at line 692 of file canvas.cpp.
unsigned characters_per_line_ |
The number of characters per line.
Definition at line 1283 of file canvas.cpp.
Uint32 color_ |
The color of the line.
The color of the text.
The color of the circle.
Definition at line 284 of file canvas.cpp.
Uint32 fill_color_ |
The border color of the rectangle.
If the color is fully transparent the rectangle won't be filled.
Definition at line 706 of file canvas.cpp.
font::family_class font_family_ |
The text font family.
Definition at line 1253 of file canvas.cpp.
unsigned font_size_ |
The font size of the text.
Definition at line 1256 of file canvas.cpp.
unsigned font_style_ |
The style of the text.
Definition at line 1259 of file canvas.cpp.
tformula<unsigned> h_ |
The height of the rectangle.
The height of the text.
The height of the image.
Definition at line 682 of file canvas.cpp.
surface image_ |
The image is cached in this surface.
Definition at line 961 of file canvas.cpp.
tformula<std::string> image_name_ |
Name of the image.
This value is only used when the image name is a formula. If it isn't a formula the image will be loaded in the constructor. If it's a formula it will be loaded every draw cycles. This allows 'changing' images.
Definition at line 972 of file canvas.cpp.
tformula<bool> link_aware_ |
The link aware switch of the text.
Definition at line 1274 of file canvas.cpp.
tformula<std::string> link_color_ |
The link color of the text.
Definition at line 1277 of file canvas.cpp.
tformula<int> maximum_height_ |
The maximum height for the text.
Definition at line 1286 of file canvas.cpp.
tformula<int> maximum_width_ |
The maximum width for the text.
Definition at line 1280 of file canvas.cpp.
tformula<unsigned> radius_ |
The radius of the circle.
Definition at line 842 of file canvas.cpp.
tresize_mode resize_mode_ |
The resize mode for an image.
Definition at line 990 of file canvas.cpp.
SDL_Rect src_clip_ |
Contains the size of the image.
Definition at line 958 of file canvas.cpp.
tformula<t_string> text_ |
The text to draw.
Definition at line 1268 of file canvas.cpp.
tformula<PangoAlignment> text_alignment_ |
The alignment of the text.
Definition at line 1262 of file canvas.cpp.
tformula<bool> text_markup_ |
The text markup switch of the text.
Definition at line 1271 of file canvas.cpp.
unsigned thickness_ |
The thickness of the line.
if the value is odd the x and y are the middle of the line. if the value is even the x and y are the middle of a line with width - 1. (0 is special case, does nothing.)
Definition at line 293 of file canvas.cpp.
Referenced by gui::menu::style::draw_row(), gui::menu::imgsel_style::draw_row(), gui::menu::style::get_thickness(), and gui::menu::imgsel_style::load_images().
tformula<bool> vertical_mirror_ |
Mirror the image over the vertical axis.
Definition at line 993 of file canvas.cpp.
tformula<unsigned> w_ |
The width of the rectangle.
The width of the text.
The width of the image.
Definition at line 682 of file canvas.cpp.
tformula<unsigned> x1_ |
The start x coordinate of the line.
Definition at line 278 of file canvas.cpp.
tformula<unsigned> x2_ |
The end x coordinate of the line.
Definition at line 278 of file canvas.cpp.
tformula<unsigned> x_ |
The x coordinate of the rectangle.
The x coordinate of the text.
The x coordinate of the image.
The center x coordinate of the circle.
Definition at line 682 of file canvas.cpp.
Referenced by image::blit_modification::get_x(), image::mask_modification::get_x(), terrain_builder::tilemap::on_map(), help::help_text_area::item_at::operator()(), image::blit_modification::operator()(), image::mask_modification::operator()(), terrain_builder::tilemap::operator[](), terrain_builder::tilemap::reload(), halo::halo_impl::effect::render(), halo::halo_impl::effect::set_location(), and halo::halo_impl::effect::unrender().
tformula<unsigned> y1_ |
The start y coordinate of the line.
Definition at line 278 of file canvas.cpp.
tformula<unsigned> y2_ |
The end y coordinate of the line.
Definition at line 278 of file canvas.cpp.
tformula<unsigned> y_ |
The y coordinate of the rectangle.
The y coordinate of the text.
The y coordinate of the image.
The center y coordinate of the circle.
Definition at line 682 of file canvas.cpp.
Referenced by image::blit_modification::get_y(), image::mask_modification::get_y(), terrain_builder::tilemap::on_map(), help::help_text_area::item_at::operator()(), image::blit_modification::operator()(), image::mask_modification::operator()(), terrain_builder::tilemap::reload(), halo::halo_impl::effect::render(), halo::halo_impl::effect::set_location(), and halo::halo_impl::effect::unrender().