[Cairo] Image functions
spitzak at d2.com
Wed Oct 15 09:40:53 PDT 2003
On Wednesday 15 October 2003 08:46 am, Carl Worth wrote:
> On Oct 14, Alexandre Pigolkine wrote:
> > I think that cairo_move_to specifies a position on the destination
> > surface where to put a bitmap and I am missing a way to
> > specify a position on the source surface from where to start.
> > Something like:
> > copy from source pos xs, ys, width, height to
> > destination pos xd,yd.
I think what he wants can and should be done with clipping.
If he has an image of size W,H and he wants to draw a rectangle x,y,w,h from
it at dx,dy he should do this:
1. clip to the rectangle dx,dy,w,h.
2. Draw the entire W,H image at dx-x,dy-y.
3. Pop the clip region
,~,~,~,~ ~ ~ ~ ~
/\_ _|_========___ Bill Spitzak
~~~/\/\\~~~~~~\____________/~~~~~~~~ spitzak at d2.com
More information about the cairo