mirror of https://github.com/buggins/dlangui.git
update Rect docs - right/bottom information
This commit is contained in:
parent
8bcfb8dcdd
commit
6f4a9636a0
|
@ -62,15 +62,17 @@ struct Point {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 2D rectangle
|
/** 2D rectangle
|
||||||
|
Note: Rect(0,0,20,10) size is 20x10 -- right and bottom sides are non-inclusive -- if you draw such rect, rightmost drawn pixel will be x=19 and bottom pixel y=9
|
||||||
|
*/
|
||||||
struct Rect {
|
struct Rect {
|
||||||
/// x coordinate of top left corner
|
/// x coordinate of top left corner
|
||||||
int left;
|
int left;
|
||||||
/// y coordinate of top left corner
|
/// y coordinate of top left corner
|
||||||
int top;
|
int top;
|
||||||
/// x coordinate of bottom right corner
|
/// x coordinate of bottom right corner (non-inclusive)
|
||||||
int right;
|
int right;
|
||||||
/// y coordinate of bottom right corner
|
/// y coordinate of bottom right corner (non-inclusive)
|
||||||
int bottom;
|
int bottom;
|
||||||
/// returns average of left, right
|
/// returns average of left, right
|
||||||
@property int middlex() { return (left + right) / 2; }
|
@property int middlex() { return (left + right) / 2; }
|
||||||
|
|
Loading…
Reference in New Issue