[cairo] Patch for cairo - high resolution images in PDF surface.

Ivan Baldo ibaldo at adinet.com.uy
Mon Dec 4 12:16:56 PST 2006


    Hello.
    I am relatively new to Cairo and I yet haven't used the PS or PDF 
backends though I plan to do in the near future.


El 04/12/06 14:23, Carl Worth escribió:
> On Sun, 26 Nov 2006 14:24:49 +1100, Andrew McRae wrote:
>   
>>     // Use 300 DPI for image.
>>     cairo_surface_set_fallback_resolution(img, 300.0, 300.0);
>>     
>
> I don't like the above at all. The definition of
> "set_fallback_resolution" doesn't apply to an image surface at
> all. Instead, for a vector-based surface this function means, "When
> drawing to this surface, and an operation cannot be represented in
> native vectors, use the given resolution to capture the image data
> that will be generated by the fallbacks".
>
> So, we've got that notion in the PDF backend already. Why don't we
> just use its fallback resolution to control the results of rendering
> image-surface-based source patterns?
>
> I haven't checked how bad that would be in the implementation, but it
> seems like the conceptually correct thing to do. Reactions?
>   
    Since I am new I hesitated to tell my reaction but maybe because I 
am new there are some advantages: I imagine how some things "should" 
work so maybe taking into account what a newbie thinks could help other 
newbies too :).
    I always thought that set_fallback_resolution not only worked for 
the internal Cairo fallbacks but also for when one has an image as a 
source pattern and you paint it for example in the PDF backend, so, if I 
have a source pattern that has a lot of resolution in it and I fill a 
rectangle that is drawn on a PDF context then Cairo would render the 
fill with the fallback resolution of the PDF and *not* with only 72dpi, 
thats what I expect.
    Complexity should be hidden from the user where possible so the user 
can have more fun with Cairo.
    So my reaction to what you said Carl is that you are right, thats 
the way it ought to work if at all possible, I find it more intuitive 
from a newbie standpoint.
    Thats just my opinion, I hope I am not being too intrusive.
    Bye.

-- 
Ivan Baldo - ibaldo at adinet.com.uy - http://ibaldo.codigolibre.net/
ICQ 10215364 - Phone/FAX (598) (2) 613 3223.
Caldas 1781, Malvin, Montevideo, Uruguay, South America.
We believe that we are free, but in reality we are not! Are we?
Alternatives: ibaldo at codigolibre.net - http://go.to/ibaldo




More information about the cairo mailing list