Scaled Blits only through transformation matrix?

KAMALNEET SINGH kamalneet.s at samsung.com
Mon May 19 22:42:29 PDT 2008


Clemens Eisserer wrote:
> Hello,
> 
> I have to create a routine for scaled blits which looks like this:
> scaledBlit(source, destination, int sx1, int sy1, int sx2, int sy2,
> double dx1, double dy1, double dx2, double dy2)
> The the user specifies a rectangle in the source and a rectangle in
> the destination, and the library scales the source according to the
> proportion of the two rectangles.
> 
> As far as I have seen XRender is only capable of repeating if the
> destination rectangle is larger than the source, or am I wrong?
It depends on srcX, srcY, and PictureTransform. If the transformed 
coordinate to be used for the source or mask picture falls outside of 
the picture, repeat modes come into play. But you said you want to 
scale, not repeat?

> Is the only way to serve a request like above to modify the
> tranformation-matrix of the destination?
Yes, it can be done through PictureTransform, but of the source Picture.
Don't know any other way..

~kammal


More information about the xorg mailing list