Page 1 of 1

Stretching a Surface

PostPosted: Sep 23, 2004 @ 11:28am
by Slim

PostPosted: Sep 23, 2004 @ 5:12pm
by Conan

PostPosted: Sep 23, 2004 @ 5:14pm
by Kzinti

PostPosted: Sep 23, 2004 @ 8:07pm
by fzammetti

PostPosted: Sep 23, 2004 @ 9:11pm
by Kzinti

PostPosted: Sep 23, 2004 @ 9:36pm
by fzammetti

PostPosted: Sep 23, 2004 @ 10:19pm
by fast_rx

PostPosted: Sep 24, 2004 @ 12:17am
by fzammetti
fast_rx, would it be enough to expose the BlitTransformation() method, and then just document a number of generically useful matrixes? In my mind that would be a pretty good deal, even without Thierry (or anyone else) implementing extra functions...

PostPosted: Sep 24, 2004 @ 4:01am
by fast_rx

PostPosted: Sep 24, 2004 @ 4:07am
by fzammetti

PostPosted: Sep 27, 2004 @ 11:12am
by Slim

PostPosted: Sep 27, 2004 @ 2:45pm
by fast_rx

PostPosted: Sep 27, 2004 @ 4:24pm
by Kzinti

PostPosted: Sep 28, 2004 @ 1:50pm
by Slim
Yes, it's a good idea to specify three corners and calculate the fourth.

The problem is that I don't want to mess around with the matrix without guidance (I actually don't understand how it works).

Let's say I want to use BlitStretch and create a surface with corners on (0,0) (100,0) (10,100) (110,100). The source is a Rect(0,0,100,100).

What should the matrix look like? Today the matrix in BlitStretch(...):
T[0][0] = rx;
T[0][1] = 0;
T[1][0] = 0;
T[1][1] = ry;
T[2][0] = -destRect.left * rx + (srcRect.left << 10);
T[2][1] = -destRect.top * ry + (srcRect.top << 10);


How should each element in the matrix in my case be calculated? It should be a general solution to it, shouldn't it?

Once again thanks for replying and sorry for causing so much trouble about this stretching-thing.

PostPosted: Sep 28, 2004 @ 3:57pm
by fast_rx