1
0
forked from 0ad/0ad
0ad/source/graphics/Canvas2D.h
vladislavbelov 2f3837e0b5 Adds Canvas2D to encapsulate low level GL calls for 2D rendering.
Implements DrawLine for charts.

Differential Revision: https://code.wildfiregames.com/D4024
This was SVN commit r25588.
2021-05-28 16:35:57 +00:00

36 lines
1.0 KiB
C++

/* Copyright (C) 2021 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* 0 A.D. is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INCLUDED_CANVAS2D
#define INCLUDED_CANVAS2D
#include "maths/Vector2D.h"
#include <vector>
struct CColor;
// Encapsulates 2D drawing functionality to hide and optimize
// low level API calls.
class CCanvas2D
{
public:
void DrawLine(const std::vector<CVector2D>& points, const float width, const CColor& color);
};
#endif // INCLUDED_CANVAS2D