Skip to content

Clipping paths not implemented for Image backend #140

Description

@peowebster

This code should clip to a star-shape, but doesn't:

from kiva.image import GraphicsContext
from numpy import pi

gc = GraphicsContext((300, 300))
gc.set_fill_color((0.0, 0.0, 1.0))

gc.begin_path()
gc.move_to(100, 100)
gc.line_to(150, 200)
gc.line_to(200, 100)
gc.line_to(100, 150)
gc.line_to(200, 150)
gc.line_to(100, 100)
gc.close_path()
gc.clip()

gc.begin_path()
gc.arc(150, 150, 100, 0.0, 2 * pi)
gc.fill_path()
gc.save("star_clip.bmp")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions