![]() ![]() ![]()
|
SophiaFramework 2.2 |
#include <SFULine.hpp>
class SFULine : public AEELine;
typedef SFULine& SFULineRef; typedef SFULine* SFULinePtr; typedef SFULine** SFULineHandle; typedef const SFULine ConstSFULine; typedef const SFULine& ConstSFULineRef; typedef const SFULine* ConstSFULinePtr; typedef const SFULine** ConstSFULineHandle;
SFULine は線を表すクラスです。 線を操作するためのさまざまな関数が用意されています。 線を囲む長方形は格子点座標で表現されます。
| コンストラクタ/デストラクタ | ||
|---|---|---|
| public |
SFULine | SFULine クラスのコンストラクタです。 |
| public |
~SFULine | SFULine クラスのデストラクタです。 |
| パブリック変数 | ||
|---|---|---|
| public |
ex | 線の終了点の X 座標です。 |
| public |
ey | 線の終了点の Y 座標です。 |
| public |
sx | 線の開始点の X 座標です。 |
| public |
sy | 線の開始点の Y 座標です。 |
| パブリック関数 | ||
|---|---|---|
| public |
Inset | 線を両端から縮めます。 |
| public |
Offset | 線を移動します。 |
| public |
Origin | 線の開始点を設定/取得します。 |
| public |
Set | 線の開始点とサイズを設定します。 |
| public |
Terminal | 線の終了点を取得/設定します。 |
| public |
operator+ | 線を移動します。 |
| public |
operator- | 線を縮小したり移動したりします。 |
| public |
operator== | 等しい線であるか比較します。 |
[ public ] SFULine(Void);
[ public ]
SFULine(
ConstAEELineRef line // コピーする AEELine 構造体
);
[ public ]
SFULine(
SInt16 x // 開始点の X 座標
SInt16 y // 開始点の Y 座標
SInt16 dx // X 方向のサイズ
SInt16 dy // Y 方向のサイズ
);
[ public ]
SFULine(
ConstSFUPointRef point // 開始点
SInt16 dx // X 方向
SInt16 dy // Y 方向
);
[ public ]
SFULine(
ConstSFUPointRef point1 // 開始点
ConstSFUPointRef point2 // 終了点
);
SFULine のコンストラクタでは、 線の開始点とサイズまたは終了点を指定します。 サイズには負の数を指定することができます。
[ public ] ~SFULine(Void);
[ public ] SFULineRef Inset( SInt16 left // 左を縮めるサイズ SInt16 top // 右を縮めるサイズ SInt16 right // 上を縮めるサイズ SInt16 bottom // 下を縮めるサイズ );
[ public ] SFULineRef Inset( ConstSFUSizeRef size // 縮めるサイズ );
[ public ] SFULineRef Inset( SInt16 dx // 左右を縮めるサイズ SInt16 dy // 上下を縮めるサイズ );
[ public ] SFULineRef Inset( SInt16 d // 上下左右を縮めるサイズ );
自分自身を返します。
[ public ] SFULineRef Offset( SInt16 dx // 移動する X 座標のサイズ SInt16 dy // 移動する Y 座標のサイズ );
[ public ] SFULineRef Offset( ConstSFUPointRef point // 移動する方向 );
[ public ] SFULineRef Origin( SInt16 x // 開始点の X 座標 SInt16 y // 開始点の Y 座標 );
[ public ] SFULineRef Origin( ConstSFULineRef line // コピー元の線 );
[ public ] SFULineRef Origin( ConstSFUPointRef point // 開始点 );
[ public, const ] SFUPoint Origin(Void);
[ public ] SFULineRef Set( SInt16 x // 開始点の X 座標 SInt16 y // 開始点の Y 座標 SInt16 dx // X 方向のサイズ SInt16 dy // Y 方向のサイズ );
[ public ] SFULineRef Set( ConstSFUPointRef point // 開始点 SInt16 dx // X 方向のサイズ SInt16 dy // Y 方向のサイズ );
[ public ] SFULineRef Set( ConstSFUPointRef point1 // 開始点 ConstSFUPointRef point2 // 終了点 );
[ public ] ConstSFULineRef Terminal( SInt16 x // 終了点の X 座標 SInt16 y // 終了点の Y 座標 );
[ public ] ConstSFULineRef Terminal( ConstSFUPointRef point // 終了点の位置 );
[ public, const ] SFUPoint Terminal(Void);
[ public, friend ] Bool operator==( ConstSFULineRef line1 ConstSFULineRef line2 );
[ public, friend ] Bool operator!=( ConstSFULineRef line1 ConstSFULineRef line2 );
2 つの線が等しいかどうか比較します。 2 つの線の開始点と終了点がともに一致する場合のみ、 2 つの線は等しいと判定されます。
[ public, friend ] SFULine operator-( ConstSFULineRef line // 移動元の線 ConstSFUPointRef point // 移動する方向 );
SFULine から SFUPoint を減算すると、逆方向に移動します。 つまり SFUPoint を原点とするように移動します。
[ public, friend ] SFULine operator+( ConstSFULineRef line1 ConstSFULineRef line2 );
[ public, friend ] SFULine operator+( ConstSFULineRef line // 移動元の線 ConstSFUPointRef vector // 移動する方向 );
[ public ] SFULineRef operator+=( ConstSFUPointRef vector // 移動する方向 );
SFULine に SFUPoint を加算すると、その位置の分だけ線が移動します。
SFULine line1(0, 0, 10, 10); SFUPoint point(20, 20); line1 += point; // line1 = (20, 20, 30, 30) になります。
[ public ] SInt16 ex;
[ public ] SInt16 ey;
[ public ] SInt16 sx;
[ public ] SInt16 sy;
| Copyright(C) 2003-2004 Sophia Cradle Inc., All Rights Reserved. |
![]() ![]() ![]()
|