MCPcopy Create free account
hub / github.com/RobLoach/raylib-cpp / ExportAsCode

Method ExportAsCode

include/Image.hpp:314–318  ·  view source on GitHub ↗

* Export image as code file defining an array of bytes, returns true on success * * @throws raylib::RaylibException Thrown if the image failed to load from the file. */

Source from the content-addressed store, hash-verified

312 * @throws raylib::RaylibException Thrown if the image failed to load from the file.
313 */
314 void ExportAsCode(const std::string& fileName) const {
315 if (!::ExportImageAsCode(*this, fileName.c_str())) {
316 throw RaylibException(TextFormat("Failed to export Image code to file: %s", fileName.c_str()));
317 }
318 }
319
320 GETTER(void*, Data, data)
321 GETTER(int, Width, width)

Callers

nothing calls this directly

Calls 3

ExportImageAsCodeFunction · 0.85
RaylibExceptionClass · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected