Slick Forums

Reversing scrolled images
Page 1 of 1

Author:  stillwind [ Mon Jul 29, 2013 10:49 am ]
Post subject:  Reversing scrolled images

Hi Matthias,

I've made an image like a kind of speech bubble to show help on my app. It has an arrow that points to one corner and the scrolling region expands away from that point. Here's an image from ThemeEditor to show you what I mean:
themeEditor.png [ 4.72 KiB | Viewed 5624 times ]

The xml looks like this, and it works perfectly like so:
<area name="helpBoxArrowTopRightBackgrd" xywh="58,134,62,57" border="16,10,10,51" splity="T46,B10" splitx="L10,R51"/>
topRight.png [ 11.99 KiB | Viewed 5624 times ]

And by happy accident, instead of duplicating my image to get an upside down version, I used the flip vertical setting, and figured out that by reversing the splity params it also works perfectly...:
<area name="helpBoxArrowBottomRightBackgrd" xywh="58,134,62,-57" border="10,10,16,51" splity="T-46,B-10" splitx="L10,R51"/>
bottomRight.png [ 15.43 KiB | Viewed 5624 times ]

So far so good, so I figured I can make the horizontal reverse of both of these as follows:
<area name="helpBoxArrowTopLeftBackgrd" xywh="58,134,-62,57" border="16,51,10,10" splity="T46,B10" splitx="L-10,R-51"/>
<area name="helpBoxArrowBottomLeftBackgrd" xywh="58,134,-62,-57" border="10,51,16,10" splity="T-46,B-10" splitx="L-10,R-51"/>
But here it didn't work out as I hoped, and I've played with the top left version quite a bit to see if I could get it to work... eg. splitx="L-51,R-10", but nothing I tried gets the results. (I'll make a reply to this asap to show the results... it seems I can only post 3 images at a time)

So, I'm wondering if I'm doing something wrong, or using TWL in an unintended way, or if there's some fix required. Obviously, I do have some workarounds, but the very easiest for me is if the above can be made to work.

Thanks for all help!

Author:  stillwind [ Mon Jul 29, 2013 10:51 am ]
Post subject:  Re: Reversing scrolled images

And here's what those 2 last definitions produce:
topLeft.png [ 10.48 KiB | Viewed 5622 times ]
bottomLeft.png [ 23.67 KiB | Viewed 5622 times ]

Thanks :)

Author:  MatthiasM [ Mon Jul 29, 2013 7:05 pm ]
Post subject:  Re: Reversing scrolled images

First the splitx/y don't accept negative values - these are clamped against 0.

But it seems as splitx/y doesn't correctly work with flipx/y. I'll try to fix that.

Author:  stillwind [ Mon Jul 29, 2013 7:10 pm ]
Post subject:  Re: Reversing scrolled images

Ok I see... my best bet is to make it with grids then, I think.


edit: Hmm, maybe I don't see... I think I misunderstood originally... do you mean you will make it so positive split values will work on flipped images, and so I'll be able to do what I was trying to do?

Author:  MatthiasM [ Mon Jul 29, 2013 7:39 pm ]
Post subject:  Re: Reversing scrolled images

Yes, positive split values should work now with this patch.

The split values are specified on the flipped image.

Author:  stillwind [ Mon Jul 29, 2013 8:11 pm ]
Post subject:  Re: Reversing scrolled images


Thanks so much... wow, that was quick! :D

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group