mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-19 05:06:31 +01:00
add Rectangle::vertical_fraction() as a convenience method
Conflicts: libs/canvas/rectangle.cc
This commit is contained in:
parent
6e335ca5d9
commit
59ce8663f9
2 changed files with 31 additions and 0 deletions
|
|
@ -64,6 +64,17 @@ public:
|
|||
void set_x1 (Coord);
|
||||
void set_y1 (Coord);
|
||||
|
||||
/** return @param y as a floating point fraction of the overall
|
||||
* height of the rectangle. @param y is in canvas coordinate space.
|
||||
*
|
||||
* A value of zero indicates that y is at the bottom of the
|
||||
* rectangle; a value of 1 indicates that y is at the top.
|
||||
*
|
||||
* Will return zero if there is no bounding box or if y
|
||||
* is outside the bounding box.
|
||||
*/
|
||||
double vertical_fraction (double y) const;
|
||||
|
||||
enum What {
|
||||
NOTHING = 0x0,
|
||||
LEFT = 0x1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue