Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
agg Namespace Reference

Classes

class  apply_gamma_dir_gray
 
class  apply_gamma_dir_rgb
 
class  apply_gamma_inv_gray
 
class  apply_gamma_inv_rgb
 
class  bezier_arc
 
class  bezier_arc_svg
 
struct  blender_base
 
struct  blender_gray
 
struct  blender_gray_pre
 
struct  blender_rgb
 
class  blender_rgb_gamma
 
struct  blender_rgb_pre
 
class  block_allocator
 
struct  cell_aa
 
struct  const_row_info
 
class  conv_transform
 
class  gamma_linear
 
class  gamma_lut
 
class  gamma_multiply
 
struct  gamma_none
 
class  gamma_power
 
class  gamma_threshold
 
struct  gray16
 
struct  gray32
 
struct  gray8T
 
class  line_adaptor
 
struct  linear
 
struct  mul_one
 
struct  obj_allocator
 
struct  order_abgr
 
struct  order_argb
 
struct  order_bgr
 
struct  order_bgra
 
struct  order_rgb
 
struct  order_rgba
 
class  path_base
 
class  pixfmt_alpha_blend_gray
 
class  pixfmt_alpha_blend_rgb
 
class  pixfmt_bgr24_gamma
 
class  pixfmt_bgr48_gamma
 
struct  pixfmt_gray_tag
 
class  pixfmt_rgb24_gamma
 
class  pixfmt_rgb48_gamma
 
struct  pixfmt_rgb_tag
 
struct  pixfmt_rgba_tag
 
class  pixfmt_sbgr24_gamma
 
class  pixfmt_srgb24_gamma
 
struct  pod_allocator
 
class  pod_array
 
class  pod_array_adaptor
 
class  pod_auto_array
 
class  pod_auto_vector
 
class  pod_bvector
 
class  pod_vector
 
struct  point_base
 
class  poly_container_adaptor
 
class  poly_container_reverse_adaptor
 
class  poly_plain_adaptor
 
class  range_adaptor
 
struct  ras_conv_dbl
 
struct  ras_conv_dbl_3x
 
struct  ras_conv_int
 
struct  ras_conv_int_3x
 
struct  ras_conv_int_sat
 
class  rasterizer_cells_aa
 
class  rasterizer_scanline_aa
 
class  rasterizer_scanline_aa_nogamma
 
class  rasterizer_sl_clip
 
class  rasterizer_sl_no_clip
 
struct  rect_base
 
class  renderer_base
 
class  renderer_scanline_aa
 
class  renderer_scanline_aa_solid
 
class  renderer_scanline_bin
 
class  renderer_scanline_bin_solid
 
struct  rgba
 
struct  rgba16
 
struct  rgba32
 
struct  rgba8T
 
class  row_accessor
 
struct  row_info
 
class  row_ptr_cache
 
struct  saturation
 
class  scanline32_p8
 
class  scanline_hit_test
 
class  scanline_p8
 
struct  sRGB
 
class  sRGB_conv
 
class  sRGB_conv< float >
 
class  sRGB_conv< int16u >
 
class  sRGB_conv< int8u >
 
class  sRGB_conv_base
 
class  sRGB_lut
 
class  sRGB_lut< float >
 
class  sRGB_lut< int16u >
 
class  sRGB_lut< int8u >
 
struct  trans_affine
 
class  trans_affine_line_segment
 
class  trans_affine_reflection
 
class  trans_affine_reflection_unit
 
class  trans_affine_rotation
 
class  trans_affine_scaling
 
class  trans_affine_skewing
 
class  trans_affine_translation
 
struct  vertex_base
 
class  vertex_block_storage
 
class  vertex_stl_storage
 

Typedefs

typedef AGG_INT8 int8
 
typedef AGG_INT8U int8u
 
typedef AGG_INT16 int16
 
typedef AGG_INT16U int16u
 
typedef AGG_INT32 int32
 
typedef AGG_INT32U int32u
 
typedef AGG_INT64 int64
 
typedef AGG_INT64U int64u
 
typedef unsigned char cover_type
 
typedef rect_base< int > rect_i
 
typedef rect_base< float > rect_f
 
typedef rect_base< double > rect_d
 
typedef point_base< int > point_i
 
typedef point_base< float > point_f
 
typedef point_base< double > point_d
 
typedef vertex_base< int > vertex_i
 
typedef vertex_base< float > vertex_f
 
typedef vertex_base< double > vertex_d
 
typedef gray8T< lineargray8
 
typedef gray8T< sRGBsgray8
 
typedef rgba8T< linearrgba8
 
typedef rgba8T< sRGBsrgba8
 
typedef path_base< vertex_block_storage< double > > path_storage
 
typedef blender_gray< gray8blender_gray8
 
typedef blender_gray< sgray8blender_sgray8
 
typedef blender_gray< gray16blender_gray16
 
typedef blender_gray< gray32blender_gray32
 
typedef blender_gray_pre< gray8blender_gray8_pre
 
typedef blender_gray_pre< sgray8blender_sgray8_pre
 
typedef blender_gray_pre< gray16blender_gray16_pre
 
typedef blender_gray_pre< gray32blender_gray32_pre
 
typedef pixfmt_alpha_blend_gray< blender_gray8, rendering_bufferpixfmt_gray8
 
typedef pixfmt_alpha_blend_gray< blender_sgray8, rendering_bufferpixfmt_sgray8
 
typedef pixfmt_alpha_blend_gray< blender_gray16, rendering_bufferpixfmt_gray16
 
typedef pixfmt_alpha_blend_gray< blender_gray32, rendering_bufferpixfmt_gray32
 
typedef pixfmt_alpha_blend_gray< blender_gray8_pre, rendering_bufferpixfmt_gray8_pre
 
typedef pixfmt_alpha_blend_gray< blender_sgray8_pre, rendering_bufferpixfmt_sgray8_pre
 
typedef pixfmt_alpha_blend_gray< blender_gray16_pre, rendering_bufferpixfmt_gray16_pre
 
typedef pixfmt_alpha_blend_gray< blender_gray32_pre, rendering_bufferpixfmt_gray32_pre
 
typedef blender_rgb< rgba8, order_rgbblender_rgb24
 
typedef blender_rgb< rgba8, order_bgrblender_bgr24
 
typedef blender_rgb< srgba8, order_rgbblender_srgb24
 
typedef blender_rgb< srgba8, order_bgrblender_sbgr24
 
typedef blender_rgb< rgba16, order_rgbblender_rgb48
 
typedef blender_rgb< rgba16, order_bgrblender_bgr48
 
typedef blender_rgb< rgba32, order_rgbblender_rgb96
 
typedef blender_rgb< rgba32, order_bgrblender_bgr96
 
typedef blender_rgb_pre< rgba8, order_rgbblender_rgb24_pre
 
typedef blender_rgb_pre< rgba8, order_bgrblender_bgr24_pre
 
typedef blender_rgb_pre< srgba8, order_rgbblender_srgb24_pre
 
typedef blender_rgb_pre< srgba8, order_bgrblender_sbgr24_pre
 
typedef blender_rgb_pre< rgba16, order_rgbblender_rgb48_pre
 
typedef blender_rgb_pre< rgba16, order_bgrblender_bgr48_pre
 
typedef blender_rgb_pre< rgba32, order_rgbblender_rgb96_pre
 
typedef blender_rgb_pre< rgba32, order_bgrblender_bgr96_pre
 
typedef pixfmt_alpha_blend_rgb< blender_rgb24, rendering_buffer, 3 > pixfmt_rgb24
 
typedef pixfmt_alpha_blend_rgb< blender_bgr24, rendering_buffer, 3 > pixfmt_bgr24
 
typedef pixfmt_alpha_blend_rgb< blender_srgb24, rendering_buffer, 3 > pixfmt_srgb24
 
typedef pixfmt_alpha_blend_rgb< blender_sbgr24, rendering_buffer, 3 > pixfmt_sbgr24
 
typedef pixfmt_alpha_blend_rgb< blender_rgb48, rendering_buffer, 3 > pixfmt_rgb48
 
typedef pixfmt_alpha_blend_rgb< blender_bgr48, rendering_buffer, 3 > pixfmt_bgr48
 
typedef pixfmt_alpha_blend_rgb< blender_rgb96, rendering_buffer, 3 > pixfmt_rgb96
 
typedef pixfmt_alpha_blend_rgb< blender_bgr96, rendering_buffer, 3 > pixfmt_bgr96
 
typedef pixfmt_alpha_blend_rgb< blender_rgb24_pre, rendering_buffer, 3 > pixfmt_rgb24_pre
 
typedef pixfmt_alpha_blend_rgb< blender_bgr24_pre, rendering_buffer, 3 > pixfmt_bgr24_pre
 
typedef pixfmt_alpha_blend_rgb< blender_srgb24_pre, rendering_buffer, 3 > pixfmt_srgb24_pre
 
typedef pixfmt_alpha_blend_rgb< blender_sbgr24_pre, rendering_buffer, 3 > pixfmt_sbgr24_pre
 
typedef pixfmt_alpha_blend_rgb< blender_rgb48_pre, rendering_buffer, 3 > pixfmt_rgb48_pre
 
typedef pixfmt_alpha_blend_rgb< blender_bgr48_pre, rendering_buffer, 3 > pixfmt_bgr48_pre
 
typedef pixfmt_alpha_blend_rgb< blender_rgb96_pre, rendering_buffer, 3 > pixfmt_rgb96_pre
 
typedef pixfmt_alpha_blend_rgb< blender_bgr96_pre, rendering_buffer, 3 > pixfmt_bgr96_pre
 
typedef pixfmt_alpha_blend_rgb< blender_rgb24, rendering_buffer, 4, 0 > pixfmt_rgbx32
 
typedef pixfmt_alpha_blend_rgb< blender_rgb24, rendering_buffer, 4, 1 > pixfmt_xrgb32
 
typedef pixfmt_alpha_blend_rgb< blender_bgr24, rendering_buffer, 4, 1 > pixfmt_xbgr32
 
typedef pixfmt_alpha_blend_rgb< blender_bgr24, rendering_buffer, 4, 0 > pixfmt_bgrx32
 
typedef pixfmt_alpha_blend_rgb< blender_srgb24, rendering_buffer, 4, 0 > pixfmt_srgbx32
 
typedef pixfmt_alpha_blend_rgb< blender_srgb24, rendering_buffer, 4, 1 > pixfmt_sxrgb32
 
typedef pixfmt_alpha_blend_rgb< blender_sbgr24, rendering_buffer, 4, 1 > pixfmt_sxbgr32
 
typedef pixfmt_alpha_blend_rgb< blender_sbgr24, rendering_buffer, 4, 0 > pixfmt_sbgrx32
 
typedef pixfmt_alpha_blend_rgb< blender_rgb48, rendering_buffer, 4, 0 > pixfmt_rgbx64
 
typedef pixfmt_alpha_blend_rgb< blender_rgb48, rendering_buffer, 4, 1 > pixfmt_xrgb64
 
typedef pixfmt_alpha_blend_rgb< blender_bgr48, rendering_buffer, 4, 1 > pixfmt_xbgr64
 
typedef pixfmt_alpha_blend_rgb< blender_bgr48, rendering_buffer, 4, 0 > pixfmt_bgrx64
 
typedef pixfmt_alpha_blend_rgb< blender_rgb96, rendering_buffer, 4, 0 > pixfmt_rgbx128
 
typedef pixfmt_alpha_blend_rgb< blender_rgb96, rendering_buffer, 4, 1 > pixfmt_xrgb128
 
typedef pixfmt_alpha_blend_rgb< blender_bgr96, rendering_buffer, 4, 1 > pixfmt_xbgr128
 
typedef pixfmt_alpha_blend_rgb< blender_bgr96, rendering_buffer, 4, 0 > pixfmt_bgrx128
 
typedef pixfmt_alpha_blend_rgb< blender_rgb24_pre, rendering_buffer, 4, 0 > pixfmt_rgbx32_pre
 
typedef pixfmt_alpha_blend_rgb< blender_rgb24_pre, rendering_buffer, 4, 1 > pixfmt_xrgb32_pre
 
typedef pixfmt_alpha_blend_rgb< blender_bgr24_pre, rendering_buffer, 4, 1 > pixfmt_xbgr32_pre
 
typedef pixfmt_alpha_blend_rgb< blender_bgr24_pre, rendering_buffer, 4, 0 > pixfmt_bgrx32_pre
 
typedef pixfmt_alpha_blend_rgb< blender_srgb24_pre, rendering_buffer, 4, 0 > pixfmt_srgbx32_pre
 
typedef pixfmt_alpha_blend_rgb< blender_srgb24_pre, rendering_buffer, 4, 1 > pixfmt_sxrgb32_pre
 
typedef pixfmt_alpha_blend_rgb< blender_sbgr24_pre, rendering_buffer, 4, 1 > pixfmt_sxbgr32_pre
 
typedef pixfmt_alpha_blend_rgb< blender_sbgr24_pre, rendering_buffer, 4, 0 > pixfmt_sbgrx32_pre
 
typedef pixfmt_alpha_blend_rgb< blender_rgb48_pre, rendering_buffer, 4, 0 > pixfmt_rgbx64_pre
 
typedef pixfmt_alpha_blend_rgb< blender_rgb48_pre, rendering_buffer, 4, 1 > pixfmt_xrgb64_pre
 
typedef pixfmt_alpha_blend_rgb< blender_bgr48_pre, rendering_buffer, 4, 1 > pixfmt_xbgr64_pre
 
typedef pixfmt_alpha_blend_rgb< blender_bgr48_pre, rendering_buffer, 4, 0 > pixfmt_bgrx64_pre
 
typedef pixfmt_alpha_blend_rgb< blender_rgb96_pre, rendering_buffer, 4, 0 > pixfmt_rgbx128_pre
 
typedef pixfmt_alpha_blend_rgb< blender_rgb96_pre, rendering_buffer, 4, 1 > pixfmt_xrgb128_pre
 
typedef pixfmt_alpha_blend_rgb< blender_bgr96_pre, rendering_buffer, 4, 1 > pixfmt_xbgr128_pre
 
typedef pixfmt_alpha_blend_rgb< blender_bgr96_pre, rendering_buffer, 4, 0 > pixfmt_bgrx128_pre
 
typedef rasterizer_sl_clip< ras_conv_intrasterizer_sl_clip_int
 
typedef rasterizer_sl_clip< ras_conv_int_satrasterizer_sl_clip_int_sat
 
typedef rasterizer_sl_clip< ras_conv_int_3xrasterizer_sl_clip_int_3x
 
typedef rasterizer_sl_clip< ras_conv_dblrasterizer_sl_clip_dbl
 
typedef rasterizer_sl_clip< ras_conv_dbl_3xrasterizer_sl_clip_dbl_3x
 
typedef row_accessor< int8urendering_buffer
 

Enumerations

enum  quick_sort_threshold_e { quick_sort_threshold = 9 }
 
enum  cover_scale_e {
  cover_shift = 8 , cover_size = 1 << cover_shift , cover_mask = cover_size - 1 , cover_none = 0 ,
  cover_full = cover_mask
}
 
enum  poly_subpixel_scale_e { poly_subpixel_shift = 8 , poly_subpixel_scale = 1<<poly_subpixel_shift , poly_subpixel_mask = poly_subpixel_scale-1 }
 
enum  filling_rule_e { fill_non_zero , fill_even_odd }
 
enum  path_commands_e {
  path_cmd_stop = 0 , path_cmd_move_to = 1 , path_cmd_line_to = 2 , path_cmd_curve3 = 3 ,
  path_cmd_curve4 = 4 , path_cmd_curveN = 5 , path_cmd_catrom = 6 , path_cmd_ubspline = 7 ,
  path_cmd_end_poly = 0x0F , path_cmd_mask = 0x0F
}
 
enum  path_flags_e {
  path_flags_none = 0 , path_flags_ccw = 0x10 , path_flags_cw = 0x20 , path_flags_close = 0x40 ,
  path_flags_mask = 0xF0
}
 
enum  clipping_flags_e {
  clipping_flags_x1_clipped = 4 , clipping_flags_x2_clipped = 1 , clipping_flags_y1_clipped = 8 , clipping_flags_y2_clipped = 2 ,
  clipping_flags_x_clipped = clipping_flags_x1_clipped | clipping_flags_x2_clipped , clipping_flags_y_clipped = clipping_flags_y1_clipped | clipping_flags_y2_clipped
}
 
enum  { qsort_threshold = 9 }
 
enum  poly_max_coord_e { poly_max_coord = (1 << 30) - 1 }
 

Functions

template<class T >
void swap_elements (T &a, T &b)
 
template<class Array , class Less >
void quick_sort (Array &arr, Less less)
 
template<class Array , class Equal >
unsigned remove_duplicates (Array &arr, Equal equal)
 
template<class Array >
void invert_container (Array &arr)
 
template<class Array , class Value , class Less >
unsigned binary_search_pos (const Array &arr, const Value &val, Less less)
 
bool int_less (int a, int b)
 
bool int_greater (int a, int b)
 
bool unsigned_less (unsigned a, unsigned b)
 
bool unsigned_greater (unsigned a, unsigned b)
 
AGG_INLINE int iround (double v)
 
AGG_INLINE int uround (double v)
 
AGG_INLINE int ifloor (double v)
 
AGG_INLINE unsigned ufloor (double v)
 
AGG_INLINE int iceil (double v)
 
AGG_INLINE unsigned uceil (double v)
 
double deg2rad (double deg)
 
double rad2deg (double rad)
 
template<class Rect >
Rect intersect_rectangles (const Rect &r1, const Rect &r2)
 
template<class Rect >
Rect unite_rectangles (const Rect &r1, const Rect &r2)
 
bool is_vertex (unsigned c)
 
bool is_drawing (unsigned c)
 
bool is_stop (unsigned c)
 
bool is_move_to (unsigned c)
 
bool is_line_to (unsigned c)
 
bool is_curve (unsigned c)
 
bool is_curve3 (unsigned c)
 
bool is_curve4 (unsigned c)
 
bool is_end_poly (unsigned c)
 
bool is_close (unsigned c)
 
bool is_next_poly (unsigned c)
 
bool is_cw (unsigned c)
 
bool is_ccw (unsigned c)
 
bool is_oriented (unsigned c)
 
bool is_closed (unsigned c)
 
unsigned get_close_flag (unsigned c)
 
unsigned clear_orientation (unsigned c)
 
unsigned get_orientation (unsigned c)
 
unsigned set_orientation (unsigned c, unsigned o)
 
template<class T >
bool is_equal_eps (T v1, T v2, T epsilon)
 
void arc_to_bezier (double cx, double cy, double rx, double ry, double start_angle, double sweep_angle, double *curve)
 
template<class T >
unsigned clipping_flags (T x, T y, const rect_base< T > &clip_box)
 
template<class T >
unsigned clipping_flags_x (T x, const rect_base< T > &clip_box)
 
template<class T >
unsigned clipping_flags_y (T y, const rect_base< T > &clip_box)
 
template<class T >
unsigned clip_liang_barsky (T x1, T y1, T x2, T y2, const rect_base< T > &clip_box, T *x, T *y)
 
template<class T >
bool clip_move_point (T x1, T y1, T x2, T y2, const rect_base< T > &clip_box, T *x, T *y, unsigned flags)
 
template<class T >
unsigned clip_line_segment (T *x1, T *y1, T *x2, T *y2, const rect_base< T > &clip_box)
 
rgba operator+ (const rgba &a, const rgba &b)
 
rgba operator* (const rgba &a, double b)
 
rgba rgba_pre (double r, double g, double b, double a)
 
rgba8 rgb8_packed (unsigned v)
 
rgba8 bgr8_packed (unsigned v)
 
rgba8 argb8_packed (unsigned v)
 
template<class GammaLUT >
rgba8 rgba8_gamma_dir (rgba8 c, const GammaLUT &gamma)
 
template<class GammaLUT >
rgba8 rgba8_gamma_inv (rgba8 c, const GammaLUT &gamma)
 
template<class GammaLUT >
rgba16 rgba16_gamma_dir (rgba16 c, const GammaLUT &gamma)
 
template<class GammaLUT >
rgba16 rgba16_gamma_inv (rgba16 c, const GammaLUT &gamma)
 
double sRGB_to_linear (double x)
 
double linear_to_sRGB (double x)
 
AGG_INLINE double cross_product (double x1, double y1, double x2, double y2, double x, double y)
 
AGG_INLINE bool point_in_triangle (double x1, double y1, double x2, double y2, double x3, double y3, double x, double y)
 
AGG_INLINE double calc_distance (double x1, double y1, double x2, double y2)
 
AGG_INLINE double calc_sq_distance (double x1, double y1, double x2, double y2)
 
AGG_INLINE double calc_line_point_distance (double x1, double y1, double x2, double y2, double x, double y)
 
AGG_INLINE double calc_segment_point_u (double x1, double y1, double x2, double y2, double x, double y)
 
AGG_INLINE double calc_segment_point_sq_distance (double x1, double y1, double x2, double y2, double x, double y, double u)
 
AGG_INLINE double calc_segment_point_sq_distance (double x1, double y1, double x2, double y2, double x, double y)
 
AGG_INLINE bool calc_intersection (double ax, double ay, double bx, double by, double cx, double cy, double dx, double dy, double *x, double *y)
 
