fovea-derive
fovea-derive provides the procedural macros used by fovea to derive pixel layout and arithmetic traits.
Most users should depend on fovea and use the derive macros re-exported from that crate. Depend on fovea-derive directly only if you are working on the fovea internals or need the macro crate explicitly.
[]
= "0.1.1"
Derives
| Derive | Purpose |
|---|---|
PlainPixel |
Declares that a pixel has a stable byte layout suitable for byte-level access. |
HomogeneousPixel |
Declares that all channels have the same channel type. |
ZeroablePixel |
Generates a zero value for image allocation and initialization. |
LinearPixel |
Generates linear-space arithmetic support with an explicit accumulator type. |
Example
use ;
use Saturating;
The derives intentionally enforce fovea's pixel model: memory layout is explicit, channel roles are named, and invalid trait implementations should fail during compilation rather than at runtime.
Part of the fovea project
- Core crate:
fovea - End-to-end demos:
fovea-examples
License
Licensed under the MIT License.