Scaling a Texture and keeping it in place

Blitz3D Forums/Blitz3D Programming/Scaling a Texture and keeping it in place

Kryzon(Posted 2009) [#1]
...can't be done!

My kingdom for a mathematic formula that keeps a texture in place when scaling it with ScaleTexture and positioning it with PositionTexture.

Unfortunately in Blitz3D we can't choose the scaling "axis", it always scales from the top-left corner.
How to offset the texture so that it is always centered at 0.5,0.5 at UV space?

Can't be done, I say.


Kryzon(Posted 2009) [#2]
Ehm, nevermind. I guess the Code Archives are there for a reason =(

http://blitzbasic.com/codearcs/codearcs.php?code=420

/Thread