Handles file writing for text, stdout, images, and object files.
More...
#include <writer.h>
|
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.
|
|
Handles file writing for text, stdout, images, and object files.
◆ write()
bool mazes::writer::write |
( |
std::ostream & | oss, |
|
|
const std::string & | data ) const |
|
noexcept |
Handles writing to an output stream.
- Parameters
-
- Returns
◆ write_file()
bool mazes::writer::write_file |
( |
const std::string & | filename, |
|
|
const std::string & | data ) const |
|
noexcept |
Write to a file.
- Parameters
-
- 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 | |
w | 100 |
h | 100 |
stride | 4 |
- 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 | |
w | 100 |
h | 100 |
stride | 4 |
- Returns
The documentation for this class was generated from the following file: