| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,8 @@ | |||
| 7 | 7 | #include "agg_py_transforms.h" | |
| 8 | 8 | #include "path_converters.h" | |
| 9 | 9 | ||
| 10 | - class PathCleanupIterator { | ||
| 10 | + class PathCleanupIterator | ||
| 11 | + { | ||
| 11 | 12 | typedef agg::conv_transform<PathIterator> transformed_path_t; | |
| 12 | 13 | typedef PathNanRemover<transformed_path_t> nan_removal_t; | |
| 13 | 14 | typedef PathClipper<nan_removal_t> clipped_t; | |
@@ -49,36 +50,36 @@ class PathCleanupIterator { | |||
| 49 | 50 | }; | |
| 50 | 51 | ||
| 51 | 52 | extern "C" { | |
| 52 | - void* | ||
| 53 | - get_path_iterator( | ||
| 54 | - PyObject* path, PyObject* trans, int remove_nans, int do_clip, | ||
| 55 | - double rect[4], e_quantize_mode quantize_mode, int do_simplify) | ||
| 56 | - { | ||
| 57 | - agg::trans_affine agg_trans = py_to_agg_transformation_matrix(trans, false); | ||
| 58 | - agg::rect_base<double> clip_rect(rect[0], rect[1], rect[2], rect[3]); | ||
| 53 | + void* | ||
| 54 | + get_path_iterator( | ||
| 55 | + PyObject* path, PyObject* trans, int remove_nans, int do_clip, | ||
| 56 | + double rect[4], e_quantize_mode quantize_mode, int do_simplify) | ||
| 57 | + { | ||
| 58 | + agg::trans_affine agg_trans = py_to_agg_transformation_matrix(trans, false); | ||
| 59 | + agg::rect_base<double> clip_rect(rect[0], rect[1], rect[2], rect[3]); | ||
| 59 | 60 | ||
| 60 | - PathCleanupIterator* pipeline = new PathCleanupIterator( | ||
| 61 | - path, agg_trans, remove_nans != 0, do_clip != 0, | ||
| 62 | - clip_rect, quantize_mode, do_simplify != 0); | ||
| 61 | + PathCleanupIterator* pipeline = new PathCleanupIterator( | ||
| 62 | + path, agg_trans, remove_nans != 0, do_clip != 0, | ||
| 63 | + clip_rect, quantize_mode, do_simplify != 0); | ||
| 63 | 64 | ||
| 64 | - return (void*)pipeline; | ||
| 65 | - } | ||
| 65 | + return (void*)pipeline; | ||
| 66 | + } | ||
| 66 | 67 | ||
| 67 | - unsigned | ||
| 68 | - get_vertex(void* pipeline, double* x, double* y) | ||
| 69 | - { | ||
| 70 | - PathCleanupIterator* pipeline_iter = (PathCleanupIterator*)pipeline; | ||
| 68 | + unsigned | ||
| 69 | + get_vertex(void* pipeline, double* x, double* y) | ||
| 70 | + { | ||
| 71 | + PathCleanupIterator* pipeline_iter = (PathCleanupIterator*)pipeline; | ||
| 71 | 72 | ||
| 72 | - unsigned code = pipeline_iter->vertex(x, y); | ||
| 73 | - return code; | ||
| 74 | - } | ||
| 73 | + unsigned code = pipeline_iter->vertex(x, y); | ||
| 74 | + return code; | ||
| 75 | + } | ||
| 75 | 76 | ||
| 76 | - void | ||
| 77 | - free_path_iterator(void* pipeline) | ||
| 78 | - { | ||
| 79 | - PathCleanupIterator* pipeline_iter = (PathCleanupIterator*)pipeline; | ||
| 77 | + void | ||
| 78 | + free_path_iterator(void* pipeline) | ||
| 79 | + { | ||
| 80 | + PathCleanupIterator* pipeline_iter = (PathCleanupIterator*)pipeline; | ||
| 80 | 81 | ||
| 81 | - delete pipeline_iter; | ||
| 82 | - } | ||
| 82 | + delete pipeline_iter; | ||
| 83 | + } | ||
| 83 | 84 | } | |
| 84 | 85 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,8 +12,8 @@ enum e_quantize_mode | |||
| 12 | 12 | ||
| 13 | 13 | void* | |
| 14 | 14 | get_path_iterator( | |
| 15 | - PyObject* path, PyObject* trans, int remove_nans, int do_clip, | ||
| 16 | - double rect[4], e_quantize_mode quantize_mode, int do_simplify); | ||
| 15 | + PyObject* path, PyObject* trans, int remove_nans, int do_clip, | ||
| 16 | + double rect[4], e_quantize_mode quantize_mode, int do_simplify); | ||
| 17 | 17 | ||
| 18 | 18 | unsigned | |
| 19 | 19 | get_vertex(void* pipeline, double* x, double* y); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments