Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Nov 17, 2024
1 parent 21475c9 commit df8782f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/svgren/config.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace svgren {

using real = svgdom::real;

// TODO: take these types from veg
using image_type = rasterimage::image<uint8_t, 4>;
using image_span_type = decltype(std::declval<image_type>().span());

Expand Down
6 changes: 3 additions & 3 deletions src/svgren/filter_applier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ filter_result color_matrix(

using std::min;
c1 = min(c1, real(1)); // clamp top
*dp = rasterimage::to_integral<image_type::value_type>(c1);
*dp = rasterimage::to_integral<image_type::pixel_type::value_type>(c1);
++dp;
}
}
Expand Down Expand Up @@ -693,7 +693,7 @@ filter_result blend(surface& in, surface& in2, svgdom::fe_blend_element::mode mo
// qr = 1 - (1 - qa) * (1 - qb)
auto qr = 1 - (1 - c01.a()) * (1 - c02.a());

*dp = rasterimage::to_integral<image_type::value_type>(r4::vector4<real>{cr, qr});
*dp = rasterimage::to_integral<image_type::pixel_type::value_type>(r4::vector4<real>{cr, qr});
++dp;
}
}
Expand Down Expand Up @@ -782,7 +782,7 @@ filter_result composite(surface& in, surface& in2, const svgdom::fe_composite_el
break;
}

*dp = rasterimage::to_integral<image_type::value_type>(o);
*dp = rasterimage::to_integral<image_type::pixel_type::value_type>(o);
++dp;
}
}
Expand Down

0 comments on commit df8782f

Please sign in to comment.