AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
AeonGUI::SkiaPath Class Reference

Skia-based Path implementation. More...

#include </d/a/AeonGUI/AeonGUI/include/aeongui/SkiaPath.hpp>

Inheritance diagram for AeonGUI::SkiaPath:
[legend]
Collaboration diagram for AeonGUI::SkiaPath:
[legend]

Public Member Functions

void Construct (const std::vector< DrawType > &aCommands, size_t aPathDataHint=0) final
 Build the Skia path from a vector of draw commands.
void Construct (const DrawType *aCommands, size_t aCommandCount, size_t aPathDataHint=0) final
 Build the Skia path from a raw array of draw commands.
const SkPath & GetSkPath () const
 Access the underlying Skia path object.
double GetTotalLength () const final
 Compute the total arc length of the path.
PathPoint GetPointAtLength (double aDistance) const final
 Get the position and tangent angle at a distance along the path.
bool IsClosed () const final
 Check whether the path contains a close-path command.
Public Member Functions inherited from AeonGUI::Path
virtual ~Path ()=0
 Virtual destructor.

Detailed Description

Skia-based Path implementation.

Wraps an SkPath and is constructed from AeonGUI draw commands.

Member Function Documentation

◆ Construct() [1/2]

void AeonGUI::SkiaPath::Construct ( const DrawType * aCommands,
size_t aCommandCount,
size_t aPathDataHint = 0 )
finalvirtual

Build the Skia path from a raw array of draw commands.

Parameters
aCommandsPointer to the command array.
aCommandCountNumber of commands.
aPathDataHintPre-computed size hint (unused by Skia backend).

Implements AeonGUI::Path.

◆ Construct() [2/2]

void AeonGUI::SkiaPath::Construct ( const std::vector< DrawType > & aCommands,
size_t aPathDataHint = 0 )
finalvirtual

Build the Skia path from a vector of draw commands.

Parameters
aCommandsThe draw command sequence.
aPathDataHintPre-computed size hint (unused by Skia backend).

Implements AeonGUI::Path.

◆ GetPointAtLength()

PathPoint AeonGUI::SkiaPath::GetPointAtLength ( double aDistance) const
finalvirtual

Get the position and tangent angle at a distance along the path.

Parameters
aDistanceDistance from the path start in user units.
Returns
PathPoint with x, y, and tangent angle.

Implements AeonGUI::Path.

◆ GetSkPath()

const SkPath & AeonGUI::SkiaPath::GetSkPath ( ) const

Access the underlying Skia path object.

Returns
Const reference to the internal SkPath.

◆ GetTotalLength()

double AeonGUI::SkiaPath::GetTotalLength ( ) const
finalvirtual

Compute the total arc length of the path.

Returns
Total length in user units.

Implements AeonGUI::Path.

◆ IsClosed()

bool AeonGUI::SkiaPath::IsClosed ( ) const
finalvirtual

Check whether the path contains a close-path command.

Returns
true if the path is closed.

Implements AeonGUI::Path.


The documentation for this class was generated from the following files:
  • /d/a/AeonGUI/AeonGUI/include/aeongui/SkiaPath.hpp
  • /d/a/AeonGUI/AeonGUI/core/SkiaPath.cpp