Skip to content
  • Owen W. Taylor's avatar
    Switch to specifying rendered output in pixels, not as a scale · 6b50ba71
    Owen W. Taylor authored and Carlos Garcia Campos's avatar Carlos Garcia Campos committed
    Passing a scale to the backend meant that we were implicitly counting
    on the backend code and front-end code to do exactly the same calculation
    to get the rendered size of a page. Instead switch to passing a
    target size in pixels to the backend.
    
    This, among other things, allows us to make sure that we render at a size
    that is integer device pixels in both X and Y directions.
    
    ev-render-context.[ch]: Add ev_render_context_set_target_size() and
    three helper functions:
    
     ev_render_context_compute_scaled_size(): get the pixel size to render at
     ev_render_context_compute_transformed_size(): size including effect of rotation
     ev_render_context_compute_scales(): get the corresponding xscale/yscale.
    
    ev-jobs.[ch]: Add ev_job_thumbnail_new_with_target_size(), and pass the
    target size for thumbnail and render jobs (which already had a target
    size) to the backends.
    
    backend/*: Use the helper functions rather than directly accessing
     render_context->scal...
    6b50ba71