1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00

Rotate image

This commit is contained in:
Lucie Anglade 2020-06-03 19:47:34 +02:00
parent 86b32fa2c2
commit f2a7614138

View File

@ -19,7 +19,6 @@ from .layout.percentages import percentage
from .logger import LOGGER from .logger import LOGGER
from .urls import URLFetchingError, fetch from .urls import URLFetchingError, fetch
# Map values of the image-rendering property to cairo FILTER values: # Map values of the image-rendering property to cairo FILTER values:
# Values are normalized to lower case. # Values are normalized to lower case.
IMAGE_RENDERING_TO_FILTER = { IMAGE_RENDERING_TO_FILTER = {
@ -71,7 +70,8 @@ class RasterImage:
# Use the real intrinsic size here, # Use the real intrinsic size here,
# not affected by 'image-resolution'. # not affected by 'image-resolution'.
context.push_state() context.push_state()
context.transform(concrete_width, 0, 0, concrete_height, 0, 0) context.transform(
concrete_width, 0, 0, -concrete_height, 0, concrete_height)
context.draw_x_object(image_name) context.draw_x_object(image_name)
# TODO: handle this # TODO: handle this
# context.get_source().set_filter( # context.get_source().set_filter(