Closed anthrotype closed 4 years ago
Perhaps worth mentioning that building the whole of Skia library on Appveyor Windows CI now takes 25 minutes (multiplied by 6 for each python version and arch). I will probably end up building it once in a while and have the build script download the pre-built DLL for windows at least.
Changes below include
build and embed the whole libskia (static library for Linux/Mac, shared DLL for Windows) using skia's own build toolchain (gn and ninja); previously we were only building a subset of skia using setuptools, but it was too hard to maintain as skia keeps evolving. Note that gn tool requires python2 to be on the PATH (or use
PYTHON2_EXE
environment variable). If one does not want to build libskia from source when compiling the pathops extension module, one can exportBUILD_SKIA_FROM_SOURCE=0
. To specify a directory where a pre-built skia is located useSKIA_LIBRARY_DIR
environment variable.expose
SkStrokeRec
aspathops.Path::stroke
, for transforming a stroked path into an outline; this supports all properties of SVG path's stroke attribute (width, cap, join, miter limit)add an
arcTo
method toPath
class, which models SVG elliptical arcs. Note that skia internally stores elliptical arcs using conic curves.add
Path::convertConicsToQuads
method to approximate conic curves using qudratic bezier curves, which can be drawn with fonttools pens.