Giter Site home page Giter Site logo

celiagg / celiagg Goto Github PK

View Code? Open in Web Editor NEW
25.0 5.0 6.0 3.78 MB

🎨Anti-Grain Geometry for Python 3 with Cython

Home Page: https://celiagg.github.io/celiagg/

License: MIT License

CMake 1.02% Makefile 3.33% C++ 89.58% Shell 0.05% HTML 0.25% C 2.14% M4 0.02% Python 1.15% Roff 0.01% Cython 2.46%
vector draw-graphics python-library cython drawing multi-platform

celiagg's Introduction

celiagg

PyPI

Build status

celiagg provides a simple, stateless canvas object that uses Anti-Grain Geometry 2.4 <svn://svn.code.sf.net/p/agg/svn> with Cython to render directly into a Numpy array.

A respectably modern C++ compiler is required to build celiagg

Documentation!

Installation

pip install celiagg should do the trick.

Building from source with the Freetype font library on macOS requires the pkg-config tool which can be installed via Homebrew, MacPorts, or other macOS package management systems.

To build without text support, set the CELIAGG_NO_TEXT_RENDERING environment variable while building, eg. CELIAGG_NO_TEXT_RENDERING=1 pip install celiagg

Dependencies

  • Numpy
  • Cython (build-time only)
  • Freetype2 (optional)
  • Harfbuzz (optional)

Contributing

We encourage contributions to celiagg! If you would like to contribute, just fork the repository on GitHub, make your changes, and issue a pull request.

History

