DDraceNetwork Documentation
Loading...
Searching...
No Matches
graph.h
Go to the documentation of this file.
1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3
4#ifndef ENGINE_CLIENT_GRAPH_H
5#define ENGINE_CLIENT_GRAPH_H
6
7#include <base/color.h>
8
10
11#include <cstddef>
12
13class IGraphics;
14class ITextRender;
15
16class CGraph
17{
18private:
19 class CEntry
20 {
21 public:
23 float m_Value;
26 };
29 float m_Average;
36
37 void RenderDataLines(IGraphics *pGraphics, float x, float y, float w, float h);
38
39public:
41
42 void Init(float Min, float Max);
43 void SetMin(float Min);
44 void SetMax(float Max);
45
47 void Add(float Value, ColorRGBA Color = ColorRGBA(1.0f, 1.0f, 1.0f, 0.75f));
48 void InsertAt(int64_t Time, float Value, ColorRGBA Color = ColorRGBA(1.0f, 1.0f, 1.0f, 0.75f));
49 void Render(IGraphics *pGraphics, ITextRender *pTextRender, float x, float y, float w, float h, const char *pDescription);
50};
51
52#endif
Definition graph.h:20
int64_t m_Time
Definition graph.h:22
ColorRGBA m_Color
Definition graph.h:24
float m_Value
Definition graph.h:23
bool m_ApplyColor
Definition graph.h:25
Definition graph.h:17
float m_Average
Definition graph.h:29
void InsertAt(int64_t Time, float Value, ColorRGBA Color=ColorRGBA(1.0f, 1.0f, 1.0f, 0.75f))
Definition graph.cpp:135
int64_t m_RenderedTotalTime
Definition graph.h:28
CEntry * m_pFirstScaled
Definition graph.h:27
float m_MaxRange
Definition graph.h:32
float m_MaxValue
Definition graph.h:31
float m_MinAxis
Definition graph.h:30
bool m_SummaryStats
Definition graph.h:35
float m_MaxAxis
Definition graph.h:30
void Render(IGraphics *pGraphics, ITextRender *pTextRender, float x, float y, float w, float h, const char *pDescription)
Definition graph.cpp:211
void Init(float Min, float Max)
Definition graph.cpp:18
void RenderDataLines(IGraphics *pGraphics, float x, float y, float w, float h)
Definition graph.cpp:163
void SetMin(float Min)
Definition graph.cpp:28
CDynamicRingBuffer< CEntry > m_Entries
Definition graph.h:33
void Scale(int64_t WantedTotalTime)
Definition graph.cpp:38
void Add(float Value, ColorRGBA Color=ColorRGBA(1.0f, 1.0f, 1.0f, 0.75f))
Definition graph.cpp:130
float m_MinRange
Definition graph.h:32
int m_Precision
Definition graph.h:34
void SetMax(float Max)
Definition graph.cpp:33
float m_MinValue
Definition graph.h:31
Definition color.h:198
Definition graphics.h:188
Definition textrender.h:280
Definition vmath.h:15