AGG_INLINE bool intersection_exists (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
 
AGG_INLINE void calc_orthogonal (double thickness, double x1, double y1, double x2, double y2, double *x, double *y)
 
AGG_INLINE void dilate_triangle (double x1, double y1, double x2, double y2, double x3, double y3, double *x, double *y, double d)
 
AGG_INLINE double calc_triangle_area (double x1, double y1, double x2, double y2, double x3, double y3)
 
template<class Storage >
double calc_polygon_area (const Storage &st)
 
AGG_INLINE unsigned fast_sqrt (unsigned val)
 
double besj (double x, int n)
 
template<class T >
static AGG_INLINE void swap_cells (T *a, T *b)
 
template<class Cell >
void qsort_cells (Cell **start, unsigned num)
 
template<class Scanline , class BaseRenderer , class ColorT >
void render_scanline_aa_solid (const Scanline &sl, BaseRenderer &ren, const ColorT &color)
 
template<class Rasterizer , class Scanline , class BaseRenderer , class ColorT >
void render_scanlines_aa_solid (Rasterizer &ras, Scanline &sl, BaseRenderer &ren, const ColorT &color)
 
template<class Scanline , class BaseRenderer , class SpanAllocator , class SpanGenerator >
void render_scanline_aa (const Scanline &sl, BaseRenderer &ren, SpanAllocator &alloc, SpanGenerator &span_gen)
 
template<class Rasterizer , class Scanline , class BaseRenderer , class SpanAllocator , class SpanGenerator >
void render_scanlines_aa (Rasterizer &ras, Scanline &sl, BaseRenderer &ren, SpanAllocator &alloc, SpanGenerator &span_gen)
 
template<class Scanline , class BaseRenderer , class ColorT >
void render_scanline_bin_solid (const Scanline &sl, BaseRenderer &ren, const ColorT &color)
 
template<class Rasterizer , class Scanline , class BaseRenderer , class ColorT >
void render_scanlines_bin_solid (Rasterizer &ras, Scanline &sl, BaseRenderer &ren, const ColorT &color)
 
template<class Scanline , class BaseRenderer , class SpanAllocator , class SpanGenerator >
void render_scanline_bin (const Scanline &sl, BaseRenderer &ren, SpanAllocator &alloc, SpanGenerator &span_gen)
 
template<class Rasterizer , class Scanline , class BaseRenderer , class SpanAllocator , class SpanGenerator >
void render_scanlines_bin (Rasterizer &ras, Scanline &sl, BaseRenderer &ren, SpanAllocator &alloc, SpanGenerator &span_gen)
 
template<class Rasterizer , class Scanline , class Renderer >
void render_scanlines (Rasterizer &ras, Scanline &sl, Renderer &ren)
 
template<class Rasterizer , class Scanline , class Renderer , class VertexSource , class ColorStorage , class PathId >
void render_all_paths (Rasterizer &ras, Scanline &sl, Renderer &r, VertexSource &vs, const ColorStorage &as, const PathId &path_id, unsigned num_paths)
 
template<class Rasterizer , class ScanlineAA , class ScanlineBin , class BaseRenderer , class SpanAllocator , class StyleHandler >
void render_scanlines_compound (Rasterizer &ras, ScanlineAA &sl_aa, ScanlineBin &sl_bin, BaseRenderer &ren, SpanAllocator &alloc, StyleHandler &sh)
 
template<class Rasterizer , class ScanlineAA , class BaseRenderer , class SpanAllocator , class StyleHandler >
void render_scanlines_compound_layered (Rasterizer &ras, ScanlineAA &sl_aa, BaseRenderer &ren, SpanAllocator &alloc, StyleHandler &sh)
 

Variables

const double pi = 3.14159265358979323846
 
const double vertex_dist_epsilon = 1e-14
 
const double intersection_epsilon = 1.0e-30
 
int16u g_sqrt_table [1024]
 
int8 g_elder_bit_table [256]
 
const double affine_epsilon = 1e-14
 

Class Documentation

◆ agg::linear

struct agg::linear

◆ agg::pixfmt_gray_tag

struct agg::pixfmt_gray_tag

◆ agg::pixfmt_rgb_tag

struct agg::pixfmt_rgb_tag

◆ agg::pixfmt_rgba_tag

struct agg::pixfmt_rgba_tag

◆ agg::sRGB

struct agg::sRGB

◆ agg::sRGB_conv

class agg::sRGB_conv
template<class T>
class agg::sRGB_conv< T >

◆ agg::sRGB_lut

class agg::sRGB_lut
template<class LinearType>
class agg::sRGB_lut< LinearType >
+ Inheritance diagram for agg::sRGB_lut< LinearType >:

Typedef Documentation

◆ blender_bgr24

◆ blender_bgr24_pre

◆ blender_bgr48

◆ blender_bgr48_pre

◆ blender_bgr96

◆ blender_bgr96_pre

◆ blender_gray16

◆ blender_gray16_pre

◆ blender_gray32

◆ blender_gray32_pre

◆ blender_gray8

◆ blender_gray8_pre

◆ blender_rgb24

◆ blender_rgb24_pre

◆ blender_rgb48

◆ blender_rgb48_pre

◆ blender_rgb96

◆ blender_rgb96_pre

◆ blender_sbgr24

◆ blender_sbgr24_pre

◆ blender_sgray8

◆ blender_sgray8_pre

◆ blender_srgb24

◆ blender_srgb24_pre

◆ cover_type

typedef unsigned char agg::cover_type

◆ gray8

◆ int16

◆ int16u

◆ int32

◆ int32u

◆ int64

◆ int64u

◆ int8

◆ int8u

◆ path_storage

◆ pixfmt_bgr24

◆ pixfmt_bgr24_pre

◆ pixfmt_bgr48

◆ pixfmt_bgr48_pre

◆ pixfmt_bgr96

◆ pixfmt_bgr96_pre

◆ pixfmt_bgrx128

◆ pixfmt_bgrx128_pre

◆ pixfmt_bgrx32

◆ pixfmt_bgrx32_pre

◆ pixfmt_bgrx64

◆ pixfmt_bgrx64_pre

◆ pixfmt_gray16

◆ pixfmt_gray16_pre

◆ pixfmt_gray32

◆ pixfmt_gray32_pre

◆ pixfmt_gray8

◆ pixfmt_gray8_pre

◆ pixfmt_rgb24

◆ pixfmt_rgb24_pre

◆ pixfmt_rgb48

◆ pixfmt_rgb48_pre

◆ pixfmt_rgb96

◆ pixfmt_rgb96_pre

◆ pixfmt_rgbx128

◆ pixfmt_rgbx128_pre

◆ pixfmt_rgbx32

◆ pixfmt_rgbx32_pre

◆ pixfmt_rgbx64

◆ pixfmt_rgbx64_pre

◆ pixfmt_sbgr24

◆ pixfmt_sbgr24_pre

◆ pixfmt_sbgrx32

◆ pixfmt_sbgrx32_pre

◆ pixfmt_sgray8

◆ pixfmt_sgray8_pre

◆ pixfmt_srgb24

◆ pixfmt_srgb24_pre

◆ pixfmt_srgbx32

◆ pixfmt_srgbx32_pre

◆ pixfmt_sxbgr32

◆ pixfmt_sxbgr32_pre

◆ pixfmt_sxrgb32

◆ pixfmt_sxrgb32_pre

◆ pixfmt_xbgr128

◆ pixfmt_xbgr128_pre

◆ pixfmt_xbgr32

◆ pixfmt_xbgr32_pre

◆ pixfmt_xbgr64

◆ pixfmt_xbgr64_pre

◆ pixfmt_xrgb128

◆ pixfmt_xrgb128_pre

◆ pixfmt_xrgb32

◆ pixfmt_xrgb32_pre

◆ pixfmt_xrgb64

◆ pixfmt_xrgb64_pre

◆ point_d

typedef point_base<double> agg::point_d

◆ point_f

typedef point_base<float> agg::point_f

◆ point_i

typedef point_base<int> agg::point_i

◆ rasterizer_sl_clip_dbl

◆ rasterizer_sl_clip_dbl_3x

◆ rasterizer_sl_clip_int

◆ rasterizer_sl_clip_int_3x

◆ rasterizer_sl_clip_int_sat

◆ rect_d

typedef rect_base<double> agg::rect_d

◆ rect_f

typedef rect_base<float> agg::rect_f

◆ rect_i

typedef rect_base<int> agg::rect_i

◆ rendering_buffer

◆ rgba8

◆ sgray8

◆ srgba8

◆ vertex_d

typedef vertex_base<double> agg::vertex_d

◆ vertex_f

typedef vertex_base<float> agg::vertex_f

◆ vertex_i

typedef vertex_base<int> agg::vertex_i

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
qsort_threshold 
509 {
511 };
@ qsort_threshold
Definition agg_rasterizer_cells_aa.h:510

◆ clipping_flags_e

Enumerator
clipping_flags_x1_clipped 
clipping_flags_x2_clipped 
clipping_flags_y1_clipped 
clipping_flags_y2_clipped 
clipping_flags_x_clipped 
clipping_flags_y_clipped 
29 {
36 };
@ clipping_flags_x_clipped
Definition agg_clip_liang_barsky.h:34
@ clipping_flags_y1_clipped
Definition agg_clip_liang_barsky.h:32
@ clipping_flags_y2_clipped
Definition agg_clip_liang_barsky.h:33
@ clipping_flags_x2_clipped
Definition agg_clip_liang_barsky.h:31
@ clipping_flags_y_clipped
Definition agg_clip_liang_barsky.h:35
@ clipping_flags_x1_clipped
Definition agg_clip_liang_barsky.h:30

◆ cover_scale_e

Enumerator
cover_shift 
cover_size 
cover_mask 
cover_none 
cover_full 
239 {
240 cover_shift = 8, //----cover_shift
241 cover_size = 1 << cover_shift, //----cover_size
242 cover_mask = cover_size - 1, //----cover_mask
243 cover_none = 0, //----cover_none
244 cover_full = cover_mask //----cover_full
245 };
@ cover_shift
Definition agg_basics.h:240
@ cover_full
Definition agg_basics.h:244
@ cover_size
Definition agg_basics.h:241
@ cover_mask
Definition agg_basics.h:242
@ cover_none
Definition agg_basics.h:243

◆ filling_rule_e

Enumerator
fill_non_zero 
fill_even_odd 
262 {
265 };
@ fill_even_odd
Definition agg_basics.h:264
@ fill_non_zero
Definition agg_basics.h:263

◆ path_commands_e

Enumerator
path_cmd_stop 
path_cmd_move_to 
path_cmd_line_to 
path_cmd_curve3 
path_cmd_curve4 
path_cmd_curveN 
path_cmd_catrom 
path_cmd_ubspline 
path_cmd_end_poly 
path_cmd_mask 
369 {
370 path_cmd_stop = 0, //----path_cmd_stop
371 path_cmd_move_to = 1, //----path_cmd_move_to
372 path_cmd_line_to = 2, //----path_cmd_line_to
373 path_cmd_curve3 = 3, //----path_cmd_curve3
374 path_cmd_curve4 = 4, //----path_cmd_curve4
375 path_cmd_curveN = 5, //----path_cmd_curveN
376 path_cmd_catrom = 6, //----path_cmd_catrom
377 path_cmd_ubspline = 7, //----path_cmd_ubspline
378 path_cmd_end_poly = 0x0F, //----path_cmd_end_poly
379 path_cmd_mask = 0x0F //----path_cmd_mask
380 };
@ path_cmd_catrom
Definition agg_basics.h:376
@ path_cmd_curveN
Definition agg_basics.h:375
@ path_cmd_curve3
Definition agg_basics.h:373
@ path_cmd_curve4
Definition agg_basics.h:374
@ path_cmd_move_to
Definition agg_basics.h:371
@ path_cmd_mask
Definition agg_basics.h:379
@ path_cmd_line_to
Definition agg_basics.h:372
@ path_cmd_ubspline
Definition agg_basics.h:377
@ path_cmd_stop
Definition agg_basics.h:370
@ path_cmd_end_poly
Definition agg_basics.h:378

◆ path_flags_e

Enumerator
path_flags_none 
path_flags_ccw 
path_flags_cw 
path_flags_close 
path_flags_mask 
384 {
385 path_flags_none = 0, //----path_flags_none
386 path_flags_ccw = 0x10, //----path_flags_ccw
387 path_flags_cw = 0x20, //----path_flags_cw
388 path_flags_close = 0x40, //----path_flags_close
389 path_flags_mask = 0xF0 //----path_flags_mask
390 };
@ path_flags_cw
Definition agg_basics.h:387
@ path_flags_mask
Definition agg_basics.h:389
@ path_flags_ccw
Definition agg_basics.h:386
@ path_flags_close
Definition agg_basics.h:388
@ path_flags_none
Definition agg_basics.h:385

◆ poly_max_coord_e

Enumerator
poly_max_coord 
24 {
25 poly_max_coord = (1 << 30) - 1 //----poly_max_coord
26 };
@ poly_max_coord
Definition agg_rasterizer_sl_clip.h:25

◆ poly_subpixel_scale_e

Enumerator
poly_subpixel_shift 
poly_subpixel_scale 
poly_subpixel_mask 
254 {
255 poly_subpixel_shift = 8, //----poly_subpixel_shift
256 poly_subpixel_scale = 1<<poly_subpixel_shift, //----poly_subpixel_scale
257 poly_subpixel_mask = poly_subpixel_scale-1 //----poly_subpixel_mask
258 };
@ poly_subpixel_shift
Definition agg_basics.h:255
@ poly_subpixel_scale
Definition agg_basics.h:256
@ poly_subpixel_mask
Definition agg_basics.h:257

◆ quick_sort_threshold_e

Enumerator
quick_sort_threshold 
904 {
906 };
@ quick_sort_threshold
Definition agg_array.h:905

Function Documentation

◆ arc_to_bezier()

void agg::arc_to_bezier ( double  cx,
double  cy,
double  rx,
double  ry,
double  start_angle,
double  sweep_angle,
double *  curve 
)

◆ argb8_packed()

rgba8 agg::argb8_packed ( unsigned  v)
inline
641 {
642 return rgba8((v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF, v >> 24);
643 }
Definition agg_color_rgba.h:247

◆ besj()

double agg::besj ( double  x,
int  n 
)
inline
366 {
367 if(n < 0)
368 {
369 return 0;
370 }
371 double d = 1E-6;
372 double b = 0;
373 if(fabs(x) <= d)
374 {
375 if(n != 0) return 0;
376 return 1;
377 }
378 double b1 = 0; // b1 is the value from the previous iteration
379 // Set up a starting order for recurrence
380 int m1 = (int)fabs(x) + 6;
381 if(fabs(x) > 5)
382 {
383 m1 = (int)(fabs(1.4 * x + 60 / x));
384 }
385 int m2 = (int)(n + 2 + fabs(x) / 4);
386 if (m1 > m2)
387 {
388 m2 = m1;
389 }
390
391 // Apply recurrence down from curent max order
392 for(;;)
393 {
394 double c3 = 0;
395 double c2 = 1E-30;
396 double c4 = 0;
397 int m8 = 1;
398 if (m2 / 2 * 2 == m2)
399 {
400 m8 = -1;
401 }
402 int imax = m2 - 2;
403 for (int i = 1; i <= imax; i++)
404 {
405 double c6 = 2 * (m2 - i) * c2 / x - c3;
406 c3 = c2;
407 c2 = c6;
408 if(m2 - i - 1 == n)
409 {
410 b = c6;
411 }
412 m8 = -1 * m8;
413 if (m8 > 0)
414 {
415 c4 = c4 + 2 * c6;
416 }
417 }
418 double c6 = 2 * c2 / x - c3;
419 if(n == 0)
420 {
421 b = c6;
422 }
423 c4 += c6;
424 b /= c4;
425 if(fabs(b - b1) < d)
426 {
427 return b;
428 }
429 b1 = b;
430 m2 += 3;
431 }
432 }
@ E
Definition libslic3r.h:101
TCoord< P > x(const P &p)
Definition geometry_traits.hpp:297

◆ bgr8_packed()

rgba8 agg::bgr8_packed ( unsigned  v)
inline
635 {
636 return rgba8(v & 0xFF, (v >> 8) & 0xFF, (v >> 16) & 0xFF);
637 }

◆ binary_search_pos()

template<class Array , class Value , class Less >
unsigned agg::binary_search_pos ( const Array &  arr,
const Value &  val,
Less  less 
)
1061 {
1062 if(arr.size() == 0) return 0;
1063
1064 unsigned beg = 0;
1065 unsigned end = arr.size() - 1;
1066
1067 if(less(val, arr[0])) return 0;
1068 if(less(arr[end], val)) return end + 1;
1069
1070 while(end - beg > 1)
1071 {
1072 unsigned mid = (end + beg) >> 1;
1073 if(less(val, arr[mid])) end = mid;
1074 else beg = mid;
1075 }
1076
1077 //if(beg <= 0 && less(val, arr[0])) return 0;
1078 //if(end >= arr.size() - 1 && less(arr[end], val)) ++end;
1079
1080 return end;
1081 }

◆ calc_distance()

AGG_INLINE double agg::calc_distance ( double  x1,
double  y1,
double  x2,
double  y2 
)
58 {
59 double dx = x2-x1;
60 double dy = y2-y1;
61 return sqrt(dx * dx + dy * dy);
62 }
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Definition ArrayCwiseUnaryOps.h:152

References sqrt().

Referenced by agg::path_base< VertexContainer >::arc_to(), calc_line_point_distance(), and agg::path_base< VertexContainer >::join_path().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calc_intersection()

AGG_INLINE bool agg::calc_intersection ( double  ax,
double  ay,
double  bx,
double  by,
double  cx,
double  cy,
double  dx,
double  dy,
double *  x,
double *  y 
)
139 {
140 double num = (ay-cy) * (dx-cx) - (ax-cx) * (dy-cy);
141 double den = (bx-ax) * (dy-cy) - (by-ay) * (dx-cx);
142 if(fabs(den) < intersection_epsilon) return false;
143 double r = num / den;
144 *x = ax + r * (bx-ax);
145 *y = ay + r * (by-ay);
146 return true;
147 }
const double intersection_epsilon
Definition agg_math.h:34

References intersection_epsilon.

◆ calc_line_point_distance()

AGG_INLINE double agg::calc_line_point_distance ( double  x1,
double  y1,
double  x2,
double  y2,
double  x,
double  y 
)
76 {
77 double dx = x2-x1;
78 double dy = y2-y1;
79 double d = sqrt(dx * dx + dy * dy);
80 if(d < vertex_dist_epsilon)
81 {
82 return calc_distance(x1, y1, x, y);
83 }
84 return ((x - x2) * dy - (y - y2) * dx) / d;
85 }
AGG_INLINE double calc_distance(double x1, double y1, double x2, double y2)
Definition agg_math.h:57

References calc_distance(), sqrt(), and vertex_dist_epsilon.

+ Here is the call graph for this function:

◆ calc_orthogonal()

AGG_INLINE void agg::calc_orthogonal ( double  thickness,
double  x1,
double  y1,
double  x2,
double  y2,
double *  x,
double *  y 
)
181 {
182 double dx = x2 - x1;
183 double dy = y2 - y1;
184 double d = sqrt(dx*dx + dy*dy);
185 *x = thickness * dy / d;
186 *y = -thickness * dx / d;
187 }

References sqrt().

Referenced by dilate_triangle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calc_polygon_area()

template<class Storage >
double agg::calc_polygon_area ( const Storage &  st)
231 {
232 unsigned i;
233 double sum = 0.0;
234 double x = st[0].x;
235 double y = st[0].y;
236 double xs = x;
237 double ys = y;
238
239 for(i = 1; i < st.size(); i++)
240 {
241 const typename Storage::value_type& v = st[i];
242 sum += x * v.y - y * v.x;
243 x = v.x;
244 y = v.y;
245 }
246 return (sum + x * ys - y * xs) * 0.5;
247 }

◆ calc_segment_point_sq_distance() [1/2]

AGG_INLINE double agg::calc_segment_point_sq_distance ( double  x1,
double  y1,
double  x2,
double  y2,
double  x,
double  y 
)
128 {
129 return
131 x1, y1, x2, y2, x, y,
132 calc_segment_point_u(x1, y1, x2, y2, x, y));
133 }
AGG_INLINE double calc_segment_point_sq_distance(double x1, double y1, double x2, double y2, double x, double y, double u)
Definition agg_math.h:107
AGG_INLINE double calc_segment_point_u(double x1, double y1, double x2, double y2, double x, double y)
Definition agg_math.h:88

References calc_segment_point_sq_distance(), and calc_segment_point_u().

+ Here is the call graph for this function:

◆ calc_segment_point_sq_distance() [2/2]

AGG_INLINE double agg::calc_segment_point_sq_distance ( double  x1,
double  y1,
double  x2,
double  y2,
double  x,
double  y,
double  u 
)
111 {
112 if(u <= 0)
113 {
114 return calc_sq_distance(x, y, x1, y1);
115 }
116 else
117 if(u >= 1)
118 {
119 return calc_sq_distance(x, y, x2, y2);
120 }
121 return calc_sq_distance(x, y, x1 + u * (x2 - x1), y1 + u * (y2 - y1));
122 }
AGG_INLINE double calc_sq_distance(double x1, double y1, double x2, double y2)
Definition agg_math.h:65

References calc_sq_distance().

Referenced by calc_segment_point_sq_distance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calc_segment_point_u()

AGG_INLINE double agg::calc_segment_point_u ( double  x1,
double  y1,
double  x2,
double  y2,
double  x,
double  y 
)
91 {
92 double dx = x2 - x1;
93 double dy = y2 - y1;
94
95 if(dx == 0 && dy == 0)
96 {
97 return 0;
98 }
99
100 double pdx = x - x1;
101 double pdy = y - y1;
102
103 return (pdx * dx + pdy * dy) / (dx * dx + dy * dy);
104 }

Referenced by calc_segment_point_sq_distance().

+ Here is the caller graph for this function:

◆ calc_sq_distance()

AGG_INLINE double agg::calc_sq_distance ( double  x1,
double  y1,
double  x2,
double  y2 
)
66 {
67 double dx = x2-x1;
68 double dy = y2-y1;
69 return dx * dx + dy * dy;
70 }

Referenced by calc_segment_point_sq_distance().

+ Here is the caller graph for this function:

◆ calc_triangle_area()

AGG_INLINE double agg::calc_triangle_area ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3 
)
225 {
226 return (x1*y2 - x2*y1 + x2*y3 - x3*y2 + x3*y1 - x1*y3) * 0.5;
227 }

