Skip to content
Discussion options

You must be logged in to vote

pyclipper 1.4.0 is now supported on iOS and Android: https://pypi.flet.dev/pyclipper

Add it to your app's dependencies:

dependencies = [
    "flet",
    "pyclipper",
]

Example:

import flet as ft
import flet.canvas as cv
import pyclipper


def main(page: ft.Page):
    page.title = "pyclipper demo"

    subj = [[80, 40], [220, 40], [220, 160], [80, 160]]  # blue square
    clip = [[150, 10], [270, 10], [270, 130], [150, 130]]  # green square

    pc = pyclipper.Pyclipper()
    pc.AddPath(clip, pyclipper.PT_CLIP, True)
    pc.AddPath(subj, pyclipper.PT_SUBJECT, True)
    result = pc.Execute(pyclipper.CT_INTERSECTION)[0]  # red overlap

    def edges(poly, color, w):
        ring = poly + [poly[

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yst-one
Comment options

Answer selected by ndonkoHenri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants