<br><font size=2 face="sans-serif">I think I posted my question right in
the heat of your big release yesterday, so I hope you'll forgive me for
re-posting it today.</font>
<br>
<br><font size=2 face="sans-serif">Would one of you experts be willing
to give me just a quick hint at how to size (or resize) an image surface
*after* I've drawn the content, in order to output a .PNG that is right-sized
for the drawing? I've spent hours fumbling with clipping functions
without success. . .</font>
<br>
<br><font size=2 face="sans-serif">I'm currently drawing everything once
*just* to find the extents, then throwing it away and drawing everything
all over again on the correct size surface! Please save me from this
humiliation!</font>
<br>
<br><font size=2 face="sans-serif">Congratulations on Cairo version 1.4.0.
It's really a super package.</font>
<br>
<br><font size=2 face="sans-serif"> - Marty</font>
<br>
<br><font size=2 face="sans-serif">p.s. I'm using rcairo on Red Hat, if
that matters.</font>
<br>
<br><font size=1 color=#800080 face="sans-serif">----- Forwarded by Marty
Sherrill/CRA/PEC on 03/06/2007 02:57 PM -----</font>
<br>
<br><tt><font size=2>Marty Sherrill/CRA/PEC wrote on 03/05/2007 02:52:09
PM:<br>
<br>
> Hello all,</font></tt>
<br><tt><font size=2>> <br>
> I'm looking for help understanding how to crop an image (or <br>
> otherwise set its dimensions) in memory just after it's drawn. I'm
<br>
> drawing images that need to be different sizes according to their
<br>
> content, and it's not practical to figure out the dimensions before
<br>
> doing the actual drawing.</font></tt>
<br><tt><font size=2>> <br>
> I have the idea in mind to draw on a larger-than-necessary surface,
<br>
> track the extents of my drawing, and then crop off the extra space.</font></tt>
<br><tt><font size=2>> <br>
> Is that a good approach? If so, could I get some advice as to
how <br>
> the cropping step can be accomplished?</font></tt>
<br><tt><font size=2>> <br>
> Best regards,</font></tt>
<br><tt><font size=2>> <br>
> - Marty</font></tt>