OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::SVG Class Reference

SVG データ More...

#include <SVG.hpp>

Public Member Functions

SIV3D_NODISCARD_CXX20 SVG ()
 
SIV3D_NODISCARD_CXX20 SVG (FilePathView path)
 
template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
SIV3D_NODISCARD_CXX20 SVG (Reader &&reader)
 
SIV3D_NODISCARD_CXX20 SVG (std::unique_ptr< IReader > &&reader)
 
bool load (FilePathView path)
 
template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
bool load (Reader &&reader)
 
bool load (std::unique_ptr< IReader > &&reader)
 
bool parse (const std::string &source)
 
bool parse (StringView source)
 
bool isEmpty () const noexcept
 
 operator bool () const noexcept
 
int32 width () const
 
int32 height () const
 
Size size () const
 
double widthF () const
 
double heightF () const
 
SizeF sizeF () const
 
void clear ()
 SVG データを消去します。 More...
 
Image render (const Color &background) const
 SVGImage にレンダリングします。 More...
 
Image render (const Optional< int32 > &maxWidth, const Optional< int32 > &maxHeight, const Color &background=Color{ 0, 0 }) const
 
Image render (const Optional< Size > &maxSize=unspecified, const Color &background=Color{ 0, 0 }) const
 

Static Public Member Functions

static SVG Load (FilePathView path)
 
static SVG Parse (const std::string &source)
 
static SVG Parse (StringView source)
 

Detailed Description

SVG データ

Constructor & Destructor Documentation

◆ SVG() [1/4]

SIV3D_NODISCARD_CXX20 s3d::SVG::SVG ( )

◆ SVG() [2/4]

SIV3D_NODISCARD_CXX20 s3d::SVG::SVG ( FilePathView  path)
explicit

◆ SVG() [3/4]

template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
SIV3D_NODISCARD_CXX20 s3d::SVG::SVG ( Reader &&  reader)
explicit

◆ SVG() [4/4]

SIV3D_NODISCARD_CXX20 s3d::SVG::SVG ( std::unique_ptr< IReader > &&  reader)
explicit

Member Function Documentation

◆ clear()

void s3d::SVG::clear ( )

SVG データを消去します。

◆ height()

int32 s3d::SVG::height ( ) const

◆ heightF()

double s3d::SVG::heightF ( ) const

◆ isEmpty()

bool s3d::SVG::isEmpty ( ) const
noexcept

◆ load() [1/3]

bool s3d::SVG::load ( FilePathView  path)

◆ Load()

static SVG s3d::SVG::Load ( FilePathView  path)
static

◆ load() [2/3]

template<class Reader , std::enable_if_t< std::is_base_of_v< IReader, Reader > &&!std::is_lvalue_reference_v< Reader >> * = nullptr>
bool s3d::SVG::load ( Reader &&  reader)

◆ load() [3/3]

bool s3d::SVG::load ( std::unique_ptr< IReader > &&  reader)

◆ operator bool()

s3d::SVG::operator bool ( ) const
explicitnoexcept

◆ parse() [1/2]

bool s3d::SVG::parse ( const std::string &  source)

◆ Parse() [1/2]

static SVG s3d::SVG::Parse ( const std::string &  source)
static

◆ parse() [2/2]

bool s3d::SVG::parse ( StringView  source)

◆ Parse() [2/2]

static SVG s3d::SVG::Parse ( StringView  source)
static

◆ render() [1/3]

Image s3d::SVG::render ( const Color background) const

SVGImage にレンダリングします。

Parameters
background無色部分の背景色
Returns
レンダリング結果

◆ render() [2/3]

Image s3d::SVG::render ( const Optional< int32 > &  maxWidth,
const Optional< int32 > &  maxHeight,
const Color background = Color{ 0, 0 } 
) const

◆ render() [3/3]

Image s3d::SVG::render ( const Optional< Size > &  maxSize = unspecified,
const Color background = Color{ 0, 0 } 
) const

◆ size()

Size s3d::SVG::size ( ) const

◆ sizeF()

SizeF s3d::SVG::sizeF ( ) const

◆ width()

int32 s3d::SVG::width ( ) const

◆ widthF()

double s3d::SVG::widthF ( ) const

The documentation for this class was generated from the following file: