Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template basic_rect

boost::ui::basic_rect — 2D rectangle plane figure data structure with custom coordinates type

Synopsis

// In header: <boost/ui/coord.hpp>

template<typename T> 
class basic_rect : public boost::geometry::model::box public ::boost::polygon::rectangle_data< T >
{
public:
  // types
  typedef T value_type;  // Type of coordinates. 

  // construct/copy/destruct
  basic_rect(const T &, const T &, const T &, const T &);
  basic_rect(const basic_point< T > &, const basic_size< T > &);
  basic_rect(const basic_point< T > &, const basic_point< T > &);
  template<typename D> explicit basic_rect(const basic_rect< D > &);
  basic_rect();

  // public member functions
  T x() const;
  T y() const;
  T width() const;
  T height() const;
};

Description

See Also:

Rectangle (Wikipedia)

basic_rect public construct/copy/destruct

  1. basic_rect(const T & x, const T & y, const T & width, const T & height);
    Constructs rectangle with coordinates.
  2. basic_rect(const basic_point< T > & point, const basic_size< T > & size);
    Constructs rectangle with coordinates.
  3. basic_rect(const basic_point< T > & point1, const basic_point< T > & point2);
    Constructs rectangle with coordinates.
  4. template<typename D> explicit basic_rect(const basic_rect< D > & other);
    Constructs rectangle with coordinates.
  5. basic_rect();
    Constructs rectangle with empty coordinates.

basic_rect public member functions

  1. T x() const;
    Returns x coordinate.
  2. T y() const;
    Returns y coordinate.
  3. T width() const;
    Returns width.
  4. T height() const;
    Returns height.

PrevUpHomeNext