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

Abstract base class for renderable path data. More...

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

Inheritance diagram for AeonGUI::Path:
[legend]

Public Member Functions

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

Detailed Description

Abstract base class for renderable path data.

A Path is constructed from a sequence of DrawType commands and can be drawn by a Canvas implementation.

Member Function Documentation

◆ Construct() [1/2]

virtual void AeonGUI::Path::Construct ( const DrawType * aCommands,
size_t aCommandCount,
size_t aPathDataHint = 0 )
pure virtual

Build the path from a raw array of draw commands.

Parameters
aCommandsPointer to the command array.
aCommandCountNumber of commands.
aPathDataHintPre-computed size hint for internal storage.

Implemented in AeonGUI::CairoPath, and AeonGUI::SkiaPath.

◆ Construct() [2/2]

virtual void AeonGUI::Path::Construct ( const std::vector< DrawType > & aCommands,
size_t aPathDataHint = 0 )
pure virtual

Build the path from a vector of draw commands.

Parameters
aCommandsThe draw command sequence.
aPathDataHintPre-computed size hint for internal storage.

Implemented in AeonGUI::CairoPath, and AeonGUI::SkiaPath.

◆ GetPointAtLength()

virtual PathPoint AeonGUI::Path::GetPointAtLength ( double aDistance) const
pure virtual

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.

Implemented in AeonGUI::CairoPath, and AeonGUI::SkiaPath.

◆ GetTotalLength()

virtual double AeonGUI::Path::GetTotalLength ( ) const
pure virtual

Compute the total arc length of the path.

Returns
Total length in user units.

Implemented in AeonGUI::CairoPath, and AeonGUI::SkiaPath.

◆ IsClosed()

virtual bool AeonGUI::Path::IsClosed ( ) const
pure virtual

Check whether the path contains a close-path command.

Returns
true if the path is closed.

Implemented in AeonGUI::CairoPath, and AeonGUI::SkiaPath.


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