[cairo] scale without bluring

Michael Gurnett gurnett at glocalnet.net
Sun Sep 28 14:41:59 PDT 2008


Should I be using patterns instead. I've been using 

    cairo_set_source_surface (cr_buffer, surface_current, 0, 0);
  cairo_paint(cr_buffer);

Michael


----- Original Message ----- 
From: "Chris Wilson" <chris at chris-wilson.co.uk>
To: "Michael Gurnett" <gurnett at glocalnet.net>
Cc: <cairo at cairographics.org>
Sent: Sunday, September 28, 2008 10:47 PM
Subject: Re: [cairo] scale without bluring


> On Sun, 2008-09-28 at 21:32 +0200, Michael Gurnett wrote:
>> Have been struggleing with this for a while now and could do with some
>> pointers. I rescaling a graph by 0.99 over and over again in the x
>> directions. When I do this the image blurs out and in the end the data
>> is lossed. I tried using StretchBlt but this just not seem to be
>> compatible with the format of the cr. It doesn't blur but i doesn't
>> scale correctly. I've tried turning off antialising but that does not
>> seem to help either. Any hints on how to scale without blurring.Is
>> there a StretchBlt equivalent in cairo that I have missed?
> 
> You haven't mentioned it, so I assume you've not tried setting
> CAIRO_FILTER_NEAREST on the source pattern. Although I have to ask, why
> are you rescaling the graph and not redrawing?
> 
> -- 
> Chris Wilson


More information about the cairo mailing list