diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/README.md | 1 | ||||
| -rw-r--r-- | tests/typeset.rs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/README.md b/tests/README.md index 3ae908af..6ebba237 100644 --- a/tests/README.md +++ b/tests/README.md @@ -5,3 +5,4 @@ - `png`: PNG files produced by tests - `ref`: Reference images which the PNGs are compared to byte-wise to determine whether the test passed or failed +- `res`: Resource files used by tests diff --git a/tests/typeset.rs b/tests/typeset.rs index 38651766..d9a1056a 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -247,8 +247,8 @@ fn draw_text(canvas: &mut Canvas, loader: &FontLoader, shaped: &Shaped, pos: Poi fn draw_image(canvas: &mut Canvas, image: &ImageElement, pos: Point) { let mut pixmap = Pixmap::new(image.buf.width(), image.buf.height()).unwrap(); for (src, dest) in image.buf.pixels().zip(pixmap.pixels_mut()) { - let [r, g, b, a] = src.0; - *dest = ColorU8::from_rgba(r, g, b, a).premultiply(); + let [r, g, b] = src.0; + *dest = ColorU8::from_rgba(r, g, b, 255).premultiply(); } let view_width = image.size.width.to_pt() as f32; |
