FLTK 1.4.0
Fl_Rect Class Reference

Rectangle with standard FLTK coordinates (X, Y, W, H). More...

#include <Fl_Rect.H>

Public Member Functions

int b () const
 gets the bottom edge (y + h). More...
 
 Fl_Rect ()
 The default constructor creates an empty rectangle (x = y = w = h = 0).
 
 Fl_Rect (const Fl_Widget &widget)
 This constructor creates a rectangle based on a widget's position and size.
 
 Fl_Rect (const Fl_Widget *const widget)
 This constructor creates a rectangle based on a widget's position and size.
 
 Fl_Rect (int W, int H)
 This constructor creates a rectangle with x = y = 0 and the given width and height.
 
 Fl_Rect (int X, int Y, int W, int H)
 This constructor creates a rectangle with the given x,y coordinates and the given width and height.
 
int h () const
 gets the height
 
void h (int H)
 sets the height
 
int r () const
 gets the right edge (x + w). More...
 
int w () const
 gets the width
 
void w (int W)
 sets the width
 
int x () const
 gets the x coordinate (left edge)
 
void x (int X)
 sets the x coordinate (left edge)
 
int y () const
 gets the y coordinate (top edge)
 
void y (int Y)
 sets the y coordinate (top edge)
 

Detailed Description

Rectangle with standard FLTK coordinates (X, Y, W, H).

This may be used internally, for overloaded widget contructors and other overloaded methods like fl_measure(), fl_text_extents(), fl_rect(), fl_rectf(), and maybe more.

Member Function Documentation

◆ b()

int Fl_Rect::b ( ) const
inline

gets the bottom edge (y + h).

Note
r() and b() are coordinates outside the area of the rectangle.

◆ r()

int Fl_Rect::r ( ) const
inline

gets the right edge (x + w).

Note
r() and b() are coordinates outside the area of the rectangle.

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