celiagg started as pyagg (https://github.com/erikhvatum/pyagg) but was renamed to avoid clashing with PyAgg (https://github.com/karimbahgat/PyAgg).

celiagg is a play on Celiac (Anti grain...) and AGG (Anti-Grain Geometry).

celiagg's People

Contributors

corranwebster avatar erikhvatum avatar jdeschenes avatar jwiggins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

celiagg's Issues

Improve image rendering

This means support for:

  • Drawing with alpha/Blending modes
  • Arbitrary transformations; with filtering

Rethink drawing multiple instances of a path at points

Currently, ShapeAtPoints is the fastest way to draw a single Path object at multiple points. However, with a combined fill and stroke drawing mode (DrawingMode.DrawFillStroke), the rasterized result is not quite correct. First the paths are drawn with a fill, then drawn again with a stroke. That results in some stroked areas, which would normally have been overdrawn by filled areas, showing in the image.

drawing with fill or stroke=None produces black fill/stroke

Is it a bug or a feature that using draw_shape() with fill=None or stroke=None will produce an image with a black fill or stroke? I had assumed that passing None would result in no fill or stroke. Simple example follows:

import celiagg
import freeimage
import numpy

state = celiagg.GraphicsState()
fill = celiagg.SolidPaint(1,1,1)
#stroke = celiagg.SolidPaint(0,0,0,0) # this produces the desired no-stroke outcome.
stroke = None
transform = celiagg.Transform()

image = numpy.zeros((100, 100), dtype=numpy.uint8)
image += 255
canvas = celiagg.CanvasG8(image)
path = celiagg.Path()
path.rect(25, 25, 50, 50)
canvas.draw_shape(path, transform, state, fill=fill, stroke=stroke)
freeimage.write(image, 'test.png')

Add Gouraud shading

This is technically supported by AGG. It would involve adding another constructor and rendering path to the Paint class in C++ and then wrapping it with a GouraudPaint class in Cython

Error installing in Linux Mint 64bit

Hi,
thanks for your interesting work.
When I try to install in linux, I have this:

`pip install celiagg
Collecting celiagg
Using cached celiagg-0.1.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-S2efXP/celiagg/setup.py", line 54, in
with open('README.rst', 'r') as fp:
IOError: [Errno 2] No such file or directory: 'README.rst'

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-S2efXP/celiagg/
`

Add pyproject.toml to permit easier pip installs

While there are linux wheels on PyPI, other platforms need to have a build environment with Cython installed.

By providing a pyproject.toml we can at provide the information that pip needs to build the extension modules on all platforms.

`pip install celiagg` Fails on MacOS Python 3.11

May fail on other platforms as well - haven't tested yet.

Collecting celiagg
  Using cached celiagg-2.1.3.tar.gz (737 kB)
  Preparing metadata (setup.py) ... done
Installing collected packages: celiagg
  DEPRECATION: celiagg is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for celiagg ... error
  error: subprocess-exited-with-error
  
  Γ— Running setup.py install for celiagg did not run successfully.
  β”‚ exit code: 1
  ╰─> [305 lines of output]
      Cython does not appear to be installed.  Will attempt to use pre-made cpp file...
      running install
      /Users/cwebster/.venvs/enable/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-12.0-x86_64-cpython-311
      creating build/lib.macosx-12.0-x86_64-cpython-311/celiagg
      copying celiagg/__init__.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg
      creating build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/test_transform.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/test_font.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/test_no_text.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/__init__.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/test_canvas.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/test_drawing.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/test_state.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/test_text.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/test_path.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      copying celiagg/tests/test_paint.py -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/tests
      creating build/lib.macosx-12.0-x86_64-cpython-311/celiagg/data
      copying celiagg/data/OFL.txt -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/data
      copying celiagg/data/Montserrat-Regular.ttf -> build/lib.macosx-12.0-x86_64-cpython-311/celiagg/data
      running build_ext
      building 'celiagg._celiagg' extension
      creating build/temp.macosx-12.0-x86_64-cpython-311
      creating build/temp.macosx-12.0-x86_64-cpython-311/agg-svn
      creating build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4
      creating build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/font_freetype
      creating build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src
      creating build/temp.macosx-12.0-x86_64-cpython-311/celiagg
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/font_freetype/agg_font_freetype.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/font_freetype/agg_font_freetype.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/font_freetype/agg_font_freetype.cpp:18:
      In file included from agg-svn/agg-2.4/font_freetype/agg_font_freetype.h:27:
      In file included from agg-svn/agg-2.4/include/agg_scanline_storage_aa.h:30:
      In file included from agg-svn/agg-2.4/include/agg_array.h:20:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      In file included from agg-svn/agg-2.4/font_freetype/agg_font_freetype.cpp:18:
      In file included from agg-svn/agg-2.4/font_freetype/agg_font_freetype.h:35:
      agg-svn/agg-2.4/include/agg_trans_affine.h:295:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double tmp = *x;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:303:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double tmp = *x;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:311:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double d = determinant_reciprocal();
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:312:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double a = (*x - tx) * d;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:313:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double b = (*y - ty) * d;
              ^~~~~~~~~
      agg-svn/agg-2.4/font_freetype/agg_font_freetype.cpp:115:18: warning: variable 'len' set but not used [-Wunused-but-set-variable]
              unsigned len = 0;
                       ^
      7 warnings generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_arc.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_arc.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_arc.cpp:21:
      In file included from agg-svn/agg-2.4/include/agg_arc.h:24:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_arrowhead.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_arrowhead.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_arrowhead.cpp:20:
      In file included from agg-svn/agg-2.4/include/agg_arrowhead.h:22:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_bezier_arc.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_bezier_arc.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_bezier_arc.cpp:23:
      In file included from agg-svn/agg-2.4/include/agg_bezier_arc.h:24:
      In file included from agg-svn/agg-2.4/include/agg_conv_transform.h:22:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      In file included from agg-svn/agg-2.4/src/agg_bezier_arc.cpp:23:
      In file included from agg-svn/agg-2.4/include/agg_bezier_arc.h:24:
      In file included from agg-svn/agg-2.4/include/agg_conv_transform.h:23:
      agg-svn/agg-2.4/include/agg_trans_affine.h:295:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double tmp = *x;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:303:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double tmp = *x;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:311:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double d = determinant_reciprocal();
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:312:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double a = (*x - tx) * d;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:313:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double b = (*y - ty) * d;
              ^~~~~~~~~
      6 warnings generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_bspline.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_bspline.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_bspline.cpp:20:
      In file included from agg-svn/agg-2.4/include/agg_bspline.h:23:
      In file included from agg-svn/agg-2.4/include/agg_array.h:20:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_color_rgba.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_color_rgba.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_curves.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_curves.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_curves.cpp:17:
      In file included from agg-svn/agg-2.4/include/agg_curves.h:20:
      In file included from agg-svn/agg-2.4/include/agg_array.h:20:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      agg-svn/agg-2.4/src/agg_curves.cpp:24:18: warning: unused variable 'curve_distance_epsilon' [-Wunused-const-variable]
          const double curve_distance_epsilon                  = 1e-30;
                       ^
      2 warnings generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_embedded_raster_fonts.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_embedded_raster_fonts.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_embedded_raster_fonts.cpp:16:
      In file included from agg-svn/agg-2.4/include/agg_embedded_raster_fonts.h:19:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_gsv_text.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_gsv_text.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_gsv_text.cpp:21:
      In file included from agg-svn/agg-2.4/include/agg_gsv_text.h:23:
      In file included from agg-svn/agg-2.4/include/agg_array.h:20:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      In file included from agg-svn/agg-2.4/src/agg_gsv_text.cpp:21:
      In file included from agg-svn/agg-2.4/include/agg_gsv_text.h:25:
      In file included from agg-svn/agg-2.4/include/agg_conv_transform.h:23:
      agg-svn/agg-2.4/include/agg_trans_affine.h:295:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double tmp = *x;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:303:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double tmp = *x;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:311:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double d = determinant_reciprocal();
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:312:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double a = (*x - tx) * d;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:313:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double b = (*y - ty) * d;
              ^~~~~~~~~
      6 warnings generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_image_filters.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_image_filters.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_image_filters.cpp:21:
      In file included from agg-svn/agg-2.4/include/agg_image_filters.h:23:
      In file included from agg-svn/agg-2.4/include/agg_array.h:20:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_line_aa_basics.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_line_aa_basics.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_line_aa_basics.cpp:17:
      In file included from agg-svn/agg-2.4/include/agg_line_aa_basics.h:19:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_line_profile_aa.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_line_profile_aa.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_line_profile_aa.cpp:16:
      In file included from agg-svn/agg-2.4/include/agg_renderer_outline_aa.h:18:
      In file included from agg-svn/agg-2.4/include/agg_array.h:20:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_rounded_rect.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_rounded_rect.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_rounded_rect.cpp:21:
      In file included from agg-svn/agg-2.4/include/agg_rounded_rect.h:23:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_sqrt_tables.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_sqrt_tables.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_sqrt_tables.cpp:20:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_trans_affine.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_trans_affine.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_trans_affine.cpp:19:
      In file included from agg-svn/agg-2.4/include/agg_trans_affine.h:23:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      In file included from agg-svn/agg-2.4/src/agg_trans_affine.cpp:19:
      agg-svn/agg-2.4/include/agg_trans_affine.h:295:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double tmp = *x;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:303:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double tmp = *x;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:311:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double d = determinant_reciprocal();
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:312:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double a = (*x - tx) * d;
              ^~~~~~~~~
      agg-svn/agg-2.4/include/agg_trans_affine.h:313:9: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
              register double b = (*y - ty) * d;
              ^~~~~~~~~
      6 warnings generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_trans_double_path.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_trans_double_path.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_trans_double_path.cpp:16:
      In file included from agg-svn/agg-2.4/include/agg_math.h:23:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      agg-svn/agg-2.4/src/agg_trans_double_path.cpp:25:9: warning: field 'm_kindex2' will be initialized after field 'm_base_length' [-Wreorder-ctor]
              m_kindex2(0.0),
              ^~~~~~~~~~~~~~
              m_base_height(1.0)
      2 warnings generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_trans_single_path.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_trans_single_path.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_trans_single_path.cpp:16:
      In file included from agg-svn/agg-2.4/include/agg_math.h:23:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_trans_warp_magnifier.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_trans_warp_magnifier.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_vcgen_bspline.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_vcgen_bspline.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_vcgen_bspline.cpp:16:
      In file included from agg-svn/agg-2.4/include/agg_vcgen_bspline.h:19:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_vcgen_contour.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_vcgen_contour.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_vcgen_contour.cpp:21:
      In file included from agg-svn/agg-2.4/include/agg_vcgen_contour.h:19:
      In file included from agg-svn/agg-2.4/include/agg_math_stroke.h:23:
      In file included from agg-svn/agg-2.4/include/agg_math.h:23:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_vcgen_dash.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_vcgen_dash.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_vcgen_dash.cpp:21:
      In file included from agg-svn/agg-2.4/include/agg_vcgen_dash.h:22:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_vcgen_markers_term.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_vcgen_markers_term.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_vcgen_markers_term.cpp:20:
      In file included from agg-svn/agg-2.4/include/agg_vcgen_markers_term.h:19:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_vcgen_smooth_poly1.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_vcgen_smooth_poly1.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_vcgen_smooth_poly1.cpp:20:
      In file included from agg-svn/agg-2.4/include/agg_vcgen_smooth_poly1.h:19:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_vcgen_stroke.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_vcgen_stroke.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_vcgen_stroke.cpp:20:
      In file included from agg-svn/agg-2.4/include/agg_vcgen_stroke.h:19:
      In file included from agg-svn/agg-2.4/include/agg_math_stroke.h:23:
      In file included from agg-svn/agg-2.4/include/agg_math.h:23:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_vpgen_clip_polygon.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_vpgen_clip_polygon.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_vpgen_clip_polygon.cpp:16:
      In file included from agg-svn/agg-2.4/include/agg_vpgen_clip_polygon.h:19:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_vpgen_clip_polyline.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_vpgen_clip_polyline.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_vpgen_clip_polyline.cpp:16:
      In file included from agg-svn/agg-2.4/include/agg_vpgen_clip_polyline.h:19:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c agg-svn/agg-2.4/src/agg_vpgen_segmentator.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/agg-svn/agg-2.4/src/agg_vpgen_segmentator.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      In file included from agg-svn/agg-2.4/src/agg_vpgen_segmentator.cpp:17:
      In file included from agg-svn/agg-2.4/include/agg_vpgen_segmentator.h:20:
      agg-svn/agg-2.4/include/agg_basics.h:231:13: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
                  register unsigned q = a * b + (1 << (Shift-1));
                  ^~~~~~~~~
      1 warning generated.
      /usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_USE_FREETYPE -D_ENABLE_TEXT_RENDERING -Iagg-svn/agg-2.4/include -Iagg-svn/agg-2.4 -Iceliagg -I/Users/cwebster/.venvs/enable/lib/python3.11/site-packages/numpy/core/include -Iagg-svn/agg-2.4/font_freetype -I/Users/cwebster/.venvs/enable/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c celiagg/_celiagg.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/celiagg/_celiagg.o -Wfatal-errors -Wno-unused-function -std=c++11 -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include
      celiagg/_celiagg.cpp:224:12: fatal error: 'longintrepr.h' file not found
        #include "longintrepr.h"
                 ^~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

Γ— Encountered error while trying to install package.
╰─> celiagg

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

agg::font_cache_manager only supports 16-bit glyph indices

[noticed while working on #94]

agg::font_cache::find_glyph splits requested glyph indices into most- and least-significant bytes before looking them up. This restricts glyph indices to a maximum of 16-bits. This is usually OK, but in light of broader Unicode coverage implied by #94, the glyph cache needs to be refactored to handle 32-bit glyph indices

Difference in rendering issues with celiagg

Hello,

I thinkit has already been mentionned in enthought/enable#247, but the text rendering of a chaco plot between the agg and celiagg backend is different. To me, it looks better on the original agg backend. For reference, this is the bigdata example on chaco.

celiagg

agg

The text seems blurry on celiagg and there is a black edge on the graph. You mentionned that it was an easy fix... Can you elaborate a bit on how that's done?

The noninteractive.py example is different in that the background outside of the graph area is transparent as opposed to being white on the original agg backend.

Implement blending modes

GraphicsState already has the blend_mode and image_blend_mode attributes, but they're ignored by the canvas when rendering.

image_blend_mode might be redundant, since AGG appears to set the blending mode on the destination rendering buffer.

OS X Support

Trying to install master from source on OS X gives the following error:

Traceback (most recent call last):
  File "setup.py", line 82, in <module>
    packages=['celiagg', 'celiagg.tests']
  File "/Users/cwebster/.edm/envs/celiagg/lib/python2.7/site-packages/numpy/distutils/core.py", line 135, in setup
    config = configuration()
  File "setup.py", line 51, in configuration
    config.add_subpackage('celiagg')
  File "/Users/cwebster/.edm/envs/celiagg/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 1002, in add_subpackage
    caller_level = 2)
  File "/Users/cwebster/.edm/envs/celiagg/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 971, in get_subpackage
    caller_level = caller_level + 1)
  File "/Users/cwebster/.edm/envs/celiagg/lib/python2.7/site-packages/numpy/distutils/misc_util.py", line 908, in _get_configuration_from_setup_py
    config = setup_module.configuration(*args)
  File "celiagg/setup.py", line 140, in configuration
    cflags, ldflags = get_freetype_info()
  File "celiagg/setup.py", line 73, in get_freetype_info
    data = collect_data()
  File "celiagg/setup.py", line 68, in collect_data
    data[key] = run_cmd(cmd_prefix + args, env=env)
  File "celiagg/setup.py", line 58, in run_cmd
    env=env, stderr=dev_null.fileno())
  File "/Users/cwebster/.edm/envs/celiagg/lib/python2.7/subprocess.py", line 567, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/Users/cwebster/.edm/envs/celiagg/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/Users/cwebster/.edm/envs/celiagg/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

can't pip install without freetype

It should be possible to pip install celiagg even if freetype is not installed:

pip install celiagg --install-option="--no-text-rendering"

However, this doesn't work properly, because when pip tries to run setup.py egg_info before setup.py install, it does not use --install-option. (--global-option doesn't help either). This is with the latest pip version (10.0.0). The full error is:

Collecting celiagg
  Downloading https://files.pythonhosted.org/packages/c5/29/a9a4d2666f5f6c3388376f8468302a632f8da5c425e9fa64e8314d90d7f6/celiagg-1.0.2.tar.gz (614kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 624kB 8.1MB/s 
    Complete output from command python setup.py egg_info:
    Failed to execute pkg-config freetype2.  If freetype is installed in standard system locations, it may work to run this script with --no-freetype-pkg-config.  Otherwise, appropriate CFLAGS and LDFLAGS environment variables must be set.
    
    If you wish to disable text rendering, you can re-run this script with the --no-text-rendering flag.

Perhaps this is a pip bug, and pip ought to use --global-option values when invoking setup.py egg_info... But in any case, should/could celiagg do anything to help here? And/or more generally, should it try to detect the lack of freetype and default back to no text rendering, rather than throwing an error?

(Also, clearly I don't get something about how pip is working, because just running python setup.py egg_info for the celiagg setup file results in an error about egg_info being an unknown command. So I don't know 100% of what's really going on here.)

font.width(text) produce different results before and after drawing

Hello!

Thanks for the great module!
All works perfectly except one thing: measured text width depends on transform which we used in previous draw_text call.

Demo:

import celiagg as agg

canvas = agg.CanvasRGB24(np.ones((200,200,3), dtype=np.uint8))
font = agg.Font('Helvetica-Regular.ttf', 40.0, agg.FontCacheType.RasterFontCache)
state = agg.GraphicsState(drawing_mode=agg.DrawingMode.DrawStroke, line_width=2)
paint = agg.SolidPaint(0.0, 0.0, 0.0)

canvas.clear(1.0, 1.0, 1.0)

angle = 0.75
pos = (100, 100)
text = "123"

transform = agg.Transform()
transform.translate(pos[0] - 0.5*font.width(text), 0.5*font.height)
transform.rotate(angle)

print(font.width(text)) # produce 67.0 as expected

# if we apply any draw_text with transform then all changes
canvas.draw_text(text, font, transform, state, stroke=paint)

print(font.width(text)) # 49.023154214546
# We got 49 but expected 67.0.
# So the next text drawing with different transform based on text width
# will be misaligned

So we get all kinds of strangeness in result, like swapping two function calls draw_object1(); draw_object2() produce different picture.

I check out module code, but seems cause may be hidden in agg. Although Font class apllies transform on itself before each drawing, font.string_width method and glyphiterator looks independent of it at surface.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.