Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

image_transforms.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "agg_rendering_buffer.h"
#include "agg_rasterizer_scanline_aa.h"
#include "agg_path_storage.h"
#include "agg_trans_affine.h"
#include "agg_conv_transform.h"
#include "agg_pixfmt_rgba.h"
#include "agg_span_image_filter_rgba.h"
#include "agg_span_interpolator_linear.h"
#include "agg_scanline_u.h"
#include "agg_renderer_scanline.h"
#include "agg_span_allocator.h"
#include "ctrl/agg_slider_ctrl.h"
#include "ctrl/agg_rbox_ctrl.h"
#include "ctrl/agg_cbox_ctrl.h"
#include "platform/agg_platform_support.h"

Go to the source code of this file.

Classes

class  the_application

Enumerations

enum  flip_y_e { flip_y = true }

Functions

int agg_main (int argc, char *argv[])


Enumeration Type Documentation

enum flip_y_e
 

Enumerator:
flip_y 

Definition at line 20 of file image_transforms.cpp.

00020 { flip_y = true };


Function Documentation

int agg_main int  argc,
char *  argv[]
 

Definition at line 419 of file image_transforms.cpp.

References platform_support::caption(), flip_y, platform_support::img_ext(), platform_support::init(), platform_support::load_img(), platform_support::message(), agg::pix_format_bgra32, platform_support::rbuf_img(), and platform_support::run().

00420 {
00421     the_application app(agg::pix_format_bgra32, flip_y);
00422     app.caption("Image Affine Transformations with filtering");
00423 
00424     const char* img_name = "spheres";
00425     if(argc >= 2) img_name = argv[1];
00426     if(!app.load_img(0, img_name)) 
00427     {
00428         char buf[256];
00429         if(strcmp(img_name, "spheres") == 0)
00430         {
00431             sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
00432                          "or copy it from another directory if available.",
00433                     img_name, app.img_ext(), img_name, app.img_ext());
00434         }
00435         else
00436         {
00437             sprintf(buf, "File not found: %s%s", img_name, app.img_ext());
00438         }
00439         app.message(buf);
00440         return 1;
00441     }
00442 
00443     if(app.init(app.rbuf_img(0).width(), 
00444                 app.rbuf_img(0).height(), 
00445                 0))
00446     {
00447         return app.run();
00448     }
00449     return 0;
00450 }


© sourcejam.com 2005-2008