KisaragiLibrary
 
読み取り中…
検索中…
一致する文字列を見つけられません
ImgGraph クラス

画像描画クラス [詳解]

#include <ImgComponent.hpp>

ImgGraph の継承関係図
Kisaragi_Lib::ImgComponent::ImgBase Kisaragi_Lib::ComponentBase

公開メンバ関数

 ImgGraph ()
 
void SetImg (string _imgKey)
 
void SetImg (string _imgKey, string _imgPass)
 
int GetImg ()
 
void Draw (Matrix2D _drawMat) override
 
void Draw () override
 
ImgGraphGetThisComponent () override
 
- 基底クラス Kisaragi_Lib::ImgComponent::ImgBase に属する継承公開メンバ関数
string Layer () const
 
void ChangeLayer (string _layerName, bool _layerCreate)
 
void Start () override
 
virtual ~ImgBase ()
 
- 基底クラス Kisaragi_Lib::ComponentBase に属する継承公開メンバ関数
void GameObj (GameObjBase *_obj)
 
GameObjBaseGameObj ()
 
string ID () const
 
void ID (string _id)
 
virtual ~ComponentBase ()
 

公開変数類

Vector2D< bool > isTurn {0,0}
 要素に応じて画像の反転を行います
 
ReadOnly< Vector2D< float > > Size { &size }
 画像サイズ(読み取り専用)
 
Accessor< bool > Trans { &trans }
 画像を透過するか否か
 

限定公開変数類

int img
 
Vector2D< float > size
 
Vector2D< float > imgCentor
 
bool trans = true
 
- 基底クラス Kisaragi_Lib::ImgComponent::ImgBase に属する継承限定公開変数類
string layer
 
- 基底クラス Kisaragi_Lib::ComponentBase に属する継承限定公開変数類
string id
 
string name
 
GameObjBasegameObj
 

詳解

画像描画クラス

構築子と解体子

◆ ImgGraph()

Kisaragi_Lib::ImgComponent::ImgGraph::ImgGraph ( )
177 : ImgBase(),img(0)
178 {
179
180 }
int img
Definition ImgComponent.hpp:75

関数詳解

◆ SetImg() [1/2]

void Kisaragi_Lib::ImgComponent::ImgGraph::SetImg ( string _imgKey)
183 {
184 img = Resource::GetImgResource().GetImg(_imgKey);
185 GetGraphSizeF(img, &size.x, &size.y);
186 imgCentor = (size / 2);
187 }
Vector2D< float > size
Definition ImgComponent.hpp:76
Vector2D< float > imgCentor
Definition ImgComponent.hpp:77

◆ SetImg() [2/2]

void Kisaragi_Lib::ImgComponent::ImgGraph::SetImg ( string _imgKey,
string _imgPass )
190 {
191 Resource::GetImgResource().Add(_imgKey, _imgPass);
192 SetImg(_imgKey);
193 }
void SetImg(string _imgKey)
Definition ImgComponent.cpp:182

◆ GetImg()

int Kisaragi_Lib::ImgComponent::ImgGraph::GetImg ( )
196 {
197 return img;
198 }

◆ Draw() [1/2]

void Kisaragi_Lib::ImgComponent::ImgGraph::Draw ( Matrix2D _drawMat)
overridevirtual

Kisaragi_Lib::ImgComponent::ImgBaseを再実装しています。

214 {
215 DrawRotaGraph3
216 (
217 _drawMat.Position().x, _drawMat.Position().y,
218 imgCentor.x, imgCentor.y, //画像の回転中心
219 _drawMat.Scale().x, _drawMat.Scale().y,
220 _drawMat.Rotation(),
221 img,
222 trans,
223 isTurn.x, isTurn.y
224 );
225 }
Vector2D< bool > isTurn
要素に応じて画像の反転を行います
Definition ImgComponent.hpp:84
bool trans
Definition ImgComponent.hpp:78

◆ Draw() [2/2]

void Kisaragi_Lib::ImgComponent::ImgGraph::Draw ( )
overridevirtual

Kisaragi_Lib::ImgComponent::ImgBaseを再実装しています。

201 {
202 DrawRotaGraph3
203 (
204 gameObj->transform.position.x, gameObj->transform.position.y,
205 imgCentor.x, imgCentor.y, //画像の回転中心
206 gameObj->transform.scale.x, gameObj->transform.scale.y,
207 gameObj->transform.rotation.radian,
208 img, isTurn.x, isTurn.y
209 );
210 }
GameObjBase * gameObj
Definition ComponentBase.hpp:28

◆ GetThisComponent()

ImgGraph * Kisaragi_Lib::ImgComponent::ImgGraph::GetThisComponent ( )
inlineoverridevirtual

Kisaragi_Lib::ComponentBaseを再実装しています。

106 {
107 return this;
108 }

メンバ詳解

◆ img

int Kisaragi_Lib::ImgComponent::ImgGraph::img
protected

◆ size

Vector2D<float> Kisaragi_Lib::ImgComponent::ImgGraph::size
protected

◆ imgCentor

Vector2D<float> Kisaragi_Lib::ImgComponent::ImgGraph::imgCentor
protected

◆ trans

bool Kisaragi_Lib::ImgComponent::ImgGraph::trans = true
protected

◆ isTurn

Vector2D<bool> Kisaragi_Lib::ImgComponent::ImgGraph::isTurn {0,0}

要素に応じて画像の反転を行います

84{0,0};

◆ Size

ReadOnly<Vector2D<float> > Kisaragi_Lib::ImgComponent::ImgGraph::Size { &size }

画像サイズ(読み取り専用)

88{ &size };

◆ Trans

Accessor<bool> Kisaragi_Lib::ImgComponent::ImgGraph::Trans { &trans }

画像を透過するか否か

92{ &trans };

このクラス詳解は次のファイルから抽出されました: