Maze Builder Docs 6.0.1
Loading...
Searching...
No Matches
mazes::writer Class Reference

Handles file writing for text, stdout, images, and object files. More...

#include <writer.h>

Public Member Functions

bool write_png (const std::string &filename, const std::vector< std::uint8_t > &data, unsigned int w=100, unsigned int h=100, unsigned int stride=4) const noexcept
 Write pixels to a PNG file.
 
bool write_jpeg (const std::string &filename, const std::vector< std::uint8_t > &data, unsigned int w=100, unsigned int h=100, unsigned int stride=4) const noexcept
 Write pixels to a JPEG file.
 
bool write (std::ostream &oss, const std::string &data) const noexcept
 Handles writing to an output stream.
 
bool write_file (const std::string &filename, const std::string &data) const noexcept
 Write to a file.
 

Detailed Description

Handles file writing for text, stdout, images, and object files.

Member Function Documentation

◆ write()

bool mazes::writer::write ( std::ostream & oss,
const std::string & data ) const
noexcept

Handles writing to an output stream.

Parameters
oss
data
Returns

◆ write_file()

bool mazes::writer::write_file ( const std::string & filename,
const std::string & data ) const
noexcept

Write to a file.

Parameters
filename
data
Returns

◆ write_jpeg()

bool mazes::writer::write_jpeg ( const std::string & filename,
const std::vector< std::uint8_t > & data,
unsigned int w = 100,
unsigned int h = 100,
unsigned int stride = 4 ) const
noexcept

Write pixels to a JPEG file.

Parameters
filename
data
w100
h100
stride4
Returns

◆ write_png()

bool mazes::writer::write_png ( const std::string & filename,
const std::vector< std::uint8_t > & data,
unsigned int w = 100,
unsigned int h = 100,
unsigned int stride = 4 ) const
noexcept

Write pixels to a PNG file.

Parameters
filename
data
w100
h100
stride4
Returns


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