SDXFrameWork 0.12 SDXFrameWork

- Main Page
- Related Pages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
SDX::IFrame Class Referenceabstract

描画用枠のインターフェース. More...

`#include <IFrame.h>`

Inherited by SDX::BmpFrame.

## Public Member Functions
virtual void | Draw (const Rect &領域, const Color &描画色=Color::White) const =0
| 枠を描画. More...

## Detailed Description

描画用枠のインターフェース.

//Copyright © 2014 SDXFramework
//[License]GNU Affero General Public License, version 3
//[Contact]http://sourceforge.jp/projects/dxframework/
//初期化を行い何かキーを押すと終了する
bool SampleBmpFrame()
{
using namespace SDX;
System::Initialise("sample", 640, 480);
Screen::SetBackColor(Color::White);
//BmpFrame用の画像を読み込む
ImagePack frameImageA("data/pipo-WindowBase001.png", 9, 3, 3);
ImagePack frameImageB("data/pipo-WindowBase004.png", 9, 3, 3);
//BmpFrameを作成
BmpFrame bmpFrameA(&frameImageA);
BmpFrame bmpFrameB(&frameImageB);
Rect 四角(220,140,200,200);
double 大きさ = 1.0;
while (System::Update())
{
bmpFrameA.Draw({ 0, 0, Input::mouse.x, Input::mouse.y });
bmpFrameB.Draw(四角);
if (Input::key.Up.hold){ 四角.Move(0, -5); }
if (Input::key.Down.hold){ 四角.Move(0, 5); }
if (Input::key.Left.hold){ 四角.Move(-5, 0); }
if (Input::key.Right.hold){ 四角.Move(5, 0); }
if (Input::key.Return.on){ break; }//Enterで終了
}
System::End();
return true;
}

## Member Function Documentation

virtual void SDX::IFrame::Draw | ( | const Rect & | 領域,
|  | const Color & | 描画色 = `Color::White`
| ) |  | const
| pure virtual

枠を描画.

Implemented in SDX::BmpFrame.