Kage Studio 0.7.230612
A Simple Free and Open Source 2D Animation Software
Loading...
Searching...
No Matches
cairo_kage.h
Go to the documentation of this file.
1/*
2 * cairo_kage.h
3 *
4 * Copyright 2020 Mj Mendoza IV <mj.mendoza.iv@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 *
21 *
22 */
23
24#ifndef UTIL_CAIRO_KAGE_H
25 #define UTIL_CAIRO_KAGE_H
26
27 #include <string>
28 #include <cairomm/surface.h>
29 #include <fstream> //ofstream
30
31 using namespace std;
32
33 class CairoKage {
34 static std::ofstream pngFile;
35
36 public:
37 static Cairo::ErrorStatus writeToPNGStream(const unsigned char* data, unsigned int length);
38 static bool writeToPNG(string p_path, Cairo::RefPtr<Cairo::ImageSurface> p_surface);
39 };
40
41#endif //UTIL_CAIRO_KAGE_H
Definition: cairo_kage.h:33
static Cairo::ErrorStatus writeToPNGStream(const unsigned char *data, unsigned int length)
Definition: cairo_kage.cpp:28
static bool writeToPNG(string p_path, Cairo::RefPtr< Cairo::ImageSurface > p_surface)
Definition: cairo_kage.cpp:38