The Battle for Wesnoth  1.15.12+dev
Public Attributes | List of all members
gui2::rect_bounded_shape::calculated_rects Struct Reference

Where to draw, calculated from the x,y,w,h formulas but with different reference points used as the origin of the co-ordinate system. More...

#include <canvas_private.hpp>

Public Attributes

bool empty
 True if there was no intersection between dst_on_widget and the viewport. More...
 
SDL_Rect dst_on_widget
 In the co-ordinate system that the WML uses, and unaffected by the view_bounds. More...
 
SDL_Rect clip_on_widget
 Intersection of dst_on_widget with view_bounds, in the co-ordinate system that the WML uses. More...
 
SDL_Rect clip_in_shape
 Intersection of view_bounds with the shape, in co-ordinates with the shape's top-left at (0,0). More...
 
SDL_Rect unclipped_around_viewport
 Translation of dst_on_widget to the viewport's co-ordinates. More...
 
SDL_Rect dst_in_viewport
 Where to draw, in the co-ordinates of the viewport, and restricted to the view_bounds. More...
 

Detailed Description

Where to draw, calculated from the x,y,w,h formulas but with different reference points used as the origin of the co-ordinate system.

Definition at line 130 of file canvas_private.hpp.

Member Data Documentation

◆ clip_in_shape

SDL_Rect gui2::rect_bounded_shape::calculated_rects::clip_in_shape

Intersection of view_bounds with the shape, in co-ordinates with the shape's top-left at (0,0).

For a text_shape, this co-ordinate system corresponds to the co-ordinates of the Cairo surface that Pango draws on.

Definition at line 145 of file canvas_private.hpp.

◆ clip_on_widget

SDL_Rect gui2::rect_bounded_shape::calculated_rects::clip_on_widget

Intersection of dst_on_widget with view_bounds, in the co-ordinate system that the WML uses.

Definition at line 139 of file canvas_private.hpp.

◆ dst_in_viewport

SDL_Rect gui2::rect_bounded_shape::calculated_rects::dst_in_viewport

Where to draw, in the co-ordinates of the viewport, and restricted to the view_bounds.

Definition at line 153 of file canvas_private.hpp.

◆ dst_on_widget

SDL_Rect gui2::rect_bounded_shape::calculated_rects::dst_on_widget

In the co-ordinate system that the WML uses, and unaffected by the view_bounds.

Definition at line 137 of file canvas_private.hpp.

◆ empty

bool gui2::rect_bounded_shape::calculated_rects::empty

True if there was no intersection between dst_on_widget and the viewport.

If true, the data in the SDL_Rects must be ignored.

Definition at line 135 of file canvas_private.hpp.

◆ unclipped_around_viewport

SDL_Rect gui2::rect_bounded_shape::calculated_rects::unclipped_around_viewport

Translation of dst_on_widget to the viewport's co-ordinates.

Here (0,0) corresponds to view_bounds's top-left. Will often have negative values for x and y, and widths or heights larger than the viewport's size.

Definition at line 151 of file canvas_private.hpp.


The documentation for this struct was generated from the following file: