C
Qul::PlatformInterface::Rect Class
class Qul::PlatformInterface::RectRectクラスは、平面上の矩形を整数精度で定義します。詳細...
| Header: | #include <platforminterface/rect.h> |
| Since: | Qt Quick Ultralite (Platform) 1.5 |
パブリック関数
| Rect() | |
| Rect(const Qul::PlatformInterface::Point &topLeft, const Qul::PlatformInterface::Point &bottomRight) | |
| Rect(const Qul::PlatformInterface::Point &topLeft, const Qul::PlatformInterface::Size &size) | |
| Rect(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y, Qul::PlatformInterface::coord_t width, Qul::PlatformInterface::coord_t height) | |
| void | adjust(Qul::PlatformInterface::coord_t x1, Qul::PlatformInterface::coord_t y1, Qul::PlatformInterface::coord_t x2, Qul::PlatformInterface::coord_t y2) |
| Qul::PlatformInterface::Rect | adjusted(Qul::PlatformInterface::coord_t x1, Qul::PlatformInterface::coord_t y1, Qul::PlatformInterface::coord_t x2, Qul::PlatformInterface::coord_t y2) const |
| Qul::PlatformInterface::coord_t | bottom() const |
| Qul::PlatformInterface::Point | bottomLeft() const |
| Qul::PlatformInterface::Point | bottomRight() const |
| Qul::PlatformInterface::Point | center() const |
| bool | contains(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y) const |
| bool | contains(const Qul::PlatformInterface::Point &point, bool proper = false) const |
| bool | contains(const Qul::PlatformInterface::Rect &rectangle, bool proper = false) const |
| bool | contains(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y, bool proper) const |
| void | getCoords(Qul::PlatformInterface::coord_t *x1, Qul::PlatformInterface::coord_t *y1, Qul::PlatformInterface::coord_t *x2, Qul::PlatformInterface::coord_t *y2) const |
| void | getRect(Qul::PlatformInterface::coord_t *x, Qul::PlatformInterface::coord_t *y, Qul::PlatformInterface::coord_t *width, Qul::PlatformInterface::coord_t *height) const |
| Qul::PlatformInterface::coord_t | height() const |
| Qul::PlatformInterface::Rect | intersected(const Qul::PlatformInterface::Rect &rectangle) const |
| bool | intersects(const Qul::PlatformInterface::Rect &rectangle) const |
| bool | isEmpty() const |
| bool | isNull() const |
| bool | isValid() const |
| Qul::PlatformInterface::coord_t | left() const |
| void | moveBottom(Qul::PlatformInterface::coord_t y) |
| void | moveBottomLeft(const Qul::PlatformInterface::Point &position) |
| void | moveBottomRight(const Qul::PlatformInterface::Point &position) |
| void | moveCenter(const Qul::PlatformInterface::Point &position) |
| void | moveLeft(Qul::PlatformInterface::coord_t x) |
| void | moveRight(Qul::PlatformInterface::coord_t x) |
| void | moveTo(const Qul::PlatformInterface::Point &position) |
| void | moveTo(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y) |
| void | moveTop(Qul::PlatformInterface::coord_t y) |
| void | moveTopLeft(const Qul::PlatformInterface::Point &position) |
| void | moveTopRight(const Qul::PlatformInterface::Point &position) |
| Qul::PlatformInterface::Rect | normalized() const |
| Qul::PlatformInterface::coord_t | right() const |
| void | setBottom(Qul::PlatformInterface::coord_t y) |
| void | setBottomLeft(const Qul::PlatformInterface::Point &position) |
| void | setBottomRight(const Qul::PlatformInterface::Point &position) |
| void | setCoords(Qul::PlatformInterface::coord_t x1, Qul::PlatformInterface::coord_t y1, Qul::PlatformInterface::coord_t x2, Qul::PlatformInterface::coord_t y2) |
| void | setHeight(Qul::PlatformInterface::coord_t height) |
| void | setLeft(Qul::PlatformInterface::coord_t x) |
| void | setRect(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y, Qul::PlatformInterface::coord_t width, Qul::PlatformInterface::coord_t height) |
| void | setRight(Qul::PlatformInterface::coord_t x) |
| void | setSize(const Qul::PlatformInterface::Size &size) |
| void | setTop(Qul::PlatformInterface::coord_t y) |
| void | setTopLeft(const Qul::PlatformInterface::Point &position) |
| void | setTopRight(const Qul::PlatformInterface::Point &position) |
| void | setWidth(Qul::PlatformInterface::coord_t width) |
| void | setX(Qul::PlatformInterface::coord_t x) |
| void | setY(Qul::PlatformInterface::coord_t y) |
| Qul::PlatformInterface::Size | size() const |
| Qul::PlatformInterface::coord_t | top() const |
| Qul::PlatformInterface::Point | topLeft() const |
| Qul::PlatformInterface::Point | topRight() const |
| void | translate(const Qul::PlatformInterface::Point &offset) |
| void | translate(Qul::PlatformInterface::coord_t dx, Qul::PlatformInterface::coord_t dy) |
| Qul::PlatformInterface::Rect | translated(const Qul::PlatformInterface::Point &offset) const |
| Qul::PlatformInterface::Rect | translated(Qul::PlatformInterface::coord_t dx, Qul::PlatformInterface::coord_t dy) const |
| Qul::PlatformInterface::Rect | transposed() const |
| Qul::PlatformInterface::Rect | united(const Qul::PlatformInterface::Rect &rectangle) const |
| Qul::PlatformInterface::coord_t | width() const |
| Qul::PlatformInterface::coord_t | x() const |
| Qul::PlatformInterface::coord_t | y() const |
| Qul::PlatformInterface::Rect | operator&(const Qul::PlatformInterface::Rect &rectangle) const |
| Qul::PlatformInterface::Rect & | operator&=(const Qul::PlatformInterface::Rect &rectangle) |
| Qul::PlatformInterface::Rect | operator|(const Qul::PlatformInterface::Rect &rectangle) const |
| Qul::PlatformInterface::Rect & | operator|=(const Qul::PlatformInterface::Rect &rectangle) |
関連する非メンバー
| bool | operator!=(const Qul::PlatformInterface::Rect &r1, const Qul::PlatformInterface::Rect &r2) |
| bool | operator==(const Qul::PlatformInterface::Rect &r1, const Qul::PlatformInterface::Rect &r2) |
詳細な説明
矩形は通常、左上隅とサイズで表されます。Rectのサイズ(幅と高さ)は常に、そのレンダリングの基礎となる数学的な矩形と等価である。
Rect は、左、上、幅、高さの整数のセット、または Point と Size から作成できます。
左上と右下の座標を使用してRectを作成する3番目のコンストラクタがあります。
Rectクラスは、さまざまな矩形座標を返す関数のコレクションを提供し、これらの操作を可能にする。Rectはまた、さまざまな座標に対して矩形を相対的に移動させる関数も提供している。さらに、moveTo ()関数があり、矩形を移動させ、その左上隅を指定された座標に残します。また、translate ()関数は、現在の位置から与えられたオフセットだけ矩形を移動させ、translated ()関数は、この矩形の変換されたコピーを返します。
size() 関数は、矩形の寸法を Size として返します。寸法は、width() およびheight() 関数を使用して個別に取得することもできます。寸法を操作するには、setSize(),setWidth() またはsetHeight() 関数を使用します。あるいは、矩形の座標を設定する関数、たとえばsetBottom() やsetRight() を適用して、サイズを変更することもできます。
contains() 関数は、与えられた点が矩形の内側にあるかどうかを示し、intersects() 関数は、この矩形が与えられた矩形と交差する場合にtrue を返します。Rect クラスはまた、交差矩形を返すintersected() 関数と、与えられた矩形とこれを囲む矩形を返すunited() 関数も提供します:
isEmpty() 関数は,left() >right() またはtop() >bottom() のとき,true を返す.空の矩形は無効であることに注意:isValid() 関数は,left() <=right()かつ top() <=bottom() ならばtrue を返す.一方、ヌル矩形 (isNull() == true) は、幅と高さの両方が 0 に設定されます。
Rect とRectF の定義方法によって、空の Rect はRectF と本質的に同じように定義されることに注意してください。
Rectオブジェクトは比較することができます。
座標
Rectクラスは、さまざまな矩形座標を返す関数のコレクションを提供し、これらの操作を可能にします。Rect はまた、矩形をさまざまな座標に対して相対的に移動させる関数も提供します。
たとえば、left(),setLeft(),moveLeft() 関数を例にとると、left() は矩形の左端の x 座標を返し、setLeft() は矩形の左端を与えられた x 座標に設定します(幅は変更できますが、矩形の右端は変更されません)。また、moveLeft() は矩形全体を水平方向に移動し、矩形の左端は与えられた x 座標のままでサイズは変更されません。

Qt との互換性のため、bottom() とright() 関数が返す値は、矩形の真の右下隅からずれます:right() 関数は left( ) +width() - 1 を返し、bottom() 関数はtop( ) +height() - 1 を返します。bottomRight() 関数が返す点も同様です。さらに、topRight() とbottomLeft() 関数の x 座標と y 座標はそれぞれ、真の右端と下端から同じずれを含みます。
x() +width() とy() +height() を使って真の右下隅を見つけ、right() とbottom() を避けることを推奨する。RectF RectF クラスは、座標に浮動小数点精度を使用して平面上の矩形を定義します。RectF::right() とRectF::bottom() 関数は、右端と下端の座標を返します。
また、adjust ()関数を使用してこの矩形の座標にオフセットを追加したり、adjusted ()関数を使用して元の矩形の調整に基づいて新しい矩形を取得したりすることも可能です。幅と高さのどちらかが負の場合は、normalized() 関数を使用して、角が入れ替わった矩形を取得します。
さらに Rect には、矩形の左上隅と右下隅の位置を抽出するgetCoords() 関数と、矩形の左上隅、幅、高さを抽出するgetRect() 関数があります。setCoords() とsetRect() 関数を使用して、矩形の座標と寸法を一度に操作します。
制約
Rect は、coord_t 型の最小値と最大値に制限されます。この範囲外の値になる可能性のある Rect を操作すると、未定義の動作になります。
RectFも参照してください 。
メンバ関数ドキュメント
Rect::Rect()
null 矩形を構築します。
Rect::Rect(const Qul::PlatformInterface::Point &topLeft, const Qul::PlatformInterface::Point &bottomRight)
与えられたtopLeft とbottomRight のコーナーを持つ矩形を構築します。
setTopLeft() およびsetBottomRight()も参照 ください。
Rect::Rect(const Qul::PlatformInterface::Point &topLeft, const Qul::PlatformInterface::Size &size)
与えられたtopLeft コーナーと与えられたsize を持つ矩形を構築します。
setTopLeft() およびsetSize()も参照 ください。
Rect::Rect(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y, Qul::PlatformInterface::coord_t width, Qul::PlatformInterface::coord_t height)
(x,y) を左上隅とし、与えられたwidth とheight を持つ矩形を構築します。
setRect()も参照してください 。
void Rect::adjust(Qul::PlatformInterface::coord_t x1, Qul::PlatformInterface::coord_t y1, Qul::PlatformInterface::coord_t x2, Qul::PlatformInterface::coord_t y2)
既存の矩形の座標に、それぞれx1,y1,x2 およびy2 を追加する。
Qul::PlatformInterface::Rect Rect::adjusted(Qul::PlatformInterface::coord_t x1, Qul::PlatformInterface::coord_t y1, Qul::PlatformInterface::coord_t x2, Qul::PlatformInterface::coord_t y2) const
この矩形の既存の座標に、x1,y1,x2 およびy2 をそれぞれ加えた新しい矩形を返します。
adjust()も参照 。
Qul::PlatformInterface::coord_t Rect::bottom() const
矩形の底辺の y 座標を返します。
Qt との互換性のため、この関数はtop() +height() - 1 を返すことに注意してください。真の y 座標を取得するにはy() +height() を使用してください。
setBottom(),bottomLeft(),bottomRight()も参照して ください。
Qul::PlatformInterface::Point Rect::bottomLeft() const
矩形の左下隅の位置を返す。歴史的な理由により、この関数は Point(left(),top() +height() - 1) を返すことに注意。
setBottomLeft(),bottom(),left()も参照 。
Qul::PlatformInterface::Point Rect::bottomRight() const
矩形の右下隅の位置を返す。
Qt との互換性のため、この関数は Point(left() +width() -1,top() +height() - 1) を返すことに注意してください。
setBottomRight(),bottom(),right()も参照してください 。
Qul::PlatformInterface::Point Rect::center() const
矩形の中心点を返します。
moveCenter()も参照 。
bool Rect::contains(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y) const
点 (x,y) がこの矩形の内側にある場合はtrue を返し、そうでない場合はfalse を返す。
これはオーバーロードされた関数です。
bool Rect::contains(const Qul::PlatformInterface::Point &point, bool proper = false) const
与えられたpoint が矩形の内側または端にある場合はtrue を返し、そうでない場合はfalse を返す。proper が真の場合、この関数は、与えられたpoint が矩形の内側にある(つまり、端にない)場合にのみtrue を返します。
これはオーバーロードされた関数です。
intersects()も参照してください 。
bool Rect::contains(const Qul::PlatformInterface::Rect &rectangle, bool proper = false) const
与えられたrectangle がこの矩形の内側にある場合はtrue を返します。そうでない場合はfalse を返します。proper が真の場合、この関数はrectangle が完全にこの矩形の内側にある(端にない)場合にのみtrue を返します。
これはオーバーロードされた関数です。
bool Rect::contains(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y, bool proper) const
点 (x,y) が矩形の内側または辺上にある場合はtrue を返し、そうでない場合はfalse を返す。proper が真の場合、この関数は、点が完全に矩形の内側にある(端にない)場合にのみtrue を返します。
これはオーバーロードされた関数です。
void Rect::getCoords(Qul::PlatformInterface::coord_t *x1, Qul::PlatformInterface::coord_t *y1, Qul::PlatformInterface::coord_t *x2, Qul::PlatformInterface::coord_t *y2) const
矩形の左上隅の位置を *x1 と *y1 に,右下隅の位置を *x2 と *y2 に抽出します.
setCoords() およびgetRect()も参照してください 。
void Rect::getRect(Qul::PlatformInterface::coord_t *x, Qul::PlatformInterface::coord_t *y, Qul::PlatformInterface::coord_t *width, Qul::PlatformInterface::coord_t *height) const
矩形の左上隅の位置を *x および *y に、その寸法を *width および *height に抽出します。
setRect() およびgetCoords()も参照してください 。
Qul::PlatformInterface::coord_t Rect::height() const
矩形の高さを返します。
setHeight()、width() およびsize()も参照 ください。
Qul::PlatformInterface::Rect Rect::intersected(const Qul::PlatformInterface::Rect &rectangle) const
この矩形と与えられたrectangle との交点を返す。rectangle.intersected(s) はr & s と等価であることに注意。

intersects()、united() およびoperator&=()も参照 。
bool Rect::intersects(const Qul::PlatformInterface::Rect &rectangle) const
この矩形が与えられたrectangle と交差する(つまり,両方の矩形内に少なくとも1つのピクセルが存在する)場合はtrue を返し,そうでない場合はfalse を返します.
交差矩形は,intersected() 関数を用いて取得することができます.
contains()も参照してください 。
bool Rect::isEmpty() const
矩形が空の場合はtrue を返し、そうでない場合はfalse を返す。
空の矩形は、left() >right() またはtop() >bottom() を持つ。空の矩形は無効です (すなわち、 isEmpty() == !isValid()))。
角が入れ替わった矩形を取得するにはnormalized() 関数を使用します。
isNull(),isValid(),normalized()も参照 。
bool Rect::isNull() const
矩形がヌル矩形の場合はtrue を返し、そうでない場合はfalse を返します。
ヌル矩形は、幅と高さの両方が 0 に設定されます(すなわち、right() ==left() - 1 およびbottom() ==top() - 1)。ヌル矩形もまた空であり、したがって無効である。
isEmpty() およびisValid()も参照してください 。
bool Rect::isValid() const
矩形が有効な場合はtrue を返し、そうでない場合はfalse を返す。
有効な矩形は、left() <=right() およびtop() <=bottom() を持つ。無効な矩形に対しては,交点のような非自明な操作は定義されないことに注意してください.有効な矩形は空ではない (すなわち, isValid() == !isEmpty()).
isNull(),isEmpty(),normalized()も参照 。
Qul::PlatformInterface::coord_t Rect::left() const
矩形の左端の x 座標を返す。x() と同等。
setLeft()、topLeft() およびbottomLeft()も参照 。
void Rect::moveBottom(Qul::PlatformInterface::coord_t y)
矩形を垂直に移動し、矩形の下辺を与えられたy 座標に残します。矩形のサイズは変更されません。
bottom()、setBottom()、moveTop()も参照 。
void Rect::moveBottomLeft(const Qul::PlatformInterface::Point &position)
矩形を移動し、左下隅を与えられたposition に残す。矩形のサイズは変更されません。
setBottomLeft()、moveBottom() およびmoveLeft()も参照 。
void Rect::moveBottomRight(const Qul::PlatformInterface::Point &position)
矩形を移動し、右下隅を与えられたposition に残す。矩形のサイズは変更されません。
setBottomRight()、moveRight() およびmoveBottom()も参照 。
void Rect::moveCenter(const Qul::PlatformInterface::Point &position)
矩形を移動し,中心点を与えられたposition に残す。矩形のサイズは変更されません。
center()も参照してください 。
void Rect::moveLeft(Qul::PlatformInterface::coord_t x)
矩形を水平に移動し、矩形の左端を与えられたx 座標に残します。矩形のサイズは変更されません。
left()、setLeft()、moveRight()も参照 。
void Rect::moveRight(Qul::PlatformInterface::coord_t x)
矩形を水平に移動し、矩形の右端を与えられたx 座標に残します。矩形のサイズは変更されません。
right()、setRight()、moveLeft()も参照 。
void Rect::moveTo(const Qul::PlatformInterface::Point &position)
矩形を移動し、左上端を与えられたposition に残す。
これはオーバーロードされた関数です。
void Rect::moveTo(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y)
矩形を移動し、左上隅を与えられた位置 (x,y) に残す。矩形のサイズは変更されません。
これはオーバーロードされた関数です。
translate() およびmoveTopLeft()も参照 。
void Rect::moveTop(Qul::PlatformInterface::coord_t y)
矩形を垂直に移動し、矩形の上辺を与えられたy 座標に残します。矩形のサイズは変更されません。
top()、setTop()、moveBottom()も参照 。
void Rect::moveTopLeft(const Qul::PlatformInterface::Point &position)
矩形を移動し、左上端を与えられたposition に残す。矩形のサイズは変更されません。
setTopLeft()、moveTop() およびmoveLeft()も参照 。
void Rect::moveTopRight(const Qul::PlatformInterface::Point &position)
矩形を移動し、右上隅を与えられたposition に残す。矩形のサイズは変更されません。
setTopRight()、moveTop() およびmoveRight()も参照 。
Qul::PlatformInterface::Rect Rect::normalized() const
正規化された矩形,つまり,幅と高さが負でない矩形を返す。
width() < 0 の場合は左右の角を入れ替え、height() < 0 の場合は上下の角を入れ替えます。
Qul::PlatformInterface::coord_t Rect::right() const
矩形の右端の x 座標を返す。
Qt との互換性のため、この関数はleft() +width() - 1 を返すことに注意してください。真の x 座標を取得するにはx() +width() を使用してください。
setRight(),topRight(),bottomRight()も参照して ください。
void Rect::setBottom(Qul::PlatformInterface::coord_t y)
矩形の下辺を、与えられたy 座標に設定します。高さを変更することはできますが、矩形の上辺を変更することはありません。
bottom() およびmoveBottom()も参照 。
void Rect::setBottomLeft(const Qul::PlatformInterface::Point &position)
矩形の左下隅を、与えられたposition に設定します。サイズを変更することはできますが、矩形の右上隅を変更することはありません。
bottomLeft() およびmoveBottomLeft()も参照 。
void Rect::setBottomRight(const Qul::PlatformInterface::Point &position)
矩形の右下隅を、与えられたposition に設定します。サイズは変更されるかもしれませんが、矩形の左上隅が変更されることはありません。
bottomRight() およびmoveBottomRight()も参照 。
void Rect::setCoords(Qul::PlatformInterface::coord_t x1, Qul::PlatformInterface::coord_t y1, Qul::PlatformInterface::coord_t x2, Qul::PlatformInterface::coord_t y2)
矩形の左上隅の座標を (x1,y1) に、右下隅の座標を (x2,y2) に設定します。
void Rect::setHeight(Qul::PlatformInterface::coord_t height)
矩形の高さを与えられたheight に設定します。下辺は変更されますが、上辺は変更されません。
void Rect::setLeft(Qul::PlatformInterface::coord_t x)
矩形の左端を、与えられたx 座標に設定します。幅を変更することはできますが、矩形の右端を変更することはありません。
setX() と同等。
void Rect::setRect(Qul::PlatformInterface::coord_t x, Qul::PlatformInterface::coord_t y, Qul::PlatformInterface::coord_t width, Qul::PlatformInterface::coord_t height)
矩形の左上隅の座標を (x,y) に、サイズを指定されたwidth とheight に設定します。
void Rect::setRight(Qul::PlatformInterface::coord_t x)
矩形の右端を、与えられたx 座標に設定します。幅を変更することはできますが、矩形の左端を変更することはありません。
void Rect::setSize(const Qul::PlatformInterface::Size &size)
矩形のサイズを与えられたsize に設定します。左上の角は移動しません。
size()、setWidth() およびsetHeight()も参照 。
void Rect::setTop(Qul::PlatformInterface::coord_t y)
矩形の上辺を、与えられたy 座標に設定します。高さを変更することはできますが、矩形の下辺を変更することはありません。
setY() と同等。
void Rect::setTopLeft(const Qul::PlatformInterface::Point &position)
矩形の左上隅を、与えられたposition に設定します。サイズを変更することはできますが、矩形の右下隅を変更することはありません。
topLeft() およびmoveTopLeft()も参照 。
void Rect::setTopRight(const Qul::PlatformInterface::Point &position)
矩形の右上隅を、与えられたposition に設定します。サイズを変更することはできますが、矩形の左下隅を変更することはありません。
topRight() およびmoveTopRight()も参照 。
void Rect::setWidth(Qul::PlatformInterface::coord_t width)
矩形の幅を、与えられたwidth に設定する。右端は変更されますが、左端は変更されません。
void Rect::setX(Qul::PlatformInterface::coord_t x)
矩形の左端を、与えられたx 座標に設定します。幅を変更することはできますが、矩形の右端を変更することはありません。
setLeft() と同等。
x()、setY() およびsetTopLeft()も参照 。
void Rect::setY(Qul::PlatformInterface::coord_t y)
矩形の上辺を、与えられたy 座標に設定します。高さを変更することはできますが、矩形の下辺を変更することはありません。
setTop() と同等。
y()、setX() およびsetTopLeft()も参照 。
Qul::PlatformInterface::Size Rect::size() const
矩形のサイズを返します。
setSize()、width() およびheight()も参照 。
Qul::PlatformInterface::coord_t Rect::top() const
矩形の上辺の y 座標を返す。y() と同等。
setTop()、topLeft() およびtopRight()も参照 。
Qul::PlatformInterface::Point Rect::topLeft() const
矩形の左上隅の位置を返します。
setTopLeft()、top() およびleft()も参照 。
Qul::PlatformInterface::Point Rect::topRight() const
矩形の右上隅の位置を返す。
Qt との互換性のため、この関数は Point(left() +width() -1,top()) を返すことに注意してください。
setTopRight(),top(),right()も参照してください 。
void Rect::translate(const Qul::PlatformInterface::Point &offset)
矩形offset.x() を x 軸方向に、offset.y() を y 軸方向に、現在の位置から相対的に移動する。
これはオーバーロードされた関数です。
void Rect::translate(Qul::PlatformInterface::coord_t dx, Qul::PlatformInterface::coord_t dy)
矩形を、 現在の位置を基準に、 x 軸に沿っ てdx に、 y 軸に沿っ てdy に移動 さ せます。正の値を指定すると、矩形は右と下に移動します。
これはオーバーロードされた関数です。
moveTopLeft()、moveTo()、translated()も参照 。
Qul::PlatformInterface::Rect Rect::translated(const Qul::PlatformInterface::Point &offset) const
offset.x() を x 軸に沿って、offset.y() を y 軸に沿って、現在の位置から相対的に変換した矩形のコピーを返します。
これはオーバーロードされた関数です。
translate()も参照してください 。
Qul::PlatformInterface::Rect Rect::translated(Qul::PlatformInterface::coord_t dx, Qul::PlatformInterface::coord_t dy) const
現在の位置を基準に、x 軸に沿ってdx 、y 軸に沿ってdy に移動した矩形のコピーを返します。正の値を指定すると、矩形は右と下に移動します。
これはオーバーロードされた関数です。
translate()も参照してください 。
Qul::PlatformInterface::Rect Rect::transposed() const
幅と高さを交換した矩形のコピーを返します。
Qul::PlatformInterface::Size::transposed()も参照 ください。
Qul::PlatformInterface::Rect Rect::united(const Qul::PlatformInterface::Rect &rectangle) const
この矩形と与えられたrectangle の外接矩形を返します。

