Constructor of 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.
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
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
The entire application fills the specified area, without distortion but possibly with some cropping,
while maintaining the original aspect ratio of the application.
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.
Unknown policy
Function to apply this resolution policy The return value is {scale: [scaleX, scaleY], viewport: {new Rect}}, The target view can then apply these value to itself, it's preferred not to modify directly its private variables
An object contains the scale X/Y values and the viewport rect
Manipulation after appyling the strategy
The target view
Manipulation before applying the resolution policy
The target view
Setup the container's scale strategy
The container strategy
Setup the content's scale strategy
The content strategy
Generated using TypeDoc
ResolutionPolicy class is the root strategy class of scale strategy, its main task is to maintain the compatibility with Cocos2d-x