◆ clear_orientation()

unsigned agg::clear_orientation ( unsigned  c)
inline
491 {
492 return c & ~(path_flags_cw | path_flags_ccw);
493 }

References path_flags_ccw, and path_flags_cw.

Referenced by set_orientation().

+ Here is the caller graph for this function:

◆ clip_liang_barsky()

template<class T >
unsigned agg::clip_liang_barsky ( x1,
y1,
x2,
y2,
const rect_base< T > &  clip_box,
T *  x,
T *  y 
)
inline
86 {
87 const double nearzero = 1e-30;
88
89 double deltax = x2 - x1;
90 double deltay = y2 - y1;
91 double xin;
92 double xout;
93 double yin;
94 double yout;
95 double tinx;
96 double tiny;
97 double toutx;
98 double touty;
99 double tin1;
100 double tin2;
101 double tout1;
102 unsigned np = 0;
103
104 if(deltax == 0.0)
105 {
106 // bump off of the vertical
107 deltax = (x1 > clip_box.x1) ? -nearzero : nearzero;
108 }
109
110 if(deltay == 0.0)
111 {
112 // bump off of the horizontal
113 deltay = (y1 > clip_box.y1) ? -nearzero : nearzero;
114 }
115
116 if(deltax > 0.0)
117 {
118 // points to right
119 xin = clip_box.x1;
120 xout = clip_box.x2;
121 }
122 else
123 {
124 xin = clip_box.x2;
125 xout = clip_box.x1;
126 }
127
128 if(deltay > 0.0)
129 {
130 // points up
131 yin = clip_box.y1;
132 yout = clip_box.y2;
133 }
134 else
135 {
136 yin = clip_box.y2;
137 yout = clip_box.y1;
138 }
139
140 tinx = (xin - x1) / deltax;
141 tiny = (yin - y1) / deltay;
142
143 if (tinx < tiny)
144 {
145 // hits x first
146 tin1 = tinx;
147 tin2 = tiny;
148 }
149 else
150 {
151 // hits y first
152 tin1 = tiny;
153 tin2 = tinx;
154 }
155
156 if(tin1 <= 1.0)
157 {
158 if(0.0 < tin1)
159 {
160 *x++ = (T)xin;
161 *y++ = (T)yin;
162 ++np;
163 }
164
165 if(tin2 <= 1.0)
166 {
167 toutx = (xout - x1) / deltax;
168 touty = (yout - y1) / deltay;
169
170 tout1 = (toutx < touty) ? toutx : touty;
171
172 if(tin2 > 0.0 || tout1 > 0.0)
173 {
174 if(tin2 <= tout1)
175 {
176 if(tin2 > 0.0)
177 {
178 if(tinx > tiny)
179 {
180 *x++ = (T)xin;
181 *y++ = (T)(y1 + tinx * deltay);
182 }
183 else
184 {
185 *x++ = (T)(x1 + tiny * deltax);
186 *y++ = (T)yin;
187 }
188 ++np;
189 }
190
191 if(tout1 < 1.0)
192 {
193 if(toutx < touty)
194 {
195 *x++ = (T)xout;
196 *y++ = (T)(y1 + toutx * deltay);
197 }
198 else
199 {
200 *x++ = (T)(x1 + touty * deltax);
201 *y++ = (T)yout;
202 }
203 }
204 else
205 {
206 *x++ = x2;
207 *y++ = y2;
208 }
209 ++np;
210 }
211 else
212 {
213 if(tinx > tiny)
214 {
215 *x++ = (T)xin;
216 *y++ = (T)yout;
217 }
218 else
219 {
220 *x++ = (T)xout;
221 *y++ = (T)yin;
222 }
223 ++np;
224 }
225 }
226 }
227 }
228 return np;
229 }
const Scalar & y
Definition MathFunctions.h:552
T y1
Definition agg_basics.h:287
T y2
Definition agg_basics.h:287
T x2
Definition agg_basics.h:287
T x1
Definition agg_basics.h:287

References agg::rect_base< T >::x1, agg::rect_base< T >::x2, agg::rect_base< T >::y1, and agg::rect_base< T >::y2.

◆ clip_line_segment()

template<class T >
unsigned agg::clip_line_segment ( T *  x1,
T *  y1,
T *  x2,
T *  y2,
const rect_base< T > &  clip_box 
)
273 {
274 unsigned f1 = clipping_flags(*x1, *y1, clip_box);
275 unsigned f2 = clipping_flags(*x2, *y2, clip_box);
276 unsigned ret = 0;
277
278 if((f2 | f1) == 0)
279 {
280 // Fully visible
281 return 0;
282 }
283
284 if((f1 & clipping_flags_x_clipped) != 0 &&
285 (f1 & clipping_flags_x_clipped) == (f2 & clipping_flags_x_clipped))
286 {
287 // Fully clipped
288 return 4;
289 }
290
291 if((f1 & clipping_flags_y_clipped) != 0 &&
292 (f1 & clipping_flags_y_clipped) == (f2 & clipping_flags_y_clipped))
293 {
294 // Fully clipped
295 return 4;
296 }
297
298 T tx1 = *x1;
299 T ty1 = *y1;
300 T tx2 = *x2;
301 T ty2 = *y2;
302 if(f1)
303 {
304 if(!clip_move_point(tx1, ty1, tx2, ty2, clip_box, x1, y1, f1))
305 {
306 return 4;
307 }
308 if(*x1 == *x2 && *y1 == *y2)
309 {
310 return 4;
311 }
312 ret |= 1;
313 }
314 if(f2)
315 {
316 if(!clip_move_point(tx1, ty1, tx2, ty2, clip_box, x2, y2, f2))
317 {
318 return 4;
319 }
320 if(*x1 == *x2 && *y1 == *y2)
321 {
322 return 4;
323 }
324 ret |= 2;
325 }
326 return ret;
327 }
unsigned clipping_flags(T x, T y, const rect_base< T > &clip_box)
Definition agg_clip_liang_barsky.h:57
bool clip_move_point(T x1, T y1, T x2, T y2, const rect_base< T > &clip_box, T *x, T *y, unsigned flags)
Definition agg_clip_liang_barsky.h:234

References clip_move_point(), clipping_flags(), clipping_flags_x_clipped, and clipping_flags_y_clipped.

+ Here is the call graph for this function:

◆ clip_move_point()

template<class T >
bool agg::clip_move_point ( x1,
y1,
x2,
y2,
const rect_base< T > &  clip_box,
T *  x,
T *  y,
unsigned  flags 
)
237 {
238 T bound;
239
240 if(flags & clipping_flags_x_clipped)
241 {
242 if(x1 == x2)
243 {
244 return false;
245 }
246 bound = (flags & clipping_flags_x1_clipped) ? clip_box.x1 : clip_box.x2;
247 *y = (T)(double(bound - x1) * (y2 - y1) / (x2 - x1) + y1);
248 *x = bound;
249 }
250
251 flags = clipping_flags_y(*y, clip_box);
252 if(flags & clipping_flags_y_clipped)
253 {
254 if(y1 == y2)
255 {
256 return false;
257 }
258 bound = (flags & clipping_flags_y1_clipped) ? clip_box.y1 : clip_box.y2;
259 *x = (T)(double(bound - y1) * (x2 - x1) / (y2 - y1) + x1);
260 *y = bound;
261 }
262 return true;
263 }
unsigned clipping_flags_y(T y, const rect_base< T > &clip_box)
Definition agg_clip_liang_barsky.h:75
Bound< T > bound(const T &min, const T &max)
Definition optimizer.hpp:45

References clipping_flags_x1_clipped, clipping_flags_x_clipped, clipping_flags_y(), clipping_flags_y1_clipped, clipping_flags_y_clipped, agg::rect_base< T >::x1, agg::rect_base< T >::x2, agg::rect_base< T >::y1, and agg::rect_base< T >::y2.

Referenced by clip_line_segment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clipping_flags()

template<class T >
unsigned agg::clipping_flags ( x,
y,
const rect_base< T > &  clip_box 
)
inline
58 {
59 return (x > clip_box.x2) |
60 ((y > clip_box.y2) << 1) |
61 ((x < clip_box.x1) << 2) |
62 ((y < clip_box.y1) << 3);
63 }

References agg::rect_base< T >::x1, agg::rect_base< T >::x2, agg::rect_base< T >::y1, and agg::rect_base< T >::y2.

Referenced by clip_line_segment(), agg::rasterizer_sl_clip< Conv >::line_to(), and agg::rasterizer_sl_clip< Conv >::move_to().

+ Here is the caller graph for this function:

◆ clipping_flags_x()

template<class T >
unsigned agg::clipping_flags_x ( x,
const rect_base< T > &  clip_box 
)
inline
68 {
69 return (x > clip_box.x2) | ((x < clip_box.x1) << 2);
70 }

References agg::rect_base< T >::x1, and agg::rect_base< T >::x2.

◆ clipping_flags_y()

template<class T >
unsigned agg::clipping_flags_y ( y,
const rect_base< T > &  clip_box 
)
inline
76 {
77 return ((y > clip_box.y2) << 1) | ((y < clip_box.y1) << 3);
78 }

References agg::rect_base< T >::y1, and agg::rect_base< T >::y2.

Referenced by clip_move_point(), and agg::rasterizer_sl_clip< Conv >::line_to().

+ Here is the caller graph for this function:

◆ cross_product()

AGG_INLINE double agg::cross_product ( double  x1,
double  y1,
double  x2,
double  y2,
double  x,
double  y 
)
40 {
41 return (x - x2) * (y2 - y1) - (y - y2) * (x2 - x1);
42 }

Referenced by dilate_triangle(), and point_in_triangle().

+ Here is the caller graph for this function:

◆ deg2rad()

double agg::deg2rad ( double  deg)
inline
272 {
273 return deg * pi / 180.0;
274 }
const double pi
Definition agg_basics.h:268

References pi.

◆ dilate_triangle()

AGG_INLINE void agg::dilate_triangle ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3,
double *  x,
double *  y,
double  d 
)
195 {
196 double dx1=0.0;
197 double dy1=0.0;
198 double dx2=0.0;
199 double dy2=0.0;
200 double dx3=0.0;
201 double dy3=0.0;
202 double loc = cross_product(x1, y1, x2, y2, x3, y3);
203 if(fabs(loc) > intersection_epsilon)
204 {
205 if(cross_product(x1, y1, x2, y2, x3, y3) > 0.0)
206 {
207 d = -d;
208 }
209 calc_orthogonal(d, x1, y1, x2, y2, &dx1, &dy1);
210 calc_orthogonal(d, x2, y2, x3, y3, &dx2, &dy2);
211 calc_orthogonal(d, x3, y3, x1, y1, &dx3, &dy3);
212 }
213 *x++ = x1 + dx1; *y++ = y1 + dy1;
214 *x++ = x2 + dx1; *y++ = y2 + dy1;
215 *x++ = x2 + dx2; *y++ = y2 + dy2;
216 *x++ = x3 + dx2; *y++ = y3 + dy2;
217 *x++ = x3 + dx3; *y++ = y3 + dy3;
218 *x++ = x1 + dx3; *y++ = y1 + dy3;
219 }
AGG_INLINE double cross_product(double x1, double y1, double x2, double y2, double x, double y)
Definition agg_math.h:37

References calc_orthogonal(), cross_product(), and intersection_epsilon.

+ Here is the call graph for this function:

◆ fast_sqrt()

AGG_INLINE unsigned agg::fast_sqrt ( unsigned  val)
262 {
263 #if defined(_M_IX86) && defined(_MSC_VER) && !defined(AGG_NO_ASM)
264 //For Ix86 family processors this assembler code is used.
265 //The key command here is bsr - determination the number of the most
266 //significant bit of the value. For other processors
267 //(and maybe compilers) the pure C "#else" section is used.
268 __asm
269 {
270 mov ebx, val
271 mov edx, 11
272 bsr ecx, ebx
273 sub ecx, 9
274 jle less_than_9_bits
275 shr ecx, 1
276 adc ecx, 0
277 sub edx, ecx
278 shl ecx, 1
279 shr ebx, cl
280 less_than_9_bits:
281 xor eax, eax
282 mov ax, g_sqrt_table[ebx*2]
283 mov ecx, edx
284 shr eax, cl
285 }
286 #else
287
288 //This code is actually pure C and portable to most
289 //arcitectures including 64bit ones.
290 unsigned t = val;
291 int bit=0;
292 unsigned shift = 11;
293
294 //The following piece of code is just an emulation of the
295 //Ix86 assembler command "bsr" (see above). However on old
296 //Intels (like Intel MMX 233MHz) this code is about twice
297 //faster (sic!) then just one "bsr". On PIII and PIV the
298 //bsr is optimized quite well.
299 bit = t >> 24;
300 if(bit)
301 {
302 bit = g_elder_bit_table[bit] + 24;
303 }
304 else
305 {
306 bit = (t >> 16) & 0xFF;
307 if(bit)
308 {
309 bit = g_elder_bit_table[bit] + 16;
310 }
311 else
312 {
313 bit = (t >> 8) & 0xFF;
314 if(bit)
315 {
316 bit = g_elder_bit_table[bit] + 8;
317 }
318 else
319 {
320 bit = g_elder_bit_table[t];
321 }
322 }
323 }
324
325 //This code calculates the sqrt.
326 bit -= 9;
327 if(bit > 0)
328 {
329 bit = (bit >> 1) + (bit & 1);
330 shift -= bit;
331 val >>= (bit << 1);
332 }
333 return g_sqrt_table[val] >> shift;
334 #endif
335 }
int16u g_sqrt_table[1024]
int8 g_elder_bit_table[256]

References g_elder_bit_table, and g_sqrt_table.

◆ get_close_flag()

unsigned agg::get_close_flag ( unsigned  c)
inline
485 {
486 return c & path_flags_close;
487 }

References path_flags_close.

◆ get_orientation()

unsigned agg::get_orientation ( unsigned  c)
inline
497 {
498 return c & (path_flags_cw | path_flags_ccw);
499 }

References path_flags_ccw, and path_flags_cw.

◆ iceil()

AGG_INLINE int agg::iceil ( double  v)
206 {
207 return int(ceil(v));
208 }
EIGEN_DEVICE_FUNC const CeilReturnType ceil() const
Definition ArrayCwiseUnaryOps.h:402

References ceil().

+ Here is the call graph for this function:

◆ ifloor()

AGG_INLINE int agg::ifloor ( double  v)
197 {
198 int i = int(v);
199 return i - (i > v);
200 }

◆ int_greater()

bool agg::int_greater ( int  a,
int  b 
)
inline
1110{ return a > b; }

◆ int_less()

bool agg::int_less ( int  a,
int  b 
)
inline
1107{ return a < b; }

◆ intersect_rectangles()

template<class Rect >
Rect agg::intersect_rectangles ( const Rect &  r1,
const Rect &  r2 
)
inline
335 {
336 Rect r = r1;
337
338 // First process x2,y2 because the other order
339 // results in Internal Compiler Error under
340 // Microsoft Visual C++ .NET 2003 69462-335-0000007-18038 in
341 // case of "Maximize Speed" optimization option.
342 //-----------------
343 if(r.x2 > r2.x2) r.x2 = r2.x2;
344 if(r.y2 > r2.y2) r.y2 = r2.y2;
345 if(r.x1 < r2.x1) r.x1 = r2.x1;
346 if(r.y1 < r2.y1) r.y1 = r2.y1;
347 return r;
348 }

◆ intersection_exists()

AGG_INLINE bool agg::intersection_exists ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3,
double  x4,
double  y4 
)
152 {
153 // It's less expensive but you can't control the
154 // boundary conditions: Less or LessEqual
155 double dx1 = x2 - x1;
156 double dy1 = y2 - y1;
157 double dx2 = x4 - x3;
158 double dy2 = y4 - y3;
159 return ((x3 - x2) * dy1 - (y3 - y2) * dx1 < 0.0) !=
160 ((x4 - x2) * dy1 - (y4 - y2) * dx1 < 0.0) &&
161 ((x1 - x4) * dy2 - (y1 - y4) * dx2 < 0.0) !=
162 ((x2 - x4) * dy2 - (y2 - y4) * dx2 < 0.0);
163
164 // It's is more expensive but more flexible
165 // in terms of boundary conditions.
166 //--------------------
167 //double den = (x2-x1) * (y4-y3) - (y2-y1) * (x4-x3);
168 //if(fabs(den) < intersection_epsilon) return false;
169 //double nom1 = (x4-x3) * (y1-y3) - (y4-y3) * (x1-x3);
170 //double nom2 = (x2-x1) * (y1-y3) - (y2-y1) * (x1-x3);
171 //double ua = nom1 / den;
172 //double ub = nom2 / den;
173 //return ua >= 0.0 && ua <= 1.0 && ub >= 0.0 && ub <= 1.0;
174 }

◆ invert_container()

template<class Array >
void agg::invert_container ( Array &  arr)
1049 {
1050 int i = 0;
1051 int j = arr.size() - 1;
1052 while(i < j)
1053 {
1054 swap_elements(arr[i++], arr[j--]);
1055 }
1056 }
void swap_elements(T &a, T &b)
Definition agg_array.h:910

References swap_elements().

+ Here is the call graph for this function:

◆ iround()

AGG_INLINE int agg::iround ( double  v)
189 {
190 return int((v < 0.0) ? v - 0.5 : v + 0.5);
191 }

