Author Topic: Is there a new alternative for "Fill Keeping Ratio?  (Read 1903 times)

kruncher

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 78
    • View Profile
Is there a new alternative for "Fill Keeping Ratio?
« on: December 11, 2013, 07:46:31 AM »
Hey there!

The new layout system seems to replace UIAnchor and UIStretch beautifully though I am left with a couple of UIStretch components for which I am a little unsure with:

Ui Camera = Camera
Container = Panel
Style = FillKeepingRatio
Relative Size = X: 1, Y: 1
Initial Size = X: 1024, Y: 768
Border Padding = X: 0, Y: 0

What would this translate to with the new layout mechanism?

chirhotec

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Is there a new alternative for "Fill Keeping Ratio?
« Reply #1 on: December 12, 2013, 12:45:31 AM »
+1 for the topic. I need to do a couple things that I think are along the same line:

1) I need to have a background, anchored to the bottom of the screen, where the image is scaled depending on the screen resolution, but the image aspect ratio needs to be preserved. If the width is too large for the image, the top of the image would get cut off screen. If the height is too large for the image, then then it would crop from the sides of the image.

2) I have a header bar that should take up the top 5 of the screen (that's easy enough with the new anchoring system). Then I need the logo inside of the title bar, which should be scaled to fit within the header bar, but not skew the image and mess up the logo.

Anyone have any ideas on how to do this with the new anchoring system?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Is there a new alternative for "Fill Keeping Ratio?
« Reply #2 on: December 12, 2013, 12:49:06 AM »
It's a planned feature. I'll add it once I figure out an elegant way of presenting it in an intuitive manner.