Render transformation matrix

Damien Ciabrini Damien.Ciabrini at sophia.inria.fr
Wed Jan 26 05:35:23 PST 2005


[This migth be a question for Damid Reveman, who committed some render 
related code a few hours ago.]

I'm trying to add support for the Render transformation matrix for the 
Kdrive mga driver, and I'd like to know if I understood the problem 
correctly.

In a user program, I want to composite a Picture with a certain zoom 
factor. I do it with the following piece of code:

  XRenderSetPictureTransform(dpy,icon_pic,&xform);
  // XRenderSetPictureFilter(dpy,icon_pic,FilterBilinear, 0, 0);
  XRenderComposite(dpy,composite_op,icon_pic, 0, back_buffer_pic,
                   0, 0, 0, 0, zoomed_x[i],zoomed_y[i],
		  zoomed_size[i],zoomed_size[i]);
and this is my transformation matrix:
   XTransform xform = {{
	{ 1.0f, 0.0f, 0.0f },
	{ 0.0f, 1.0f, 0.0f },
	{ 0.0f, 0.0f, 2.0f }
   }};
I assume it would give the same result with the following matrix:
   XTransform xform = {{
	{ 2.0f, 0.0f, 0.0f },
	{ 0.0f, 2.0f, 0.0f },
	{ 0.0f, 0.0f, 1.0f }
   }};

Now here comes my problem. When doing the composite in software (Kdrive 
Xvesa server), the scaling does not occur if I use floating point values 
such as:
   XTransform xform = {{
	{ 1.0f, 0.0f, 0.0f },
	{ 0.0f, 1.0f, 0.0f },
	{ 0.0f, 0.0f, 2.3f }     <-- 2.3
   }};

What I'd like to know is if Kdrive Xvesa sever behaves wrongly, or if I 
misunderstood something.

Any help ? Thanks !

--
Damien



More information about the xorg mailing list