Hello!
Let me start by saying I am new to matrices, so I apologise if I am missing something very obvious.
This statement found on the Graphics Transform tutorial says:
"If your entity is a sf::Transformable (sprite, text, shape), which contains its own internal transform, both the internal and the passed transform are combined to produce the final transform."
Sounds great. So I create an sf::Text I use setPosition(200,200) to put it where I want.
If I draw the sf::Text with a custom transform, e.g. window.draw(textentity, customtransform), for shearing....the result is not as expected. However, if I use my custom transform to shear and translate to where I want....it works perfectly. What am I missing?
I tested this in very simple code, not in a bigger project. PICTURE 1 shows desired 200,200 location.
PICTURE 2...odd positioning:
textentity.setPosition(200,200);
sf::Transform shearme(
1, 0, 0,
0.5, 1, 0,
0, 0, 1);
window.draw(textentity, shearme)
PICTURE 3...perfect outcome:
textentity.setPosition(0,0);
sf::Transform shearme(
1, 0, 200,
0.5, 1, 200,
0, 0, 1);
window.draw(textentity, shearme)
Thank you for reading!