Referenced by agg::saturation< Limit >::iround(), agg::ras_conv_int::mul_div(), agg::ras_conv_int_3x::mul_div(), agg::ras_conv_int::upscale(), agg::ras_conv_int_3x::upscale(), agg::ras_conv_dbl::xi(), agg::ras_conv_dbl_3x::xi(), agg::ras_conv_dbl::yi(), and agg::ras_conv_dbl_3x::yi().

+ Here is the caller graph for this function:

◆ is_ccw()

bool agg::is_ccw ( unsigned  c)
inline
467 {
468 return (c & path_flags_ccw) != 0;
469 }

References path_flags_ccw.

◆ is_close()

bool agg::is_close ( unsigned  c)
inline
448 {
449 return (c & ~(path_flags_cw | path_flags_ccw)) ==
451 }

References path_cmd_end_poly, path_flags_ccw, path_flags_close, and path_flags_cw.

Referenced by agg::rasterizer_scanline_aa< Clip >::add_vertex(), and agg::rasterizer_scanline_aa_nogamma< Clip >::add_vertex().

+ Here is the caller graph for this function:

◆ is_closed()

bool agg::is_closed ( unsigned  c)
inline
479 {
480 return (c & path_flags_close) != 0;
481 }

References path_flags_close.

◆ is_curve()

bool agg::is_curve ( unsigned  c)
inline
424 {
425 return c == path_cmd_curve3 || c == path_cmd_curve4;
426 }

References path_cmd_curve3, and path_cmd_curve4.

Referenced by agg::path_base< VertexContainer >::curve3(), and agg::path_base< VertexContainer >::curve4().

+ Here is the caller graph for this function:

◆ is_curve3()

bool agg::is_curve3 ( unsigned  c)
inline
430 {
431 return c == path_cmd_curve3;
432 }

References path_cmd_curve3.

◆ is_curve4()

bool agg::is_curve4 ( unsigned  c)
inline
436 {
437 return c == path_cmd_curve4;
438 }

References path_cmd_curve4.

◆ is_cw()

bool agg::is_cw ( unsigned  c)
inline
461 {
462 return (c & path_flags_cw) != 0;
463 }

References path_flags_cw.

◆ is_drawing()

bool agg::is_drawing ( unsigned  c)
inline
400 {
401 return c >= path_cmd_line_to && c < path_cmd_end_poly;
402 }

References path_cmd_end_poly, and path_cmd_line_to.

Referenced by agg::path_base< VertexContainer >::align_path().

+ Here is the caller graph for this function:

◆ is_end_poly()

bool agg::is_end_poly ( unsigned  c)
inline
442 {
443 return (c & path_cmd_mask) == path_cmd_end_poly;
444 }

References path_cmd_end_poly, and path_cmd_mask.

Referenced by agg::path_base< VertexContainer >::arrange_polygon_orientation(), and is_next_poly().

+ Here is the caller graph for this function:

◆ is_equal_eps()

template<class T >
bool agg::is_equal_eps ( v1,
v2,
epsilon 
)
inline
553 {
554 bool neg1 = v1 < 0.0;
555 bool neg2 = v2 < 0.0;
556
557 if (neg1 != neg2)
558 return std::fabs(v1) < epsilon && std::fabs(v2) < epsilon;
559
560 int int1, int2;
561 std::frexp(v1, &int1);
562 std::frexp(v2, &int2);
563 int min12 = int1 < int2 ? int1 : int2;
564
565 v1 = std::ldexp(v1, -min12);
566 v2 = std::ldexp(v2, -min12);
567
568 return std::fabs(v1 - v2) < epsilon;
569 }

Referenced by agg::path_base< VertexContainer >::align_path().

+ Here is the caller graph for this function:

◆ is_line_to()

bool agg::is_line_to ( unsigned  c)
inline
418 {
419 return c == path_cmd_line_to;
420 }

References path_cmd_line_to.

◆ is_move_to()

bool agg::is_move_to ( unsigned  c)
inline

◆ is_next_poly()

bool agg::is_next_poly ( unsigned  c)
inline
455 {
456 return is_stop(c) || is_move_to(c) || is_end_poly(c);
457 }
bool is_end_poly(unsigned c)
Definition agg_basics.h:441
bool is_stop(unsigned c)
Definition agg_basics.h:405
bool is_move_to(unsigned c)
Definition agg_basics.h:411

References is_end_poly(), is_move_to(), and is_stop().

Referenced by agg::path_base< VertexContainer >::arrange_polygon_orientation(), and agg::path_base< VertexContainer >::invert_polygon().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_oriented()

bool agg::is_oriented ( unsigned  c)
inline
473 {
474 return (c & (path_flags_cw | path_flags_ccw)) != 0;
475 }

References path_flags_ccw, and path_flags_cw.

◆ is_stop()

◆ is_vertex()

◆ linear_to_sRGB()

double agg::linear_to_sRGB ( double  x)
inline
124 {
125 return (x <= 0.0031308) ? (x * 12.92) : (1.055 * pow(x, 1 / 2.4) - 0.055);
126 }

Referenced by agg::sRGB_lut< float >::sRGB_lut(), agg::sRGB_lut< int16u >::sRGB_lut(), and agg::sRGB_lut< int8u >::sRGB_lut().

+ Here is the caller graph for this function:

◆ operator*()

rgba agg::operator* ( const rgba a,
double  b 
)
inline
189 {
190 return rgba(a) *= b;
191 }
Definition agg_color_rgba.h:48

◆ operator+()

rgba agg::operator+ ( const rgba a,
const rgba b 
)
inline
184 {
185 return rgba(a) += b;
186 }

◆ point_in_triangle()

AGG_INLINE bool agg::point_in_triangle ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3,
double  x,
double  y 
)
49 {
50 bool cp1 = cross_product(x1, y1, x2, y2, x, y) < 0.0;
51 bool cp2 = cross_product(x2, y2, x3, y3, x, y) < 0.0;
52 bool cp3 = cross_product(x3, y3, x1, y1, x, y) < 0.0;
53 return cp1 == cp2 && cp2 == cp3 && cp3 == cp1;
54 }

References cross_product().

+ Here is the call graph for this function:

◆ qsort_cells()

template<class Cell >
void agg::qsort_cells ( Cell **  start,
unsigned  num 
)
517 {
518 Cell** stack[80];
519 Cell*** top;
520 Cell** limit;
521 Cell** base;
522
523 limit = start + num;
524 base = start;
525 top = stack;
526
527 for (;;)
528 {
529 int len = int(limit - base);
530
531 Cell** i;
532 Cell** j;
533 Cell** pivot;
534
535 if(len > qsort_threshold)
536 {
537 // we use base + len/2 as the pivot
538 pivot = base + len / 2;
539 swap_cells(base, pivot);
540
541 i = base + 1;
542 j = limit - 1;
543
544 // now ensure that *i <= *base <= *j
545 if((*j)->x < (*i)->x)
546 {
547 swap_cells(i, j);
548 }
549
550 if((*base)->x < (*i)->x)
551 {
552 swap_cells(base, i);
553 }
554
555 if((*j)->x < (*base)->x)
556 {
557 swap_cells(base, j);
558 }
559
560 for(;;)
561 {
562 int x = (*base)->x;
563 do i++; while( (*i)->x < x );
564 do j--; while( x < (*j)->x );
565
566 if(i > j)
567 {
568 break;
569 }
570
571 swap_cells(i, j);
572 }
573
574 swap_cells(base, j);
575
576 // now, push the largest sub-array
577 if(j - base > limit - i)
578 {
579 top[0] = base;
580 top[1] = j;
581 base = i;
582 }
583 else
584 {
585 top[0] = i;
586 top[1] = limit;
587 limit = j;
588 }
589 top += 2;
590 }
591 else
592 {
593 // the sub-array is small, perform insertion sort
594 j = base;
595 i = j + 1;
596
597 for(; i < limit; j = i, i++)
598 {
599 for(; j[1]->x < (*j)->x; j--)
600 {
601 swap_cells(j + 1, j);
602 if (j == base)
603 {
604 break;
605 }
606 }
607 }
608
609 if(top > stack)
610 {
611 top -= 2;
612 base = top[0];
613 limit = top[1];
614 }
615 else
616 {
617 break;
618 }
619 }
620 }
621 }
static AGG_INLINE void swap_cells(T *a, T *b)
Definition agg_rasterizer_cells_aa.h:499

References qsort_threshold, and swap_cells().

Referenced by agg::rasterizer_cells_aa< Cell >::sort_cells().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quick_sort()

template<class Array , class Less >
void agg::quick_sort ( Array &  arr,
Less  less 
)
921 {
922 if(arr.size() < 2) return;
923
924 typename Array::value_type* e1;
925 typename Array::value_type* e2;
926
927 int stack[80];
928 int* top = stack;
929 int limit = arr.size();
930 int base = 0;
931
932 for(;;)
933 {
934 int len = limit - base;
935
936 int i;
937 int j;
938 int pivot;
939
940 if(len > quick_sort_threshold)
941 {
942 // we use base + len/2 as the pivot
943 pivot = base + len / 2;
944 swap_elements(arr[base], arr[pivot]);
945
946 i = base + 1;
947 j = limit - 1;
948
949 // now ensure that *i <= *base <= *j
950 e1 = &(arr[j]);
951 e2 = &(arr[i]);
952 if(less(*e1, *e2)) swap_elements(*e1, *e2);
953
954 e1 = &(arr[base]);
955 e2 = &(arr[i]);
956 if(less(*e1, *e2)) swap_elements(*e1, *e2);
957
958 e1 = &(arr[j]);
959 e2 = &(arr[base]);
960 if(less(*e1, *e2)) swap_elements(*e1, *e2);
961
962 for(;;)
963 {
964 do i++; while( less(arr[i], arr[base]) );
965 do j--; while( less(arr[base], arr[j]) );
966
967 if( i > j )
968 {
969 break;
970 }
971
972 swap_elements(arr[i], arr[j]);
973 }
974
975 swap_elements(arr[base], arr[j]);
976
977 // now, push the largest sub-array
978 if(j - base > limit - i)
979 {
980 top[0] = base;
981 top[1] = j;
982 base = i;
983 }
984 else
985 {
986 top[0] = i;
987 top[1] = limit;
988 limit = j;
989 }
990 top += 2;
991 }
992 else
993 {
994 // the sub-array is small, perform insertion sort
995 j = base;
996 i = j + 1;
997
998 for(; i < limit; j = i, i++)
999 {
1000 for(; less(*(e1 = &(arr[j + 1])), *(e2 = &(arr[j]))); j--)
1001 {
1002 swap_elements(*e1, *e2);
1003 if(j == base)
1004 {
1005 break;
1006 }
1007 }
1008 }
1009 if(top > stack)
1010 {
1011 top -= 2;
1012 base = top[0];
1013 limit = top[1];
1014 }
1015 else
1016 {
1017 break;
1018 }
1019 }
1020 }
1021 }

References quick_sort_threshold, and swap_elements().

+ Here is the call graph for this function:

◆ rad2deg()

double agg::rad2deg ( double  rad)
inline
278 {
279 return rad * 180.0 / pi;
280 }

References pi.

◆ remove_duplicates()

template<class Array , class Equal >
unsigned agg::remove_duplicates ( Array &  arr,
Equal  equal 
)
1032 {
1033 if(arr.size() < 2) return arr.size();
1034
1035 unsigned i, j;
1036 for(i = 1, j = 1; i < arr.size(); i++)
1037 {
1038 typename Array::value_type& e = arr[i];
1039 if(!equal(e, arr[i - 1]))
1040 {
1041 arr[j++] = e;
1042 }
1043 }
1044 return j;
1045 }

◆ render_all_paths()

template<class Rasterizer , class Scanline , class Renderer , class VertexSource , class ColorStorage , class PathId >
void agg::render_all_paths ( Rasterizer &  ras,
Scanline &  sl,
Renderer &  r,
VertexSource &  vs,
const ColorStorage &  as,
const PathId &  path_id,
unsigned  num_paths 
)
463 {
464 for(unsigned i = 0; i < num_paths; i++)
465 {
466 ras.reset();
467 ras.add_path(vs, path_id[i]);
468 r.color(as[i]);
469 render_scanlines(ras, sl, r);
470 }
471 }
void render_scanlines(Rasterizer &ras, Scanline &sl, Renderer &ren)
Definition agg_renderer_scanline.h:440

References render_scanlines().

+ Here is the call graph for this function:

◆ render_scanline_aa()

