_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes
png.cpp File Reference
#include <png.h>
#include "stratagus.h"
#include "map.h"
#include "video.h"
#include "iolib.h"
#include "iocompat.h"

Classes

class  AutoPng_read_structp
 

Functions

png.cpp - The png graphic file loader.
static void CL_png_read_data (png_structp png_ptr, png_bytep data, png_size_t length)
 
int LoadGraphicPNG (CGraphic *g)
 Load graphic from PNG file. More...
 
void SaveScreenshotPNG (const char *name)
 Save a screenshot to a PNG file. More...
 
void SaveMapPNG (const char *name)
 Save a screenshot to a PNG file. More...
 

Function Documentation

static void CL_png_read_data ( png_structp  png_ptr,
png_bytep  data,
png_size_t  length 
)
static

png read callback for CL-IO.

Parameters
png_ptrpng struct pointer.
databyte address to read to.
lengthnumber of bytes to read.
int LoadGraphicPNG ( CGraphic g)

Load graphic from PNG file.

Load a png graphic file. Modified function from SDL_Image

Parameters
ggraphic to load.
Returns
0 for success, -1 for error.
void SaveMapPNG ( const char *  name)

Save a screenshot to a PNG file.

Save a whole map to a PNG file.

Parameters
namePNG filename to save.
void SaveScreenshotPNG ( const char *  name)

Save a screenshot to a PNG file.

Save a screenshot to a PNG file.

Parameters
namePNG filename to save.
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.