22// Anti-Grain Geometry - Version 2.4
33// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
44//
5- // Permission to copy, use, modify, sell and distribute this software
6- // is granted provided this copyright notice appears in all copies.
5+ // Permission to copy, use, modify, sell and distribute this software
6+ // is granted provided this copyright notice appears in all copies.
77// This software is provided "as is" without express or implied
88// warranty, and with no claim as to its suitability for any purpose.
99//
2525#else
2626namespace agg
2727{
28- // The policy of all AGG containers and memory allocation strategy
28+ // The policy of all AGG containers and memory allocation strategy
2929 // in general is that no allocated data requires explicit construction.
3030 // It means that the allocator can be really simple; you can even
31- // replace new/delete to malloc/free. The constructors and destructors
32- // won't be called in this case, however everything will remain working.
33- // The second argument of deallocate() is the size of the allocated
31+ // replace new/delete to malloc/free. The constructors and destructors
32+ // won't be called in this case, however everything will remain working.
33+ // The second argument of deallocate() is the size of the allocated
3434 // block. You can use this information if you wish.
3535 // ------------------------------------------------------------pod_allocator
3636 template <class T > struct pod_allocator
@@ -40,8 +40,8 @@ namespace agg
4040 };
4141
4242 // Single object allocator. It's also can be replaced with your custom
43- // allocator. The difference is that it can only allocate a single
44- // object and the constructor and destructor must be called.
43+ // allocator. The difference is that it can only allocate a single
44+ // object and the constructor and destructor must be called.
4545 // In AGG there is no need to allocate an array of objects with
4646 // calling their constructors (only single ones). So that, if you
4747 // replace these new/delete to malloc/free make sure that the in-place
@@ -213,23 +213,23 @@ namespace agg
213213 enum cover_scale_e
214214 {
215215 cover_shift = 8 , // ----cover_shift
216- cover_size = 1 << cover_shift, // ----cover_size
217- cover_mask = cover_size - 1 , // ----cover_mask
218- cover_none = 0 , // ----cover_none
219- cover_full = cover_mask // ----cover_full
216+ cover_size = 1 << cover_shift, // ----cover_size
217+ cover_mask = cover_size - 1 , // ----cover_mask
218+ cover_none = 0 , // ----cover_none
219+ cover_full = cover_mask // ----cover_full
220220 };
221221
222222 // ----------------------------------------------------poly_subpixel_scale_e
223- // These constants determine the subpixel accuracy, to be more precise,
224- // the number of bits of the fractional part of the coordinates.
223+ // These constants determine the subpixel accuracy, to be more precise,
224+ // the number of bits of the fractional part of the coordinates.
225225 // The possible coordinate capacity in bits can be calculated by formula:
226226 // sizeof(int) * 8 - poly_subpixel_shift, i.e, for 32-bit integers and
227227 // 8-bits fractional part the capacity is 24 bits.
228228 enum poly_subpixel_scale_e
229229 {
230230 poly_subpixel_shift = 8 , // ----poly_subpixel_shift
231- poly_subpixel_scale = 1 <<poly_subpixel_shift, // ----poly_subpixel_scale
232- poly_subpixel_mask = poly_subpixel_scale-1 , // ----poly_subpixel_mask
231+ poly_subpixel_scale = 1 <<poly_subpixel_shift, // ----poly_subpixel_scale
232+ poly_subpixel_mask = poly_subpixel_scale-1 // ----poly_subpixel_mask
233233 };
234234
235235 // ----------------------------------------------------------filling_rule_e
@@ -253,7 +253,7 @@ namespace agg
253253 {
254254 return rad * 180.0 / pi;
255255 }
256-
256+
257257 // ----------------------------------------------------------------rect_base
258258 template <class T > struct rect_base
259259 {
@@ -265,9 +265,9 @@ namespace agg
265265 rect_base (T x1_, T y1_, T x2_, T y2_) :
266266 x1 (x1_), y1(y1_), x2(x2_), y2(y2_) {}
267267
268- void init (T x1_, T y1_, T x2_, T y2_)
268+ void init (T x1_, T y1_, T x2_, T y2_)
269269 {
270- x1 = x1_; y1 = y1_; x2 = x2_; y2 = y2_;
270+ x1 = x1_; y1 = y1_; x2 = x2_; y2 = y2_;
271271 }
272272
273273 const self_type& normalize ()
@@ -299,17 +299,17 @@ namespace agg
299299 };
300300
301301 // -----------------------------------------------------intersect_rectangles
302- template <class Rect >
302+ template <class Rect >
303303 inline Rect intersect_rectangles (const Rect& r1, const Rect& r2)
304304 {
305305 Rect r = r1;
306306
307- // First process x2,y2 because the other order
308- // results in Internal Compiler Error under
309- // Microsoft Visual C++ .NET 2003 69462-335-0000007-18038 in
307+ // First process x2,y2 because the other order
308+ // results in Internal Compiler Error under
309+ // Microsoft Visual C++ .NET 2003 69462-335-0000007-18038 in
310310 // case of "Maximize Speed" optimization option.
311311 // -----------------
312- if (r.x2 > r2.x2 ) r.x2 = r2.x2 ;
312+ if (r.x2 > r2.x2 ) r.x2 = r2.x2 ;
313313 if (r.y2 > r2.y2 ) r.y2 = r2.y2 ;
314314 if (r.x1 < r2.x1 ) r.x1 = r2.x1 ;
315315 if (r.y1 < r2.y1 ) r.y1 = r2.y1 ;
@@ -318,7 +318,7 @@ namespace agg
318318
319319
320320 // ---------------------------------------------------------unite_rectangles
321- template <class Rect >
321+ template <class Rect >
322322 inline Rect unite_rectangles (const Rect& r1, const Rect& r2)
323323 {
324324 Rect r = r1;
@@ -336,26 +336,26 @@ namespace agg
336336 // ---------------------------------------------------------path_commands_e
337337 enum path_commands_e
338338 {
339- path_cmd_stop = 0 , // ----path_cmd_stop
340- path_cmd_move_to = 1 , // ----path_cmd_move_to
341- path_cmd_line_to = 2 , // ----path_cmd_line_to
342- path_cmd_curve3 = 3 , // ----path_cmd_curve3
343- path_cmd_curve4 = 4 , // ----path_cmd_curve4
339+ path_cmd_stop = 0 , // ----path_cmd_stop
340+ path_cmd_move_to = 1 , // ----path_cmd_move_to
341+ path_cmd_line_to = 2 , // ----path_cmd_line_to
342+ path_cmd_curve3 = 3 , // ----path_cmd_curve3
343+ path_cmd_curve4 = 4 , // ----path_cmd_curve4
344344 path_cmd_curveN = 5 , // ----path_cmd_curveN
345345 path_cmd_catrom = 6 , // ----path_cmd_catrom
346346 path_cmd_ubspline = 7 , // ----path_cmd_ubspline
347347 path_cmd_end_poly = 0x0F , // ----path_cmd_end_poly
348- path_cmd_mask = 0x0F // ----path_cmd_mask
348+ path_cmd_mask = 0x0F // ----path_cmd_mask
349349 };
350350
351351 // ------------------------------------------------------------path_flags_e
352352 enum path_flags_e
353353 {
354- path_flags_none = 0 , // ----path_flags_none
355- path_flags_ccw = 0x10 , // ----path_flags_ccw
356- path_flags_cw = 0x20 , // ----path_flags_cw
354+ path_flags_none = 0 , // ----path_flags_none
355+ path_flags_ccw = 0x10 , // ----path_flags_ccw
356+ path_flags_cw = 0x20 , // ----path_flags_cw
357357 path_flags_close = 0x40 , // ----path_flags_close
358- path_flags_mask = 0xF0 // ----path_flags_mask
358+ path_flags_mask = 0xF0 // ----path_flags_mask
359359 };
360360
361361 // ---------------------------------------------------------------is_vertex
@@ -372,7 +372,7 @@ namespace agg
372372
373373 // -----------------------------------------------------------------is_stop
374374 inline bool is_stop (unsigned c)
375- {
375+ {
376376 return c == path_cmd_stop;
377377 }
378378
@@ -416,7 +416,7 @@ namespace agg
416416 inline bool is_close (unsigned c)
417417 {
418418 return (c & ~(path_flags_cw | path_flags_ccw)) ==
419- (path_cmd_end_poly | path_flags_close);
419+ (path_cmd_end_poly | path_flags_close);
420420 }
421421
422422 // ------------------------------------------------------------is_next_poly
@@ -440,19 +440,19 @@ namespace agg
440440 // -------------------------------------------------------------is_oriented
441441 inline bool is_oriented (unsigned c)
442442 {
443- return (c & (path_flags_cw | path_flags_ccw)) != 0 ;
443+ return (c & (path_flags_cw | path_flags_ccw)) != 0 ;
444444 }
445445
446446 // ---------------------------------------------------------------is_closed
447447 inline bool is_closed (unsigned c)
448448 {
449- return (c & path_flags_close) != 0 ;
449+ return (c & path_flags_close) != 0 ;
450450 }
451451
452452 // ----------------------------------------------------------get_close_flag
453453 inline unsigned get_close_flag (unsigned c)
454454 {
455- return c & path_flags_close;
455+ return c & path_flags_close;
456456 }
457457
458458 // -------------------------------------------------------clear_orientation
@@ -513,7 +513,7 @@ namespace agg
513513 int x1, x2;
514514 const T* ptr;
515515 const_row_info () {}
516- const_row_info (int x1_, int x2_, const T* ptr_) :
516+ const_row_info (int x1_, int x2_, const T* ptr_) :
517517 x1 (x1_), x2(x2_), ptr(ptr_) {}
518518 };
519519
0 commit comments