svg-filters: format matrices in complex test

This commit is contained in:
Schrottkatze 2024-04-03 20:08:33 +02:00
parent 84448af714
commit ace69b0094
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc

View file

@ -11,7 +11,10 @@ fn test_chrom_abb() {
let chan_r = chromabb.color_matrix(
StandardInput::SourceGraphic,
ColorMatrixType::Matrix(Box::new([
1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.,
1., 0., 0., 0., 0., //
0., 0., 0., 0., 0., //
0., 0., 0., 0., 0., //
0., 0., 0., 1., 0.,
])),
);
let offset_r = chromabb.offset(chan_r, 25., 0.);
@ -20,7 +23,10 @@ fn test_chrom_abb() {
let chan_b = chromabb.color_matrix(
StandardInput::SourceGraphic,
ColorMatrixType::Matrix(Box::new([
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0.,
0., 0., 0., 0., 0., //
0., 0., 0., 0., 0., //
0., 0., 1., 0., 0., //
0., 0., 0., 1., 0.,
])),
);
let offset_b = chromabb.offset(chan_b, -25., 0.);
@ -31,7 +37,10 @@ fn test_chrom_abb() {
let chan_g = chromabb.color_matrix(
StandardInput::SourceGraphic,
ColorMatrixType::Matrix(Box::new([
0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.,
0., 0., 0., 0., 0., //
0., 1., 0., 0., 0., //
0., 0., 0., 0., 0., //
0., 0., 0., 1., 0.,
])),
);
chromabb.composite_arithmetic(composite_rb, chan_g, 0., 1., 1., 0.);