AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
CairoPath.hpp
1/*
2Copyright (C) 2019,2020,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGUI_CAIROPATH_H
17#define AEONGUI_CAIROPATH_H
18#include <cairo.h>
19#include "aeongui/CairoCanvas.hpp"
20#include "aeongui/Path.hpp"
21
22namespace AeonGUI
23{
29 class CairoPath : public Path
30 {
31 public:
37 void Construct ( const std::vector<DrawType>& aCommands ) final;
42 void Construct ( const DrawType* aCommands, size_t aCommandCount ) final;
48 const cairo_path_t* GetCairoPath() const;
49 private:
50 cairo_path_t mPath{};
51 std::vector<cairo_path_data_t> mPathData;
52 };
53}
54#endif
CairoPath()
Default constructor.
const cairo_path_t * GetCairoPath() const
Get the underlying Cairo path structure.
Definition CairoPath.cpp:187
~CairoPath()
Destructor. Frees path data.
void Construct(const std::vector< DrawType > &aCommands) final
Build the Cairo path from a vector of draw commands.
Definition CairoPath.cpp:192
Abstract base class for renderable path data.
Definition Path.hpp:32