{"id":7722,"library":"skia-pathops","title":"skia-pathops: Skia Path Operations for Python","description":"skia-pathops is a Python library that provides access to boolean operations on 2D vector paths using Google's Skia graphics library. It's currently at version 0.9.2, seeing relatively frequent updates that often align with upstream Skia library changes or Python version support.","status":"active","version":"0.9.2","language":"python","source_language":"en","source_url":"https://github.com/fonttools/skia-pathops","tags":["graphics","paths","skia","geometry","fonttools","vector"],"install":[{"cmd":"pip install skia-pathops","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"wrong":"from skia_pathops import Path","symbol":"Path","correct":"from pathops import Path"}],"quickstart":{"code":"from skia_pathops import Path, PathOp, OpBuilder\n\n# Create two simple paths\npath1 = Path()\npath1.moveTo(0, 0)\npath1.lineTo(100, 0)\npath1.lineTo(100, 100)\npath1.lineTo(0, 100)\npath1.close()\n\npath2 = Path()\npath2.moveTo(50, 50)\npath2.lineTo(150, 50)\npath2.lineTo(150, 150)\npath2.lineTo(50, 150)\npath2.close()\n\n# Perform a union operation\nbuilder = OpBuilder()\nbuilder.op(path1, path2, PathOp.UNION)\nunion_path = builder.resolve().pop() # resolve returns a list of paths\n\nprint(f\"Original path 1 contour count: {len(path1.getContours())}\")\nprint(f\"Original path 2 contour count: {len(path2.getContours())}\")\nprint(f\"Union path contour count: {len(union_path.getContours())}\")\n\n# You can inspect the points of the resulting path (simplified output)\nfirst_contour_points = union_path.getContours()[0].points\nprint(f\"First contour points (first 3): {first_contour_points[:3]}\")","lang":"python","description":"This quickstart demonstrates how to create two simple rectangular paths and perform a union operation using `OpBuilder`. The result is a new `Path` object representing the combined shape."},"warnings":[{"fix":"Upgrade Python to 3.10 or newer, or `pip install 'skia-pathops<0.9.0'`.","message":"Python 3.8 and 3.9 support was dropped in `v0.9.0`. Users on these Python versions must either upgrade their Python environment or pin to an older `skia-pathops` version.","severity":"breaking","affected_versions":">=0.9.0"},{"fix":"Upgrade Python to 3.8 or newer, or `pip install 'skia-pathops<0.8.0'`.","message":"Python 3.7 support was dropped in `v0.8.0`. Users on Python 3.7 must upgrade their Python environment or use an older `skia-pathops` version.","severity":"breaking","affected_versions":">=0.8.0"},{"fix":"Before `pip install`, set `export BUILD_SKIA_FROM_SOURCE=0` (Linux/macOS) or `$env:BUILD_SKIA_FROM_SOURCE=0` (PowerShell) to disable embedded Skia build.","message":"When building from source, `skia-pathops` typically bundles and compiles `libskia`. To use a system-installed or externally compiled `libskia` instead, you must set the `BUILD_SKIA_FROM_SOURCE=0` environment variable.","severity":"gotcha","affected_versions":"all"},{"fix":"Update custom `PathPen` implementations to handle variable arguments for `curveTo` (4 or 6 points) and `qCurveTo` (2 or 4 points) as per the updated BasePen protocol.","message":"The `PathPen` interface's `curveTo` and `qCurveTo` methods changed to support a variable number of points, aligning with the fontTools BasePen protocol. This can break custom `Pen` implementations.","severity":"breaking","affected_versions":">=0.7.4"}],"env_vars":null,"search_vec":"'0.9.2':37 '2d':23 'access':18 'align':44 'boolean':20 'chang':49 'current':34 'fonttool':58 'frequent':40 'geometri':57 'googl':27 'graphic':30,54 'librari':15,31,48 'often':43 'oper':6,21 'path':5,25,55 'pathop':3,11 'provid':17 'python':8,14,51 'relat':39 'see':38 'skia':2,4,10,29,47,56 'skia-pathop':1,9 'support':53 'updat':41 'upstream':46 'use':26 'vector':24,59 'version':36,52","created_at":"2026-04-16T14:10:35.034248+00:00","updated_at":"2026-04-16T14:10:35.034248+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.9.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/fonttools/skia-pathops","docs":null,"changelog":null,"pypi":"https://pypi.org/project/skia-pathops/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}