View Single Post
02-29-16, 08:06 PM   #48
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by zork View Post
Thanks a ton. What blew me is that you can adjust the SetTexCoord of a texture and keep the clipping that is set by the animation rotation.

Basically the texture is clipped twice. By the animationgroup and by the scrollframe.
The animation isn't clipping the texture. The only thing the animation does is physically rotate the entire texture widget, which is extremely important because SetTexCoord is only capable of moving the texture within the boundaries of its (square) dimensions.



Since the animation rotates the entire physical texture object, it means SetTexCoord is no longer limited to cutting off the texture at 90 degree angles (the sides of the texture), because now the side of the texture is at whatever angle we rotated it to.

You can think of a texture object like a scroll frame. You can move its contents around using SetTexCoord, but you can only ever "clip" it at its edges, which are always 90 degrees.

Now imagine that you could apply a rotation animation to a scroll frame. You're no longer limited to 90 degree angles because the edges aren't straight up and down, they're at the angle you set the rotation to.

The animation still isn't clipping anything in that example, the scroll frame is, it's just changing the angle that the scroll frame is clipping its contents at.
  Reply With Quote