AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
SkiaPath.hpp
1/*
2Copyright (C) 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_SKIAPATH_H
17#define AEONGUI_SKIAPATH_H
18#include "aeongui/Path.hpp"
19#include <include/core/SkPath.h>
20
21namespace AeonGUI
22{
27 class SkiaPath : public Path
28 {
29 public:
30 SkiaPath();
35 void Construct ( const std::vector<DrawType>& aCommands, size_t aPathDataHint = 0 ) final;
41 void Construct ( const DrawType* aCommands, size_t aCommandCount, size_t aPathDataHint = 0 ) final;
42 ~SkiaPath();
46 const SkPath& GetSkPath() const;
47 DLL double GetTotalLength() const final;
48 PathPoint GetPointAtLength ( double aDistance ) const final;
49 bool IsClosed() const final;
50 private:
51 SkPath mPath;
52 };
53}
54#endif
Abstract base class for renderable path data.
Definition Path.hpp:40
void Construct(const std::vector< DrawType > &aCommands, size_t aPathDataHint=0) final
Build the Skia path from a vector of draw commands.
Definition SkiaPath.cpp:31
double GetTotalLength() const final
Compute the total arc length of the path.
Definition SkiaPath.cpp:248
PathPoint GetPointAtLength(double aDistance) const final
Get the position and tangent angle at a distance along the path.
Definition SkiaPath.cpp:260
bool IsClosed() const final
Check whether the path contains a close-path command.
Definition SkiaPath.cpp:290
const SkPath & GetSkPath() const
Access the underlying Skia path object.
Definition SkiaPath.cpp:26
Result of querying a point along a path.
Definition Path.hpp:28