Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches

An intrinsic geometry class for objects with a graphical representation. More...

#include <adobe/extents.hpp>

Inheritance diagram for extents_t:
extents_slices_t

Classes

class  slice_t
 A class containing element geometry for a single orientation. More...

Public Member Functions

slice_tvertical ()
slice_thorizontal ()
const slice_tvertical () const
const slice_thorizontal () const
int & height ()
int & width ()
const int & height () const
const int & width () const

Public Attributes

std::array< slice_t, 2 > slice_m

Friends

bool operator== (const extents_t &x, const extents_t &y)

Detailed Description

extents_t is an equality comparable class for storing intrinsic geometry about a graphical element. Each extents_t is comprised of two slices. A slice stores intrinsic geometry about a graphical element for in a single direction, either vertically or horizontally.

Model Of
Rationale
extents_t is intended to describe only the properties of a graphical element which it retains intrinsically. Properties that involve an element as it relates to another element (like position) should not be described here. This is intended to separate the notions of intrinsic versus extrinsic values. This seems strange at first, but is justified when considering how to make a copy of an element's geometry: the copy will not have the same relationships as the original, so extrinsic values cannot be copied, nor can they be set to default values because there is no relationship to which they relate. Any extrinsic value in that case is equally meaningless.
Todo
(fbrereto) We need a better name than extents_t

Definition at line 66 of file extents.hpp.

Member Function Documentation

◆ vertical() [1/2]

slice_t & vertical ( )

Definition at line 86 of file extents.hpp.

◆ horizontal() [1/2]

slice_t & horizontal ( )

Definition at line 87 of file extents.hpp.

◆ vertical() [2/2]

const slice_t & vertical ( ) const

Definition at line 89 of file extents.hpp.

◆ horizontal() [2/2]

const slice_t & horizontal ( ) const

Definition at line 90 of file extents.hpp.

◆ height() [1/2]

int & height ( )
Returns
a reference to length_m in the vertical slice.

Definition at line 92 of file extents.hpp.

◆ width() [1/2]

int & width ( )
Returns
a reference to length_m in the horizontal slice.

Definition at line 93 of file extents.hpp.

◆ height() [2/2]

const int & height ( ) const
Returns
a reference to length_m in the vertical slice.

Definition at line 95 of file extents.hpp.

◆ width() [2/2]

const int & width ( ) const
Returns
a reference to length_m in the horizontal slice.

Definition at line 96 of file extents.hpp.

◆ operator==

bool operator== ( const extents_t & x,
const extents_t & y )
friend

Member Data Documentation

◆ slice_m

std::array<slice_t, 2> slice_m

The two slices that comprise this extents.

Definition at line 84 of file extents.hpp.