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

image_filters.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include "agg_rendering_buffer.h"
#include "agg_rasterizer_scanline_aa.h"
#include "agg_ellipse.h"
#include "agg_trans_affine.h"
#include "agg_conv_transform.h"
#include "agg_scanline_u.h"
#include "agg_scanline_p.h"
#include "agg_image_accessors.h"
#include "agg_renderer_scanline.h"
#include "agg_span_allocator.h"
#include "agg_span_interpolator_linear.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"
#include "agg_pixfmt_rgb.h"
#include "agg_span_image_filter_rgb.h"

Go to the source code of this file.

Classes

class  the_application

Defines

#define span_image_filter   span_image_filter_rgb
#define span_image_filter_nn   span_image_filter_rgb_nn
#define span_image_filter_bilinear   span_image_filter_rgb_bilinear_clip
#define span_image_filter_2x2   span_image_filter_rgb_2x2
#define pix_format   agg::pix_format_bgr24
#define AGG_ACCURATE_TIME

Typedefs

typedef agg::pixfmt_bgr24 pixfmt
typedef agg::pixfmt_bgr24_pre pixfmt_pre
typedef pixfmt::color_type color_type

Enumerations

enum  flip_y_e { flip_y = true }

Functions

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


Define Documentation

#define AGG_ACCURATE_TIME
 

Definition at line 40 of file image_filters.cpp.

#define pix_format   agg::pix_format_bgr24
 

Definition at line 28 of file image_filters.cpp.

#define span_image_filter   span_image_filter_rgb
 

Definition at line 24 of file image_filters.cpp.

#define span_image_filter_2x2   span_image_filter_rgb_2x2
 

Definition at line 27 of file image_filters.cpp.

Referenced by the_application::on_draw().

#define span_image_filter_bilinear   span_image_filter_rgb_bilinear_clip
 

Definition at line 26 of file image_filters.cpp.

#define span_image_filter_nn   span_image_filter_rgb_nn
 

Definition at line 25 of file image_filters.cpp.


Typedef Documentation

typedef pixfmt::color_type color_type
 

Definition at line 31 of file image_filters.cpp.

typedef agg::pixfmt_bgr24 pixfmt
 

Definition at line 29 of file image_filters.cpp.

typedef agg::pixfmt_bgr24_pre pixfmt_pre
 

Definition at line 30 of file image_filters.cpp.


Enumeration Type Documentation

enum flip_y_e
 

Enumerator:
flip_y 

Definition at line 33 of file image_filters.cpp.

00033 { flip_y = true };


Function Documentation

int agg_main int  argc,
char *  argv[]
 

Definition at line 389 of file image_filters.cpp.

References platform_support::caption(), platform_support::copy_img_to_img(), flip_y, platform_support::img_ext(), platform_support::init(), platform_support::load_img(), platform_support::message(), pix_format, platform_support::rbuf_img(), platform_support::run(), and the_application::transform_image().

00390 {
00391     the_application app(pix_format, flip_y);
00392     app.caption("Image transformation filters comparison");
00393 
00394     const char* img_name = "spheres";
00395     if(argc >= 2) img_name = argv[1];
00396     if(!app.load_img(0, img_name)) 
00397     {
00398         char buf[256];
00399         if(strcmp(img_name, "spheres") == 0)
00400         {
00401             sprintf(buf, "File not found: %s%s. Download http://www.antigrain.com/%s%s\n"
00402                          "or copy it from another directory if available.",
00403                     img_name, app.img_ext(), img_name, app.img_ext());
00404         }
00405         else
00406         {
00407             sprintf(buf, "File not found: %s%s", img_name, app.img_ext());
00408         }
00409         app.message(buf);
00410         return 1;
00411     }
00412 
00413     app.copy_img_to_img(1, 0);
00414     app.copy_img_to_img(2, 0);
00415     app.transform_image(0.0);
00416 
00417     unsigned w = app.rbuf_img(0).width() + 110;
00418     unsigned h = app.rbuf_img(0).height() + 40;
00419 
00420     if(w < 305) w = 305;
00421     if(h < 325) h = 325;
00422 
00423     if(app.init(w, h, 0))
00424     {
00425         return app.run();
00426     }
00427     return 0;
00428 }


© sourcejam.com 2005-2008