enthought / enthought/enable

Clipping paths not implemented for Image backend

Open
#140 1 comment 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
C
Stars
97
Forks
45
PR merge metrics
No merged PRs in 30d

Description

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")
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.