简体   繁体   English

如何缩放具有固定纵横比的多个窗口,以使它们覆盖最大的显示器而不会重叠

[英]How can I scale multiple windows with fixed aspect ratio so that they cover maximum of monitor without overlapping

My question is in my title. 我的问题在我的标题中。 I am trying to develop a logic so that I can scale fixed aspect ratio windows to cover most of the screen without overlapping eachother. 我正在尝试开发一种逻辑,以便可以缩放固定的宽高比窗口以覆盖大部分屏幕,而不会彼此重叠。 There could be two three or four windows. 可能有两个三个或四个窗口。 There could be an alignment parameter also. 也可能有一个对齐参数。

You my friend will want to start reading this 您我的朋友将要开始阅读本

Optimal Layout Algorithm 最佳布局算法

this is a common problem in 2d game development ... think about the problem of how to pack sprites onto a sprite sheet. 这是2D游戏开发中的常见问题。请考虑如何将子图形打包到子图形表的问题。 IE it well understood in 2d especvially seeing a you are dealing with rectangles. IE在2d中很好地理解,特别是看到您正在处理矩形。 I am assuming that they are fixed aspect ratio and different sizes or else its simple maths. 我假设它们是固定的长宽比和不同的大小,或者是简单的数学公式。 If i am wrong just shout and i will give you an algorithm. 如果我错了,那就大喊大叫,我会给你一个算法。

There is another question on here about the 这里还有一个关于

I don't want to go on and on because that link will lead you to where you want to be ... 我不想继续下去,因为该链接会将您引向您想要去的地方...

this shuold be interesting http://primes.utm.edu/glossary/xpage/SieveOfEratosthenes.html 这个书应该很有趣http://primes.utm.edu/glossary/xpage/SieveOfEratosthenes.html

there was a good question bout the sieve ... well worth a read also Help speed up this algorithm? 筛子有一个很好的问题...非常值得一读,也有助于加快此算法的速度? Sieve of Eratosthenes Eratosthenes筛

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我应该如何在 Unity c# 中保持纵横比并将 3D 对象设置为在所选纵横比的纵横比内缩放? - How should I Maintain aspect ratio in Unity c# and set the 3D object to scale within the aspect ratio of the selected aspect ratio? 如何在不运行Windows运行时保留纵横比的情况下实现压缩变焦? - How implement pinch zoom without preserving aspect ratio in windows runtime? 如何在不基于当前位置X和Y更改宽高比的情况下调整旋转控件的大小? - How can i resize a rotated control without change the aspect ratio based on the current position X and Y? Unity)我怎样才能保持精灵的纵横比? - Unity) How can I maintain sprites aspect ratio? 如何为宽屏显示器保持应用程序的适当纵横比? - How to keep proper aspect ratio of my application for a widescreen monitor? 如何调整图像大小而又不影响纵横比 - How to resize the images without disturbing the aspect ratio 如何在不改变宽高比的情况下裁剪图像 - How to Crop Image without changing the aspect ratio 如何使用固定宽高比视图为展开视图充气 - How to Inflate an expanding view with a fixed aspect ratio view 如何在Windows Phone 8.1中使用正确的旋转,宽高比拍摄照片? (使用MediaCapture) - How do i take a photo with the correct rotation, aspect ratio in Windows Phone 8.1? (using MediaCapture) XNA缩放分辨率,同时保持宽高比? - XNA scale resolution while keeping aspect ratio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM