#include <stdlib.h>#include <ctype.h>#include <stdio.h>#include "agg_basics.h"#include "agg_rendering_buffer.h"#include "agg_rasterizer_scanline_aa.h"#include "agg_scanline_u.h"#include "agg_scanline_p.h"#include "agg_color_gray.h"#include "agg_renderer_mclip.h"#include "agg_renderer_scanline.h"#include "agg_path_storage.h"#include "agg_conv_transform.h"#include "agg_bounding_rect.h"#include "agg_renderer_outline_aa.h"#include "agg_pixfmt_gray.h"#include "agg_pixfmt_amask_adaptor.h"#include "agg_renderer_primitives.h"#include "agg_renderer_markers.h"#include "agg_span_allocator.h"#include "agg_span_gradient.h"#include "agg_span_interpolator_linear.h"#include "agg_rasterizer_outline_aa.h"#include "agg_alpha_mask_u8.h"#include "agg_ellipse.h"#include "ctrl/agg_slider_ctrl.h"#include "platform/agg_platform_support.h"#include "pixel_formats.h"Go to the source code of this file.
Namespaces | |
| namespace | agg |
Classes | |
| struct | gradient_linear_color< rgba8 > |
| struct | gradient_linear_color< gray8 > |
| class | the_application |
Defines | |
| #define | AGG_BGRA32 |
Enumerations | |
| enum | flip_y_e { flip_y = true } |
Functions | |
| unsigned | parse_lion (agg::path_storage &ps, agg::rgba8 *colors, unsigned *path_idx) |
| int | agg_main (int argc, char *argv[]) |
Variables | |
| agg::rasterizer_scanline_aa | g_rasterizer |
| agg::scanline_u8 | g_scanline |
| agg::path_storage | g_path |
| agg::rgba8 | g_colors [100] |
| unsigned | g_path_idx [100] |
| unsigned | g_npaths = 0 |
| double | g_x1 = 0 |
| double | g_y1 = 0 |
| double | g_x2 = 0 |
| double | g_y2 = 0 |
| double | g_base_dx = 0 |
| double | g_base_dy = 0 |
| double | g_angle = 0 |
| double | g_scale = 1.0 |
| double | g_skew_x = 0 |
| double | g_skew_y = 0 |
| int | g_nclick = 0 |
|
|
Definition at line 33 of file alpha_mask2.cpp. |
|
|
Definition at line 41 of file alpha_mask2.cpp. 00041 { flip_y = true };
|
|
||||||||||||
|
Definition at line 400 of file alpha_mask2.cpp. References platform_support::caption(), flip_y, platform_support::init(), pix_format, platform_support::run(), and agg::window_resize. 00401 { 00402 the_application app(pix_format, flip_y); 00403 app.caption("AGG Example. Clipping to multiple rectangle regions"); 00404 00405 if(app.init(512, 400, agg::window_resize)) 00406 { 00407 return app.run(); 00408 } 00409 return 1; 00410 }
|
|
||||||||||||||||
|
Definition at line 156 of file parse_lion.cpp. 00157 { 00158 // Parse the lion and then detect its bounding 00159 // box and arrange polygons orientations (make all polygons 00160 // oriented clockwise or counterclockwise) 00161 00162 const char* ptr = g_lion; 00163 unsigned npaths = 0; 00164 00165 while(*ptr) 00166 { 00167 if(*ptr != 'M' && isalnum(*ptr)) 00168 { 00169 unsigned c = 0; 00170 sscanf(ptr, "%x", &c); 00171 00172 // New color. Every new color creates new path in the path object. 00173 path.close_polygon(); 00174 colors[npaths] = agg::rgb8_packed(c); 00175 path_idx[npaths] = path.start_new_path(); 00176 npaths++; 00177 while(*ptr && *ptr != '\n') ptr++; 00178 if(*ptr == '\n') ptr++; 00179 } 00180 else 00181 { 00182 double x = 0.0; 00183 double y = 0.0; 00184 00185 while(*ptr && *ptr != '\n') 00186 { 00187 int c = *ptr; 00188 00189 while(*ptr && !isdigit(*ptr)) ptr++; 00190 x = atof(ptr); 00191 00192 while(*ptr && isdigit(*ptr)) ptr++; 00193 while(*ptr && !isdigit(*ptr)) ptr++; 00194 y = atof(ptr); 00195 00196 if(c == 'M') 00197 { 00198 path.close_polygon(); 00199 path.move_to(x, y); 00200 } 00201 else 00202 { 00203 path.line_to(x, y); 00204 } 00205 00206 while(*ptr && isdigit(*ptr)) ptr++; 00207 while(*ptr && *ptr != '\n' && !isalpha(*ptr)) ptr++; 00208 } 00209 if(*ptr == '\n') ptr++; 00210 } 00211 } 00212 path.arrange_orientations_all_paths(agg::path_flags_cw); 00213 return npaths; 00214 }
|
|
|
Definition at line 55 of file alpha_mask2.cpp. |
|
|
Definition at line 53 of file alpha_mask2.cpp. |
|
|
Definition at line 54 of file alpha_mask2.cpp. |
|
|
Definition at line 46 of file alpha_mask2.cpp. |
|
|
Definition at line 59 of file alpha_mask2.cpp. |
|
|
Definition at line 48 of file alpha_mask2.cpp. |
|
|
Definition at line 45 of file alpha_mask2.cpp. |
|
|
Definition at line 47 of file alpha_mask2.cpp. |
|
|
Definition at line 43 of file alpha_mask2.cpp. |
|
|
Definition at line 56 of file alpha_mask2.cpp. |
|
|
Definition at line 44 of file alpha_mask2.cpp. |
|
|
Definition at line 57 of file alpha_mask2.cpp. |
|
|
Definition at line 58 of file alpha_mask2.cpp. |
|
|
Definition at line 49 of file alpha_mask2.cpp. |
|
|
Definition at line 51 of file alpha_mask2.cpp. |
|
|
Definition at line 50 of file alpha_mask2.cpp. |
|
|
Definition at line 52 of file alpha_mask2.cpp. |