2 #include <Multimedia/Image.h>
3 #include <Multimedia/Font.h>
4 #include <Framework/BmpFont.h>
5 #include <Framework/Anime.h>
15 virtual void Draw(
int X座標,
int Y座標,
int 幅,
int 高さ)
const = 0;
19 class BmpFrame :
public IFrame
30 bool Make( ImagePack *外枠 , Image *内側スキン =
nullptr )
34 if( 外枠->GetSize() != 9 )
return false;
36 if( 内側スキン ==
nullptr )
38 this->skinn = 外枠[0][4];
47 this->frameWidth = 外枠->GetWidth();
48 this->frameHeight = 外枠->GetHeight();
54 void Draw(
int X座標,
int Y座標,
int 幅,
int 高さ)
const
57 const int xA = X座標 + this->frameWidth;
58 const int xB = X座標 - this->frameWidth + 幅;
59 const int yA = Y座標 + this->frameHeight;
60 const int yB = Y座標 - this->frameHeight + 高さ;
63 skinn->
DrawExtend(X座標 + 6, Y座標 + 6, X座標 + 幅 - 6, Y座標 + 高さ - 6);
66 frame[0][3]->DrawExtend(X座標, yA, xA, yB);
67 frame[0][5]->DrawExtend(xB, yA, xB + this->frameWidth, yB);
69 frame[0][1]->DrawExtend(xA, Y座標, xB, yA);
70 frame[0][7]->DrawExtend(xA, yB, xB, yB + this->frameHeight);
73 frame[0][0]->Draw(X座標, Y座標);
74 frame[0][2]->Draw(X座標 + 幅 - this->frameWidth, Y座標);
75 frame[0][6]->Draw(X座標, Y座標 + 高さ - this->frameHeight);
76 frame[0][8]->Draw(X座標 + 幅 - this->frameWidth, Y座標 + 高さ - this->frameHeight);
void Draw(int X座標, int Y座標, int 幅, int 高さ) const
矩形のフレームを描画.
Definition: BmpFrame.h:55
bool Make(ImagePack *外枠, Image *内側スキン=nullptr)
フレームを作成する.
Definition: BmpFrame.h:32
bool DrawExtend(int X座標A, int Y座標A, int X座標B, int Y座標B) const
指定矩形内に描画.
Definition: Image.h:233