template<class Scanline , class BaseRenderer , class SpanAllocator , class SpanGenerator >
void agg::render_scanline_aa ( const Scanline &  sl,
BaseRenderer &  ren,
SpanAllocator &  alloc,
SpanGenerator &  span_gen 
)
157 {
158 int y = sl.y();
159
160 unsigned num_spans = sl.num_spans();
161 typename Scanline::const_iterator span = sl.begin();
162 for(;;)
163 {
164 int x = span->x;
165 int len = span->len;
166 const typename Scanline::cover_type* covers = span->covers;
167
168 if(len < 0) len = -len;
169 typename BaseRenderer::color_type* colors = alloc.allocate(len);
170 span_gen.generate(colors, x, y, len);
171 ren.blend_color_hspan(x, y, len, colors,
172 (span->len < 0) ? 0 : covers, *covers);
173
174 if(--num_spans == 0) break;
175 ++span;
176 }
177 }

Referenced by agg::renderer_scanline_aa< BaseRenderer, SpanAllocator, SpanGenerator >::render(), and render_scanlines_aa().

+ Here is the caller graph for this function:

◆ render_scanline_aa_solid()

template<class Scanline , class BaseRenderer , class ColorT >
void agg::render_scanline_aa_solid ( const Scanline &  sl,
BaseRenderer &  ren,
const ColorT &  color 
)
32 {
33 int y = sl.y();
34 unsigned num_spans = sl.num_spans();
35 typename Scanline::const_iterator span = sl.begin();
36
37 for(;;)
38 {
39 int x = span->x;
40 if(span->len > 0)
41 {
42 ren.blend_solid_hspan(x, y, (unsigned)span->len,
43 color,
44 span->covers);
45 }
46 else
47 {
48 ren.blend_hline(x, y, (unsigned)(x - span->len - 1),
49 color,
50 *(span->covers));
51 }
52 if(--num_spans == 0) break;
53 ++span;
54 }
55 }

Referenced by agg::renderer_scanline_aa_solid< BaseRenderer >::render(), render_scanlines_compound(), and render_scanlines_compound_layered().

+ Here is the caller graph for this function:

◆ render_scanline_bin()

template<class Scanline , class BaseRenderer , class SpanAllocator , class SpanGenerator >
void agg::render_scanline_bin ( const Scanline &  sl,
BaseRenderer &  ren,
SpanAllocator &  alloc,
SpanGenerator &  span_gen 
)
352 {
353 int y = sl.y();
354
355 unsigned num_spans = sl.num_spans();
356 typename Scanline::const_iterator span = sl.begin();
357 for(;;)
358 {
359 int x = span->x;
360 int len = span->len;
361 if(len < 0) len = -len;
362 typename BaseRenderer::color_type* colors = alloc.allocate(len);
363 span_gen.generate(colors, x, y, len);
364 ren.blend_color_hspan(x, y, len, colors, 0, cover_full);
365 if(--num_spans == 0) break;
366 ++span;
367 }
368 }

References cover_full.

Referenced by agg::renderer_scanline_bin< BaseRenderer, SpanAllocator, SpanGenerator >::render(), and render_scanlines_bin().

+ Here is the caller graph for this function:

◆ render_scanline_bin_solid()

template<class Scanline , class BaseRenderer , class ColorT >
void agg::render_scanline_bin_solid ( const Scanline &  sl,
BaseRenderer &  ren,
const ColorT &  color 
)
248 {
249 unsigned num_spans = sl.num_spans();
250 typename Scanline::const_iterator span = sl.begin();
251 for(;;)
252 {
253 ren.blend_hline(span->x,
254 sl.y(),
255 span->x - 1 + ((span->len < 0) ?
256 -span->len :
257 span->len),
258 color,
259 cover_full);
260 if(--num_spans == 0) break;
261 ++span;
262 }
263 }

References cover_full.

Referenced by agg::renderer_scanline_bin_solid< BaseRenderer >::render().

+ Here is the caller graph for this function:

◆ render_scanlines()

template<class Rasterizer , class Scanline , class Renderer >
void agg::render_scanlines ( Rasterizer &  ras,
Scanline &  sl,
Renderer &  ren 
)
441 {
442 if(ras.rewind_scanlines())
443 {
444 sl.reset(ras.min_x(), ras.max_x());
445 ren.prepare();
446 while(ras.sweep_scanline(sl))
447 {
448 ren.render(sl);
449 }
450 }
451 }

Referenced by Slic3r::sla::AGGRaster< PixelRenderer, Renderer, Rasterizer, Scanline >::_draw(), Slic3r::rasterize_polygons(), and render_all_paths().

+ Here is the caller graph for this function:

◆ render_scanlines_aa()

template<class Rasterizer , class Scanline , class BaseRenderer , class SpanAllocator , class SpanGenerator >
void agg::render_scanlines_aa ( Rasterizer &  ras,
Scanline &  sl,
BaseRenderer &  ren,
SpanAllocator &  alloc,
SpanGenerator &  span_gen 
)
184 {
185 if(ras.rewind_scanlines())
186 {
187 sl.reset(ras.min_x(), ras.max_x());
188 span_gen.prepare();
189 while(ras.sweep_scanline(sl))
190 {
191 render_scanline_aa(sl, ren, alloc, span_gen);
192 }
193 }
194 }
void render_scanline_aa(const Scanline &sl, BaseRenderer &ren, SpanAllocator &alloc, SpanGenerator &span_gen)
Definition agg_renderer_scanline.h:155

References render_scanline_aa().

+ Here is the call graph for this function:

◆ render_scanlines_aa_solid()

template<class Rasterizer , class Scanline , class BaseRenderer , class ColorT >
void agg::render_scanlines_aa_solid ( Rasterizer &  ras,
Scanline &  sl,
BaseRenderer &  ren,
const ColorT &  color 
)
62 {
63 if(ras.rewind_scanlines())
64 {
65 // Explicitly convert "color" to the BaseRenderer color type.
66 // For example, it can be called with color type "rgba", while
67 // "rgba8" is needed. Otherwise it will be implicitly
68 // converted in the loop many times.
69 //----------------------
70 typename BaseRenderer::color_type ren_color = color;
71
72 sl.reset(ras.min_x(), ras.max_x());
73 while(ras.sweep_scanline(sl))
74 {
75 //render_scanline_aa_solid(sl, ren, ren_color);
76
77 // This code is equivalent to the above call (copy/paste).
78 // It's just a "manual" optimization for old compilers,
79 // like Microsoft Visual C++ v6.0
80 //-------------------------------
81 int y = sl.y();
82 unsigned num_spans = sl.num_spans();
83 typename Scanline::const_iterator span = sl.begin();
84
85 for(;;)
86 {
87 int x = span->x;
88 if(span->len > 0)
89 {
90 ren.blend_solid_hspan(x, y, (unsigned)span->len,
91 ren_color,
92 span->covers);
93 }
94 else
95 {
96 ren.blend_hline(x, y, (unsigned)(x - span->len - 1),
97 ren_color,
98 *(span->covers));
99 }
100 if(--num_spans == 0) break;
101 ++span;
102 }
103 }
104 }
105 }

◆ render_scanlines_bin()

template<class Rasterizer , class Scanline , class BaseRenderer , class SpanAllocator , class SpanGenerator >
void agg::render_scanlines_bin ( Rasterizer &  ras,
Scanline &  sl,
BaseRenderer &  ren,
SpanAllocator &  alloc,
SpanGenerator &  span_gen 
)
375 {
376 if(ras.rewind_scanlines())
377 {
378 sl.reset(ras.min_x(), ras.max_x());
379 span_gen.prepare();
380 while(ras.sweep_scanline(sl))
381 {
382 render_scanline_bin(sl, ren, alloc, span_gen);
383 }
384 }
385 }
void render_scanline_bin(const Scanline &sl, BaseRenderer &ren, SpanAllocator &alloc, SpanGenerator &span_gen)
Definition agg_renderer_scanline.h:350

References render_scanline_bin().

+ Here is the call graph for this function:

◆ render_scanlines_bin_solid()

template<class Rasterizer , class Scanline , class BaseRenderer , class ColorT >
void agg::render_scanlines_bin_solid ( Rasterizer &  ras,
Scanline &  sl,
BaseRenderer &  ren,
const ColorT &  color 
)
270 {
271 if(ras.rewind_scanlines())
272 {
273 // Explicitly convert "color" to the BaseRenderer color type.
274 // For example, it can be called with color type "rgba", while
275 // "rgba8" is needed. Otherwise it will be implicitly
276 // converted in the loop many times.
277 //----------------------
278 typename BaseRenderer::color_type ren_color(color);
279
280 sl.reset(ras.min_x(), ras.max_x());
281 while(ras.sweep_scanline(sl))
282 {
283 //render_scanline_bin_solid(sl, ren, ren_color);
284
285 // This code is equivalent to the above call (copy/paste).
286 // It's just a "manual" optimization for old compilers,
287 // like Microsoft Visual C++ v6.0
288 //-------------------------------
289 unsigned num_spans = sl.num_spans();
290 typename Scanline::const_iterator span = sl.begin();
291 for(;;)
292 {
293 ren.blend_hline(span->x,
294 sl.y(),
295 span->x - 1 + ((span->len < 0) ?
296 -span->len :
297 span->len),
298 ren_color,
299 cover_full);
300 if(--num_spans == 0) break;
301 ++span;
302 }
303 }
304 }
305 }

References cover_full.

◆ render_scanlines_compound()

template<class Rasterizer , class ScanlineAA , class ScanlineBin , class BaseRenderer , class SpanAllocator , class StyleHandler >
void agg::render_scanlines_compound ( Rasterizer &  ras,
ScanlineAA &  sl_aa,
ScanlineBin &  sl_bin,
BaseRenderer &  ren,
SpanAllocator &  alloc,
StyleHandler &  sh 
)
491 {
492 if(ras.rewind_scanlines())
493 {
494 int min_x = ras.min_x();
495 int len = ras.max_x() - min_x + 2;
496 sl_aa.reset(min_x, ras.max_x());
497 sl_bin.reset(min_x, ras.max_x());
498
499 typedef typename BaseRenderer::color_type color_type;
500 color_type* color_span = alloc.allocate(len * 2);
501 color_type* mix_buffer = color_span + len;
502 unsigned num_spans;
503
504 unsigned num_styles;
505 unsigned style;
506 bool solid;
507 while((num_styles = ras.sweep_styles()) > 0)
508 {
509 typename ScanlineAA::const_iterator span_aa;
510 if(num_styles == 1)
511 {
512 // Optimization for a single style. Happens often
513 //-------------------------
514 if(ras.sweep_scanline(sl_aa, 0))
515 {
516 style = ras.style(0);
517 if(sh.is_solid(style))
518 {
519 // Just solid fill
520 //-----------------------
521 render_scanline_aa_solid(sl_aa, ren, sh.color(style));
522 }
523 else
524 {
525 // Arbitrary span generator
526 //-----------------------
527 span_aa = sl_aa.begin();
528 num_spans = sl_aa.num_spans();
529 for(;;)
530 {
531 len = span_aa->len;
532 sh.generate_span(color_span,
533 span_aa->x,
534 sl_aa.y(),
535 len,
536 style);
537
538 ren.blend_color_hspan(span_aa->x,
539 sl_aa.y(),
540 span_aa->len,
541 color_span,
542 span_aa->covers);
543 if(--num_spans == 0) break;
544 ++span_aa;
545 }
546 }
547 }
548 }
549 else
550 {
551 if(ras.sweep_scanline(sl_bin, -1))
552 {
553 // Clear the spans of the mix_buffer
554 //--------------------
555 typename ScanlineBin::const_iterator span_bin = sl_bin.begin();
556 num_spans = sl_bin.num_spans();
557 for(;;)
558 {
559 memset(mix_buffer + span_bin->x - min_x,
560 0,
561 span_bin->len * sizeof(color_type));
562
563 if(--num_spans == 0) break;
564 ++span_bin;
565 }
566
567 unsigned i;
568 for(i = 0; i < num_styles; i++)
569 {
570 style = ras.style(i);
571 solid = sh.is_solid(style);
572
573 if(ras.sweep_scanline(sl_aa, i))
574 {
575 color_type* colors;
576 color_type* cspan;
577 typename ScanlineAA::cover_type* covers;
578 span_aa = sl_aa.begin();
579 num_spans = sl_aa.num_spans();
580 if(solid)
581 {
582 // Just solid fill
583 //-----------------------
584 for(;;)
585 {
586 color_type c = sh.color(style);
587 len = span_aa->len;
588 colors = mix_buffer + span_aa->x - min_x;
589 covers = span_aa->covers;
590 do
591 {
592 if(*covers == cover_full)
593 {
594 *colors = c;
595 }
596 else
597 {
598 colors->add(c, *covers);
599 }
600 ++colors;
601 ++covers;
602 }
603 while(--len);
604 if(--num_spans == 0) break;
605 ++span_aa;
606 }
607 }
608 else
609 {
610 // Arbitrary span generator
611 //-----------------------
612 for(;;)
613 {
614 len = span_aa->len;
615 colors = mix_buffer + span_aa->x - min_x;
616 cspan = color_span;
617 sh.generate_span(cspan,
618 span_aa->x,
619 sl_aa.y(),
620 len,
621 style);
622 covers = span_aa->covers;
623 do
624 {
625 if(*covers == cover_full)
626 {
627 *colors = *cspan;
628 }
629 else
630 {
631 colors->add(*cspan, *covers);
632 }
633 ++cspan;
634 ++colors;
635 ++covers;
636 }
637 while(--len);
638 if(--num_spans == 0) break;
639 ++span_aa;
640 }
641 }
642 }
643 }
644
645 // Emit the blended result as a color hspan
646 //-------------------------
647 span_bin = sl_bin.begin();
648 num_spans = sl_bin.num_spans();
649 for(;;)
650 {
651 ren.blend_color_hspan(span_bin->x,
652 sl_bin.y(),
653 span_bin->len,
654 mix_buffer + span_bin->x - min_x,
655 0,
656 cover_full);
657 if(--num_spans == 0) break;
658 ++span_bin;
659 }
660 } // if(ras.sweep_scanline(sl_bin, -1))
661 } // if(num_styles == 1) ... else
662 } // while((num_styles = ras.sweep_styles()) > 0)
663 } // if(ras.rewind_scanlines())
664 }
#define style
Definition WipeTowerDialog.cpp:68
void render_scanline_aa_solid(const Scanline &sl, BaseRenderer &ren, const ColorT &color)
Definition agg_renderer_scanline.h:29

