cocos2d-x FrameSize VisibleSize WinSize
发表于:2024-11-27 作者:热门IT资讯网编辑
编辑最后更新 2024年11月27日,FrameSize 屏幕分辨率WinSize DisignReslutionVisibleSize 在WinSize之内,小于或者等于WinSize屏幕分辨率适配模式:1.kResolutionExa
FrameSize 屏幕分辨率
WinSize DisignReslution
VisibleSize 在WinSize之内,小于或者等于WinSize
屏幕分辨率适配模式:
1.kResolutionExactFit 横向按横向比拉伸,纵向按纵向比拉伸
2.kResolutionNoBorder MAC(横向比,纵向比) 拉伸 ,会裁切
3.kResolutionShowAll MIN(横向比,纵向比) 拉伸 ,会出现黑边
4.kResolutionFixedHeight 高度撑满,纵向裁切 ,配合缩放因子 RH/DH
5.kResolutionFixedWidth 宽度撑满,纵向裁切 ,配合缩放因子 RW/DW
6.kResolutionUnKnown
enum ResolutionPolicy{ // The entire application is visible in the specified area without trying to preserve the original aspect ratio. // Distortion can occur, and the application may appear stretched or compressed. kResolutionExactFit, // The entire application fills the specified area, without distortion but possibly with some cropping, // while maintaining the original aspect ratio of the application. kResolutionNoBorder, // The entire application is visible in the specified area without distortion while maintaining the original // aspect ratio of the application. Borders can appear on two sides of the application. kResolutionShowAll, // The application takes the height of the design resolution size and modifies the width of the internal // canvas so that it fits the aspect ratio of the device // no distortion will occur however you must make sure your application works on different // aspect ratios kResolutionFixedHeight, // The application takes the width of the design resolution size and modifies the height of the internal // canvas so that it fits the aspect ratio of the device // no distortion will occur however you must make sure your application works on different // aspect ratios kResolutionFixedWidth, kResolutionUnKnown,};