MyGUI 3.5.3
MyGUI_TileRect.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_TILE_RECT_H_
8#define MYGUI_TILE_RECT_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_XmlDocument.h"
12#include "MyGUI_Types.h"
14#include "MyGUI_ResourceSkin.h"
15#include "MyGUI_RenderFormat.h"
16
17namespace MyGUI
18{
19
20 class RenderItem;
21
22 class MYGUI_EXPORT TileRect : public ISubWidgetRect
23 {
24 MYGUI_RTTI_DERIVED(TileRect)
25
26 public:
27 TileRect();
28
29 void setAlpha(float _alpha) override;
30
31 void setVisible(bool _visible) override;
32
33 void createDrawItem(ITexture* _texture, ILayerNode* _node) override;
34 void destroyDrawItem() override;
35
36 void doRender() override;
37
38 void setStateData(IStateInfo* _data) override;
39
40 /*internal:*/
41 void _updateView() override;
42 void _correctView() override;
43
44 void _setAlign(const IntSize& _oldsize) override;
45
46 void _setUVSet(const FloatRect& _rect) override;
47 void _setColour(const Colour& _value) override;
48
49 protected:
50 bool mEmptyView{false};
51
52 VertexColourType mVertexFormat;
53 uint32 mCurrentColour{0xFFFFFFFF};
54
55 FloatRect mCurrentTexture;
56 IntCoord mCurrentCoord;
57
58 ILayerNode* mNode{nullptr};
59 RenderItem* mRenderItem{nullptr};
60
61 IntSize mTileSize;
62 size_t mCountVertex;
63
64 float mRealTileWidth{0};
65 float mRealTileHeight{0};
66
67 float mTextureHeightOne{0};
68 float mTextureWidthOne{0};
69
70 bool mTileH{true};
71 bool mTileV{true};
72 };
73
74} // namespace MyGUI
75
76#endif // MYGUI_TILE_RECT_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:67
uint32_t uint32
Definition MyGUI_Types.h:47
types::TRect< float > FloatRect
Definition MyGUI_Types.h:33
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:35
types::TSize< int > IntSize
Definition MyGUI_Types.h:29