References cover_full, render_scanline_aa_solid(), and style.

+ Here is the call graph for this function:

◆ render_scanlines_compound_layered()

template<class Rasterizer , class ScanlineAA , class BaseRenderer , class SpanAllocator , class StyleHandler >
void agg::render_scanlines_compound_layered ( Rasterizer &  ras,
ScanlineAA &  sl_aa,
BaseRenderer &  ren,
SpanAllocator &  alloc,
StyleHandler &  sh 
)
677 {
678 if(ras.rewind_scanlines())
679 {
680 int min_x = ras.min_x();
681 int len = ras.max_x() - min_x + 2;
682 sl_aa.reset(min_x, ras.max_x());
683
684 typedef typename BaseRenderer::color_type color_type;
685 color_type* color_span = alloc.allocate(len * 2);
686 color_type* mix_buffer = color_span + len;
687 cover_type* cover_buffer = ras.allocate_cover_buffer(len);
688 unsigned num_spans;
689
690 unsigned num_styles;
691 unsigned style;
692 bool solid;
693 while((num_styles = ras.sweep_styles()) > 0)
694 {
695 typename ScanlineAA::const_iterator span_aa;
696 if(num_styles == 1)
697 {
698 // Optimization for a single style. Happens often
699 //-------------------------
700 if(ras.sweep_scanline(sl_aa, 0))
701 {
702 style = ras.style(0);
703 if(sh.is_solid(style))
704 {
705 // Just solid fill
706 //-----------------------
707 render_scanline_aa_solid(sl_aa, ren, sh.color(style));
708 }
709 else
710 {
711 // Arbitrary span generator
712 //-----------------------
713 span_aa = sl_aa.begin();
714 num_spans = sl_aa.num_spans();
715 for(;;)
716 {
717 len = span_aa->len;
718 sh.generate_span(color_span,
719 span_aa->x,
720 sl_aa.y(),
721 len,
722 style);
723
724 ren.blend_color_hspan(span_aa->x,
725 sl_aa.y(),
726 span_aa->len,
727 color_span,
728 span_aa->covers);
729 if(--num_spans == 0) break;
730 ++span_aa;
731 }
732 }
733 }
734 }
735 else
736 {
737 int sl_start = ras.scanline_start();
738 unsigned sl_len = ras.scanline_length();
739
740 if(sl_len)
741 {
742 memset(mix_buffer + sl_start - min_x,
743 0,
744 sl_len * sizeof(color_type));
745
746 memset(cover_buffer + sl_start - min_x,
747 0,
748 sl_len * sizeof(cover_type));
749
750 int sl_y = std::numeric_limits<int>::max();
751 unsigned i;
752 for(i = 0; i < num_styles; i++)
753 {
754 style = ras.style(i);
755 solid = sh.is_solid(style);
756
757 if(ras.sweep_scanline(sl_aa, i))
758 {
759 unsigned cover;
760 color_type* colors;
761 color_type* cspan;
762 cover_type* src_covers;
763 cover_type* dst_covers;
764 span_aa = sl_aa.begin();
765 num_spans = sl_aa.num_spans();
766 sl_y = sl_aa.y();
767 if(solid)
768 {
769 // Just solid fill
770 //-----------------------
771 for(;;)
772 {
773 color_type c = sh.color(style);
774 len = span_aa->len;
775 colors = mix_buffer + span_aa->x - min_x;
776 src_covers = span_aa->covers;
777 dst_covers = cover_buffer + span_aa->x - min_x;
778 do
779 {
780 cover = *src_covers;
781 if(*dst_covers + cover > cover_full)
782 {
783 cover = cover_full - *dst_covers;
784 }
785 if(cover)
786 {
787 colors->add(c, cover);
788 *dst_covers += cover;
789 }
790 ++colors;
791 ++src_covers;
792 ++dst_covers;
793 }
794 while(--len);
795 if(--num_spans == 0) break;
796 ++span_aa;
797 }
798 }
799 else
800 {
801 // Arbitrary span generator
802 //-----------------------
803 for(;;)
804 {
805 len = span_aa->len;
806 colors = mix_buffer + span_aa->x - min_x;
807 cspan = color_span;
808 sh.generate_span(cspan,
809 span_aa->x,
810 sl_aa.y(),
811 len,
812 style);
813 src_covers = span_aa->covers;
814 dst_covers = cover_buffer + span_aa->x - min_x;
815 do
816 {
817 cover = *src_covers;
818 if(*dst_covers + cover > cover_full)
819 {
820 cover = cover_full - *dst_covers;
821 }
822 if(cover)
823 {
824 colors->add(*cspan, cover);
825 *dst_covers += cover;
826 }
827 ++cspan;
828 ++colors;
829 ++src_covers;
830 ++dst_covers;
831 }
832 while(--len);
833 if(--num_spans == 0) break;
834 ++span_aa;
835 }
836 }
837 }
838 }
839 ren.blend_color_hspan(sl_start,
840 sl_y,
841 sl_len,
842 mix_buffer + sl_start - min_x,
843 0,
844 cover_full);
845 } //if(sl_len)
846 } //if(num_styles == 1) ... else
847 } //while((num_styles = ras.sweep_styles()) > 0)
848 } //if(ras.rewind_scanlines())
849 }
unsigned char cover_type
Definition agg_basics.h:237

References cover_full, render_scanline_aa_solid(), and style.

+ Here is the call graph for this function:

◆ rgb8_packed()

rgba8 agg::rgb8_packed ( unsigned  v)
inline
629 {
630 return rgba8((v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF);
631 }

◆ rgba16_gamma_dir()

template<class GammaLUT >
rgba16 agg::rgba16_gamma_dir ( rgba16  c,
const GammaLUT &  gamma 
)
1019 {
1020 return rgba16(gamma.dir(c.r), gamma.dir(c.g), gamma.dir(c.b), c.a);
1021 }
Definition agg_color_rgba.h:663

◆ rgba16_gamma_inv()

template<class GammaLUT >
rgba16 agg::rgba16_gamma_inv ( rgba16  c,
const GammaLUT &  gamma 
)
1026 {
1027 return rgba16(gamma.inv(c.r), gamma.inv(c.g), gamma.inv(c.b), c.a);
1028 }

◆ rgba8_gamma_dir()

template<class GammaLUT >
rgba8 agg::rgba8_gamma_dir ( rgba8  c,
const GammaLUT &  gamma 
)
648 {
649 return rgba8(gamma.dir(c.r), gamma.dir(c.g), gamma.dir(c.b), c.a);
650 }

◆ rgba8_gamma_inv()

template<class GammaLUT >
rgba8 agg::rgba8_gamma_inv ( rgba8  c,
const GammaLUT &  gamma 
)
655 {
656 return rgba8(gamma.inv(c.r), gamma.inv(c.g), gamma.inv(c.b), c.a);
657 }

◆ rgba_pre()

rgba agg::rgba_pre ( double  r,
double  g,
double  b,
double  a 
)
inline
239 {
240 return rgba(r, g, b, a).premultiply();
241 }
rgba & premultiply()
Definition agg_color_rgba.h:96

References agg::rgba::premultiply().

+ Here is the call graph for this function:

◆ set_orientation()

unsigned agg::set_orientation ( unsigned  c,
unsigned  o 
)
inline
503 {
504 return clear_orientation(c) | o;
505 }
unsigned clear_orientation(unsigned c)
Definition agg_basics.h:490

References clear_orientation().

Referenced by agg::path_base< VertexContainer >::arrange_polygon_orientation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sRGB_to_linear()

double agg::sRGB_to_linear ( double  x)
inline
119 {
120 return (x <= 0.04045) ? (x / 12.92) : pow((x + 0.055) / (1.055), 2.4);
121 }

Referenced by agg::sRGB_lut< float >::sRGB_lut(), agg::sRGB_lut< int16u >::sRGB_lut(), and agg::sRGB_lut< int8u >::sRGB_lut().

+ Here is the caller graph for this function:

◆ swap_cells()

template<class T >
static AGG_INLINE void agg::swap_cells ( T *  a,
T *  b 
)
static
500 {
501 T temp = *a;
502 *a = *b;
503 *b = temp;
504 }

Referenced by qsort_cells().

+ Here is the caller graph for this function:

◆ swap_elements()

template<class T >
void agg::swap_elements ( T &  a,
T &  b 
)
inline
911 {
912 T temp = a;
913 a = b;
914 b = temp;
915 }

Referenced by invert_container(), and quick_sort().

+ Here is the caller graph for this function:

◆ uceil()

AGG_INLINE unsigned agg::uceil ( double  v)
210 {
211 return unsigned(ceil(v));
212 }

References ceil().

+ Here is the call graph for this function:

◆ ufloor()

AGG_INLINE unsigned agg::ufloor ( double  v)
202 {
203 return unsigned(v);
204 }

◆ unite_rectangles()

template<class Rect >
Rect agg::unite_rectangles ( const Rect &  r1,
const Rect &  r2 
)
inline
354 {
355 Rect r = r1;
356 if(r.x2 < r2.x2) r.x2 = r2.x2;
357 if(r.y2 < r2.y2) r.y2 = r2.y2;
358 if(r.x1 > r2.x1) r.x1 = r2.x1;
359 if(r.y1 > r2.y1) r.y1 = r2.y1;
360 return r;
361 }

◆ unsigned_greater()

bool agg::unsigned_greater ( unsigned  a,
unsigned  b 
)
inline
1116{ return a > b; }

◆ unsigned_less()

bool agg::unsigned_less ( unsigned  a,
unsigned  b 
)
inline
1113{ return a < b; }

◆ uround()

Variable Documentation

◆ affine_epsilon

const double agg::affine_epsilon = 1e-14

◆ g_elder_bit_table

int8 agg::g_elder_bit_table[256]
extern

Referenced by fast_sqrt().

◆ g_sqrt_table

int16u agg::g_sqrt_table[1024]
extern

Referenced by fast_sqrt().

◆ intersection_epsilon

const double agg::intersection_epsilon = 1.0e-30

◆ pi

const double agg::pi = 3.14159265358979323846

Referenced by deg2rad(), and rad2deg().

◆ vertex_dist_epsilon

const double agg::vertex_dist_epsilon = 1e-14