Hello again 
I still need help …
I’m trying to make this work in every possible configuration, and I still have trouble : it works great for trapezoids like these :

but for regular quads like this one :

it doesn’t work well …
For quad n°1 for instance, I’m using the following code :
// farther side of the texture
fTextureSmallSide = (float)( max(XA,XB)-min(XA,XB) ) / (float)usXLengthMax;
// closer side of the texture
fTextureBigSide = (float)( max(XC,XD)-min(XC,XD) ) / (float)usXLengthMax;
// calculation of s,t & q for each dot, r is fixed to 0
fsA=0; ftA=0; fqA=fTextureSmallSide;
fsB=fTextureSmallSide; ftB=0; fqB=fTextureSmallSide;
fsC=fTextureBigSide; ftC=fTextureBigSide; fqC=fTextureBigSide;
fsD=0; ftD=fTextureBigSide; fqD=fTextureBigSide;
glBegin(GL_QUADS);
glTexCoord4f(fsA,ftA,0,fqA); glVertex2f(ConvertPixelX(XA),ConvertPixelY(YA));
glTexCoord4f(fsB,ftB,0,fqB); glVertex2f(ConvertPixelX(XB),ConvertPixelY(YB));
glTexCoord4f(fsC,ftC,0,fqC); glVertex2f(ConvertPixelX(XC),ConvertPixelY(YC));
glTexCoord4f(fsD,ftD,0,fqD); glVertex2f(ConvertPixelX(XD),ConvertPixelY(YD));
glEnd();
But for quad n°5, I’m a bit confused about how the q coordinate is working, and how I should do … I’ve tried a lot of things, but results aren’t good at all 
I tried calculating fsA and ftA to be relative to the position into the quad, results were a bit better, but far from what is expected …
Any ideas on how to implement this ?
Thanks 