This is a draft implementation of a quick-ish blur effect. It was written to support overlay UI elements in druid, but could in theory be used anywhere you want to blur a PietImage. As an example, this is what I'm using it for:
Backend implementation status & notes:
[x] Direct2D (hardware accelerated). The device context should probably be cached instead of recreated each time the method is called, and it would be nice if the unsafe block wasn't so large.
[x] Cairo (software implementation, very approximate dual-kawase-inspired algorithm). Not as efficient as it could be, currently creates a duplicate surface and render context to get around Cairo's surface data reference count limit.
[x] CoreGraphics (software implementation, same algorithm as Cairo). It would be better to use a filter from coreimage for hardware acceleration but the rust bindings for that are not currently available.
This is a draft implementation of a quick-ish blur effect. It was written to support overlay UI elements in druid, but could in theory be used anywhere you want to blur a PietImage. As an example, this is what I'm using it for:
Backend implementation status & notes: