| 133 | } |
| 134 | |
| 135 | void CGraph::InsertAt(int64_t Time, float Value, ColorRGBA Color) |
| 136 | { |
| 137 | CEntry *pEntry = m_Entries.Allocate(sizeof(CEntry)); |
| 138 | pEntry->m_Time = Time; |
| 139 | pEntry->m_Value = Value; |
| 140 | pEntry->m_Color = Color; |
| 141 | |
| 142 | // Determine whether the line (pPrev, pEntry) has different |
| 143 | // vertex colors than the line (pPrevPrev, pPrev). |
| 144 | CEntry *pPrev = m_Entries.Prev(pEntry); |
| 145 | if(pPrev == nullptr) |
| 146 | { |
| 147 | pEntry->m_ApplyColor = true; |
| 148 | } |
| 149 | else |
| 150 | { |
| 151 | CEntry *pPrevPrev = m_Entries.Prev(pPrev); |
| 152 | if(pPrevPrev == nullptr) |
| 153 | { |
| 154 | pEntry->m_ApplyColor = true; |
| 155 | } |
| 156 | else |
| 157 | { |
| 158 | pEntry->m_ApplyColor = Color != pPrev->m_Color || pPrev->m_Color != pPrevPrev->m_Color; |
| 159 | } |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | void CGraph::RenderDataLines(IGraphics *pGraphics, float x, float y, float w, float h) |
| 164 | { |
no test coverage detected