Key the element glue on static type projections

This commit is contained in:
Dennis Kobert
2026-08-28 13:30:05 +00:00
parent d814b610da
commit c6b669fc88
8 changed files with 107 additions and 32 deletions

View File

@@ -26,6 +26,14 @@ pub struct BrushStampGenerator<P: Pixel + Alpha> {
transform: DAffine2,
}
// SAFETY: `Static` is `Self` with `P` at its own static projection.
unsafe impl<P: Pixel + Alpha + dyn_any::StaticTypeSized> dyn_any::StaticType for BrushStampGenerator<P>
where
P::Static: Pixel + Alpha,
{
type Static = BrushStampGenerator<P::Static>;
}
impl<P: Pixel + Alpha> Transform for BrushStampGenerator<P> {
fn transform(&self) -> DAffine2 {
self.transform