MyGUI
3.4.1
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
MyGUIEngine
include
MyGUI_PolygonalSkin.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_POLYGONAL_SKIN_H_
8
#define MYGUI_POLYGONAL_SKIN_H_
9
10
#include "
MyGUI_Prerequest.h
"
11
#include "
MyGUI_Types.h
"
12
#include "
MyGUI_ISubWidgetRect.h
"
13
#include "
MyGUI_RenderFormat.h
"
14
15
namespace
MyGUI
16
{
17
18
class
MYGUI_EXPORT
PolygonalSkin
:
19
public
ISubWidgetRect
20
{
21
MYGUI_RTTI_DERIVED
(
PolygonalSkin
)
22
23
public
:
24
PolygonalSkin
();
25
27
void
setPoints(
const
std::vector<FloatPoint>& _points);
28
30
void
setWidth(
float
_width);
31
33
void
setStroke(
size_t
_value);
34
35
void
setAlpha(
float
_alpha)
override
;
36
37
void
setVisible(
bool
_visible)
override
;
38
39
void
setStateData(
IStateInfo
* _data)
override
;
40
41
void
createDrawItem(
ITexture
* _texture,
ILayerNode
* _node)
override
;
42
void
destroyDrawItem()
override
;
43
44
// метод для отрисовки себя
45
void
doRender()
override
;
46
47
/*internal:*/
48
void
_updateView()
override
;
49
void
_correctView()
override
;
50
51
void
_setAlign(
const
IntSize
& _oldsize)
override
;
52
53
void
_setUVSet(
const
FloatRect
& _rect)
override
;
54
void
_setColour(
const
Colour
& _value)
override
;
55
56
protected
:
57
void
_rebuildGeometry();
58
FloatPoint
_getPerpendicular(
const
FloatPoint
& _point1,
const
FloatPoint
& _point2)
const
;
59
// line from center of p1-p2 line to p3
60
FloatPoint
_getMiddleLine(
const
FloatPoint
& _point1,
const
FloatPoint
& _point2,
const
FloatPoint
& _point3)
const
;
61
62
private
:
63
bool
mGeometryOutdated;
64
65
float
mLineWidth;
66
size_t
mLineStroke;
67
std::vector<FloatPoint> mLinePoints;
68
float
mLineLength;
69
70
std::vector<FloatPoint> mResultVerticiesPos;
71
std::vector<FloatPoint> mResultVerticiesUV;
72
73
size_t
mVertexCount;
74
75
bool
mEmptyView;
76
77
VertexColourType
mVertexFormat;
78
uint32
mCurrentColour;
79
80
FloatRect
mCurrentTexture;
81
IntCoord
mCurrentCoord;
82
83
ILayerNode
* mNode;
84
RenderItem
* mRenderItem;
85
};
86
87
}
// namespace MyGUI
88
89
#endif
// MYGUI_POLYGONAL_SKIN_H_
MyGUI_ISubWidgetRect.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition:
MyGUI_Platform.h:89
MyGUI_Prerequest.h
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition:
MyGUI_RTTI.h:48
MyGUI_RenderFormat.h
MyGUI_Types.h
MyGUI::ILayerNode
Definition:
MyGUI_ILayerNode.h:30
MyGUI::IStateInfo
Definition:
MyGUI_IStateInfo.h:18
MyGUI::ISubWidgetRect
Definition:
MyGUI_ISubWidgetRect.h:19
MyGUI::ITexture
Definition:
MyGUI_ITexture.h:28
MyGUI::PolygonalSkin
Definition:
MyGUI_PolygonalSkin.h:20
MyGUI::RenderItem
Definition:
MyGUI_RenderItem.h:23
MyGUI
Definition:
MyGUI_ActionController.h:15
MyGUI::uint32
uint32_t uint32
Definition:
MyGUI_Types.h:47
MyGUI::Colour
Definition:
MyGUI_Colour.h:17
MyGUI::VertexColourType
Definition:
MyGUI_RenderFormat.h:16
MyGUI::types::TCoord< int >
MyGUI::types::TPoint< float >
MyGUI::types::TRect< float >
MyGUI::types::TSize< int >
Generated by
1.9.4