View Full Version : Warp transform
admitrievsky
December 15th, 2007, 10:42 AM
Hi
Is there some plug-in that performs warp transform for entire desktop?
How can I create such plug-in if it's missing and what is bcop?
Forlong
December 16th, 2007, 02:02 PM
What's "wrap transform"?
BCOP is the abbreviation for Beryl/Compiz Options Parser - see http://wiki.compiz-fusion.org/Development/BCOP
admitrievsky
December 17th, 2007, 06:00 PM
Sorry, that's typo. Not wrap, but warp transform.
I have projector and I need to show films, presentations, etc. from different (sometimes long) distances and angles. There are no built-in functions (zoom out, scale, translate) in projector that can do this. I'd like to solve this problem as wide as possible. The only way to do so (I think) is warp transform.
Is there some plug-in that performs such transform?
delfick
December 18th, 2007, 02:50 AM
hmm, there isn't at the moment
But that is a good idea.
The windows nvidia driver has a program that allows you to do that.
Would be nice to see in compiz-fusion...
SmSpillaz
December 19th, 2007, 04:51 PM
I suppose you can fake it with freewins
admitrievsky
December 24th, 2007, 06:33 AM
I can't compile freewins. The latest version I can get (web, git) is 0.3. It requires library "compiz-core.h" which is not present in the latest version of compiz. Also, VTable seems to be not right. However, freewins affects single window while I need whole desktop transformation.
I'm trying to create my own plug-in, but I have some problem.
I've created the following function.
static Bool
warpPaintOutput (CompScreen *s,
const ScreenPaintAttrib *sAttrib,
const CompTransform *transform,
Region region,
CompOutput *output,
unsigned int mask)
{
CompTransform zTransform = *transform;
Bool status;
WARP_SCREEN (s);
UNWRAP (zs, s, paintOutput);
ScreenPaintAttrib sA = *sAttrib;
mask |= PAINT_SCREEN_TRANSFORMED_MASK;
CompTransform wTransform = *transform;
matrixScale (&wTransform, 0.6f, 0.3f, 1.0f);
status = (*s->paintOutput) (s, &sA, &wTransform, region, output, mask);
WRAP (zs, s, paintOutput, warpPaintOutput);
return status;
}
It works fine, but mouse pointer works as if there is no scale transform.
Where can I setup mouse pointer transformation from one coordinate system to another.
SmSpillaz
December 24th, 2007, 09:34 AM
There is no input redirection in the X server that allows us to do this easily. You would have to display a fake pointer, hide the real one and try to warp the pointer based on those fixed values that you have. Ezoom would provide you with the code to do that, but considering that your X, Y and Z scale points are not equal it may be quite a lot harder to do than you think.
I would wait for input transformation (which may or may not be coming very soon). And by the way, if you were able to write something like I said above, we would all be praising you as it is incredibly hard to do ;-)
As for freewins, you will have to use my 0.6 version which you can find here (http://smspillaz.googlepages.com/freewins-0.3-0.6.zip), but it won't do input redirection. (And it only rotates windows, but I am working on it to make it better ;-))
admitrievsky
December 25th, 2007, 06:02 AM
I'd like to suggest another way to render the mouse pointer.
We can create some window where the pointer will be painted then apply to it translation (mouseX, mouseY) and exactly the same transform that we do for main window.
Is it real? Is there some difficulties that I don't know?
Sorry for my English
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.