web: Fix #412, incorrect bitmap rendering when cached

This commit is contained in:
Mike Welsh 2020-03-24 21:48:07 -07:00
parent fa063a6f53
commit 5591cec0f7
1 changed files with 4 additions and 2 deletions

View File

@ -1191,8 +1191,6 @@ fn swf_shape_to_canvas_commands(
)
.expect("html image element");
image.set_src(*bitmap_data);
if !*is_smoothed {
//image = image.set("image-rendering", pixelated_property_value);
}
@ -1207,6 +1205,10 @@ fn swf_shape_to_canvas_commands(
.create_pattern_with_html_image_element(&image, repeat)
.expect("pattern creation success")?;
// Set source below the pattern creation because otherwise the bitmap gets screwed up
// when cached? (Issue #412)
image.set_src(*bitmap_data);
let a = Matrix::from(matrix.clone());
let matrix = matrix_factory.create_svg_matrix();