Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CChart.h
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | protected: | ||||
std::vector<CPos> m_TextPositions; | std::vector<CPos> m_TextPositions; | ||||
bool m_EqualX, m_EqualY; | bool m_EqualX, m_EqualY; | ||||
// Settings | // Settings | ||||
CGUIColor m_AxisColor; | CGUIColor m_AxisColor; | ||||
float m_AxisWidth; | float m_AxisWidth; | ||||
float m_BufferZone; | float m_BufferZone; | ||||
CStrW m_Font; | CStrIntern m_Font; | ||||
CStrW m_FormatX; | CStrW m_FormatX; | ||||
CStrW m_FormatY; | CStrW m_FormatY; | ||||
CGUIList m_SeriesColor; | CGUIList m_SeriesColor; | ||||
CGUISeries m_SeriesSetting; | CGUISeries m_SeriesSetting; | ||||
EAlign m_TextAlign; | EAlign m_TextAlign; | ||||
private: | private: | ||||
/** | /** | ||||
* Helper functions | * Helper functions | ||||
*/ | */ | ||||
void DrawLine(const CShaderProgramPtr& shader, const CGUIColor& color, const std::vector<float>& vertices) const; | void DrawLine(const CShaderProgramPtr& shader, const CGUIColor& color, const std::vector<float>& vertices) const; | ||||
// Draws the triangle sequence so that the each next triangle has a common edge with the previous one. | // Draws the triangle sequence so that the each next triangle has a common edge with the previous one. | ||||
// If we need to draw n triangles, we need only n + 2 points. | // If we need to draw n triangles, we need only n + 2 points. | ||||
void DrawTriangleStrip(const CShaderProgramPtr& shader, const CGUIColor& color, const std::vector<float>& vertices) const; | void DrawTriangleStrip(const CShaderProgramPtr& shader, const CGUIColor& color, const std::vector<float>& vertices) const; | ||||
// Represents axes as triangles and draws them with DrawTriangleStrip. | // Represents axes as triangles and draws them with DrawTriangleStrip. | ||||
void DrawAxes(const CShaderProgramPtr& shader) const; | void DrawAxes(const CShaderProgramPtr& shader) const; | ||||
CSize AddFormattedValue(const CStrW& format, const float value, const CStrW& font, const float buffer_zone); | CSize AddFormattedValue(const CStrW& format, const float value, const CStrIntern& font, const float buffer_zone); | ||||
void UpdateBounds(); | void UpdateBounds(); | ||||
}; | }; | ||||
#endif // INCLUDED_CCHART | #endif // INCLUDED_CCHART |
Wildfire Games · Phabricator