intersected()も参照してください 。
Qul::PlatformInterface::coord_t Rect::width() const
矩形の幅を返します。
setWidth()、height() およびsize()も参照 。
Qul::PlatformInterface::coord_t Rect::x() const
矩形の左端の x 座標を返す。left() と同等。
Qul::PlatformInterface::coord_t Rect::y() const
矩形の上辺の y 座標を返す。top() と同等。
Qul::PlatformInterface::Rect Rect::operator&(const Qul::PlatformInterface::Rect &rectangle) const
この矩形と与えられたrectangle との交点を返します。交点がない場合は空の矩形を返します。
operator&=() およびintersected()も参照してください 。
Qul::PlatformInterface::Rect &Rect::operator&=(const Qul::PlatformInterface::Rect &rectangle)
この矩形を、与えられたrectangle と交差させる。
intersected() およびoperator&()も参照 。
Qul::PlatformInterface::Rect Rect::operator|(const Qul::PlatformInterface::Rect &rectangle) const
この矩形と与えられたrectangle の外接矩形を返します。
operator|=() およびunited()も参照 。
Qul::PlatformInterface::Rect &Rect::operator|=(const Qul::PlatformInterface::Rect &rectangle)
この矩形を、与えられたrectangle と結合する。
関連する非会員
bool operator!=(const Qul::PlatformInterface::Rect &r1, const Qul::PlatformInterface::Rect &r2)
長方形r1 r2 が異なる場合はtrue を返し、そうでない場合はfalse を返す。
bool operator==(const Qul::PlatformInterface::Rect &r1, const Qul::PlatformInterface::Rect &r2)
長方形r1 r2 が等しい場合はtrue を返し、そうでない場合はfalse を返します。
特定の Qt ライセンスの下で利用可能です。
詳細はこちら。