Today after finishing my config I had some time to think about stuff. What really got me is that no-one has ever used scrollFrames to do stuff. I set up an experiment that I may try to prove if I have time.

I made the following graphics:

Basic ring setup:

We put a scrollFrame with an inline texture into ring segment 1:

This will happen if we change the setpoint of the scrollFrame and the setpoint of the texture inside the scrollFrame:

This is what is going to happen if we only adjust the size of the scrollframe:

What about rotation? Let's see. Hmm the offset does not fit.

So this is what happens if we correct the offset.

What we are doing in the last screenshot. We rotate the scrollFrame right while adjusting the setpoint properly. Additionally we rotate the ringTexture inside the scrollFrame in opposite direction.

*edit*

Ahhh...got an even better idea. Why would you rotate the scrollFrame at all? We can just leave as it is and just rotate the texture inside.

This is what will happen:

The pink thingy is the alpha layer of the ring texture.

Now if we rotate the texture inside the scrollFrame it will adjust on it's own.

This should make it very simple to create any kind of rings. Just set up 4 scrollFrames and throw in any ring texture you want. The number of rings per scrollFrames is unlimited. Each ring texture can be rotated individually.

Only one limitation. Start and end point of a ring segment can only be in one segment if at least one point is at 0° or 90°.

It even should be possible to do full half-rings with only 2 scrollFrames. Your ring texture would span 180° then.

It actually inspired me to try and use a scroll frame myself for some to-do list I'm working on. Sliding panel with transparent frames (so no lazy moving behind the parent frame) \o/

The possibilities... they are endless.

Edit: You could also make a pretty cool experience bar with it. A full circle represents one level. You have a segment for the current experience, then a second segment starting at the end of the first one representing rested experience. If you make the second one semi-transparent, you could see how far it overlaps into the next level as well, something which traditional experience bars can't do.

zork

03-03-13 07:18 AM

@Haleth
Nice one.
@humfras
You can cheat alot more if you have to. Atleast it's a huge improvement of what we currently had to do.

The texture can use blending and gradients are possible aswell. Additonally you can use overlays or backgrounds. You can recolor on value change. You can even position another texture (spark) ontop of the ring.

@humfras
You can cheat alot more if you have to. Atleast it's a huge improvement of what we currently had to do.

The texture can use blending and gradients are possible aswell. Additonally you can use overlays or backgrounds. You can recolor on value change. You can even position another texture (spark) ontop of the ring.

Maybe it has sth to do with the mysterious 1px I read about. Going to try to snip out 1px of my ring.
Afaik I read sth about it in Iriels ring theory. Thus every texture with a transparent outer edge needs to stay away from the texture edge by atleast 1px. Gonna try that. I think they did that to determine matching background colors or the like.

Loooool. That worked. I stripped the outer pixel and BÄÄÄM.

So when working with Texture:SetRotation() you have to make sure to do these:

Texture size has to be in SQRT

Texture rotation must be in rad

Texture file must not hit the other edge of the image or you will get background color copy behaviour that you may not want.

SDPhantom

03-13-13 12:31 PM

The reason for the first bug you mentioned is just the way WoW decides to render the out of bounds area of a texture's image. It tends to duplicate the last pixel out past the bounds of the image in order to fill the rendering area of the texture. This has nothing to do with texture:SetRotation() and will show up if you use texture:SetTexCoord() with coordinates that extend out of bounds.

The problem in which the SQRT method fixes is that Blizzard chose to have a texture shrink so the corners of an image fit in it at a 45 degree angle whenever texture:SetRotation() is used. If you manually calculate the coordinates of the corners and set the texcoord yourself, this doesn't apply. Although it's probably easier and more efficient to just multiply the intended size of the texture object with SQRT(2) as shown by your code example.

zork

03-13-13 01:40 PM

Thanks for the insight SDPhantom.

I'm on the way of creating an oUF layout from this. I really wanted to do this for a long time. Now I'm finally able to make it work properly.

I'm currently setting up the orb templates in my GFX program. Currently I have two templates in mind that I want to bring to life.

The problem is the castbar icon. I think I have to put it somewhere else.

Dridzt

03-14-13 10:23 AM

*swoons* :o

10leej

03-14-13 12:55 PM

Why not have the castbar circle the healthbar which circles the mana bar?

Lombra

03-14-13 07:00 PM

Looks amazing. :D

Talyrius

03-14-13 07:05 PM

The bright colors and round shapes remind me of poké balls from Pokémon.

zork

03-15-13 04:42 AM

You get that those are only examples showing the technique behind the scenes right? I'm just showing options. Everything else is personal preference. Do whatever you want. You have the freedom to do so.

You can use any color. You can do quarter, half, full-rings. You can use any ring-width and so on ...

pelf

03-23-13 11:20 AM

Quote:

Originally Posted by zork
(Post 274641)

The problem is the castbar icon. I think I have to put it somewhere else.

Top left has symmetry with the cast time. Have you tried putting it behind the main orb?