Port feColorMatrix and feConvolveMatrix, fix <image> bbox (again), add integer parsers, add PixelRectangle iterator
- Ported
feColorMatrix
andfeConvolveMatrix
to Rust. - I used the
rulinalg
crate for basic matrix operations. - Unfortunately, due to (what I think is) lack of inlining and bounds checks, the
feColorMatrix
test takes ages (16 seconds) on debug. On release it's as fast as the C code. -
feConvolveMatrix
code is rather complex. It might be possible to factor out some common parts, please check, since I spent too much time thinking about the behavior over the past three days to process it properly. - Added
parsers::integer()
andparsers::integer_optional_integer()
. - Added a
PixelRectangle
iterator which returns pixels in a given rectangle, which can include out-of-bounds areas. Pixels in out-of-bounds areas are returned according toEdgeMode
(which corresponds to theedgeMode
property offeConvolveMatrix
). - Added
SharedImageSurface::scale()
,::scale_to()
,::extract_alpha()
. - Refactored
FilterError
andFilterContext::get_input()
to not lose any errors.
Edited by Ivan Molodetskikh