The Battle for Wesnoth  1.17.0-dev
Classes
GUICanvasWML

A canvas is a blank drawing area on which the user can draw several shapes. More...

Classes

class  gui2::line_shape
 Definition of a line. More...
 
class  gui2::rect_bounded_shape
 Class holding common attribute names (for WML) and common implementation (in C++) for shapes placed with the 4 attributes x, y, w and h. More...
 
class  gui2::rectangle_shape
 Definition of a rectangle. More...
 
class  gui2::round_rectangle_shape
 Definition of a rounded rectangle shape. More...
 
class  gui2::circle_shape
 Definition of a circle. More...
 
class  gui2::image_shape
 Keys:

Key Type DefaultDescription
x f_unsigned 0 The x coordinate of the top left corner.
More...
 
class  gui2::text_shape
 
Key Type Default Description
font_family font_style "sans" The font family used for the text.
More...
 

Detailed Description

A canvas is a blank drawing area on which the user can draw several shapes.

The drawing is done by adding WML structures to the canvas.

Pre-commit

This section contains the pre commit functions. These functions will be executed before the drawn canvas is applied on top of the normal background. There should only be one pre commit section and its order regarding the other shapes doesn't matter. The function has effect on the entire canvas, it's not possible to affect only a small part of the canvas.

Blur

Blurs the background before applying the canvas. This doesn't make sense if the widget isn't semi-transparent.

Keys:

Key Type Default Description
depth unsigned0 The depth to blur.