Jump to content
  • entries
    109
  • comments
    7
  • views
    70,325

Dynamically Resizing Backgrounds that Don't Distort


Daniel Wood

1,284 views

G'day all! Just posted a new article over at FM Weetbicks, hope you enjoy it. This is a technique that I've used in a few solutions now, mainly for login screens or splash screens where I want to present a pretty backdrop image.  The issue is that when the user resizes their screen or rotates their device, the image can often stretch, distort, or end up with gaps of space if it is set to maintain aspect ratio.

This article presents a way around that, hope you enjoy!

https://www.teamdf.com/blogs/dynamically-resizing-backgrounds/

Quote

If background images are used sensibly, they can provide a beautiful backdrop to areas of your solution, such as a login screen, splash screen, or indeed the entire solution. FileMaker allows the user stretch the window both horizontally and vertically in any ratio they wish. Anchoring has allowed us to try and compensate for this in our designs, but often images suffer because they are themselves a fixed aspect ratio, and deviating from that ratio will either stretch and distort the image if 'maintain aspect ratio' is off, otherwise result in blank space around the image edge if aspect ratio is on - both options are not ideal for a background image.

In this article we present a technique that allows you to resize an image and have it re-generate a thumbnail version upon resizing of the layout. This thumbnail version is a cropped version of the original, but respects the original image's aspect ratio.  If you choose your image sensibly, you can make a layout background that looks great no matter what dimensions your window is set to.

 

 

0 Comments


Recommended Comments

There are no comments to display.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.