SDXFrameWork 0.09 SDXFrameWork

- Main Page
- Related Pages
- Classes

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
SDX::SpImageS Class Reference

ImagePackスプライト. More...

`#include <Sprite.h>`

Inherits SDX::ISprite.

## Public Member Functions
| SpImageS (const ImagePack *描画ImagePack)
void | SetIndex (int コマ番号)
int | GetIndex ()
void | Draw (const Point &座標, bool Cameraフラグ) override
| ISpriteを描画する. More...
void | MoveGap (double X移動量, double Y移動量)
| Shapeとの相対座標を移動. More...
void | SetGap (const Point &座標)
| Shapeとの相対座標を指定. More...
void | SetZoom (double X拡大率, double Y拡大率)
| 表示倍率を設定. More...
void | MultiZoom (double 倍率)
| 拡大率を掛け算する. More...
void | MultiZoom (double X倍率, double Y倍率)
| 縦横別で拡大率を掛け算する. More...
double | GetZoomX ()
| 横方向の表示倍率を取得. More...
double | GetZoomY ()
| 縦方向の表示倍率を取得. More...
void | SetTurn (bool 反転フラグ)
| 左右反転フラグを設定. More...
bool | GetTurn ()
| 左右反転フラグを取得. More...
double | GetAngle ()
| 表示角度を取得. More...
void | SetAngle (double 角度)
| 表示角度を設定. More...
void | Rotate (double 回転する角度)
| 回転させる. More...
Color | GetColor ()
| 描画色を取得. More...
void | SetColor (Color 描画色)
| 透明度を0～255で設定. More...
virtual void | AnimeUpdate ()
| 説明. More...

## Public Attributes
bool | isTurn = false

## Protected Attributes
double | zoomX = 1
double | zoomY = 1
double | gapX = 0
double | gapY = 0
double | axisX = 0
double | axisY = 0
Color | color = {255,255,255,255}
double | angle = 0

## Detailed Description

ImagePackスプライト.

//©SDXFramework http://sourceforge.jp/projects/dxframework/
//🍣初期化を行い何かキーを押すと終了する
//\todo 未実装
bool SampleModel()
{
using namespace SDX;
System::Initialise("sample", 600, 400);
/*
Camera camera(300, 200, 1);
camera.SetActive();
Image image("image.bmp");
Model model(new Point(300, 200), new SpImage(&image));
Model model2(new Point(550, 350), new SpImage(&image));
model2.SetIsCamera(false);
while (System::Update())
{
model.Draw();
model2.Draw();
camera.Update();
if (Input::pad.Down.hold ) Camera::Now()->MoveForcus(0, 5);
if (Input::pad.Up.hold ) Camera::Now()->MoveForcus(0, -5);
if (Input::pad.Right.hold ) Camera::Now()->MoveForcus(5, 0);
if (Input::pad.Left.hold ) Camera::Now()->MoveForcus(-5, 0);
if (Input::key.Z.hold) Camera::Now()->SetZoomForcus(2);
if (Input::key.X.hold) Camera::Now()->SetZoomForcus(0.5);
if (Input::key.C.hold) Camera::Now()->SetZoomForcus(1);
if (Input::key.Return.on) break;//Enterで終了
}
System::End();
*/
return true;
}

## Member Function Documentation

void SDX::SpImageS::Draw | ( | const Point & | 座標,
|  | bool | カメラフラグ
| ) |  |
| override virtual

ISpriteを描画する.

Implements SDX::ISprite.

void SDX::ISprite::MoveGap | ( | double | X移動量,
|  | double | Y移動量
| ) |  |
| inherited

Shapeとの相対座標を移動.

void SDX::ISprite::SetGap | ( | const Point & | 座標 | ) |
| inherited

Shapeとの相対座標を指定.

void SDX::ISprite::SetZoom | ( | double | X拡大率,
|  | double | Y拡大率
| ) |  |
| inherited

表示倍率を設定.

void SDX::ISprite::MultiZoom | ( | double | 倍率 | ) |
| inherited

拡大率を掛け算する.

void SDX::ISprite::MultiZoom | ( | double | X倍率,
|  | double | Y倍率
| ) |  |
| inherited

縦横別で拡大率を掛け算する.

double SDX::ISprite::GetZoomX | ( |  | ) |
| inherited

横方向の表示倍率を取得.

double SDX::ISprite::GetZoomY | ( |  | ) |
| inherited

縦方向の表示倍率を取得.

void SDX::ISprite::SetTurn | ( | bool | 反転フラグ | ) |
| inherited

左右反転フラグを設定.

bool SDX::ISprite::GetTurn | ( |  | ) |
| inherited

左右反転フラグを取得.

double SDX::ISprite::GetAngle | ( |  | ) |
| inherited

表示角度を取得.

void SDX::ISprite::SetAngle | ( | double | 角度 | ) |
| inherited

表示角度を設定.

void SDX::ISprite::Rotate | ( | double | 回転する角度 | ) |
| inherited

回転させる.

Color SDX::ISprite::GetColor | ( |  | ) |
| inherited

描画色を取得.

void SDX::ISprite::SetColor | ( | Color | 描画色 | ) |
| inherited

透明度を0～255で設定.

virtual void SDX::ISprite::AnimeUpdate | ( |  | ) |
| virtual inherited

説明.

Reimplemented in SDX::SpAnime.