Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Remove superfluous CCViewportResolutionPolicy #38

Closed
rtabbara opened this issue Oct 15, 2014 · 0 comments
Closed

Remove superfluous CCViewportResolutionPolicy #38

rtabbara opened this issue Oct 15, 2014 · 0 comments

Comments

@rtabbara
Copy link
Member

Currently, there's two resolution policies - one for a CCScene and another for CCViewport. The CCScene ultimately sets up the correct exact fit viewport rect based on:

  • specified design resolution
  • CCScene resolution policy

which are specified in CCWindow.SetDesignResolutionSize and then afterwards the Viewport scales the exact rect to get the actual rect based on the CCViewportResolutionPolicy which can be one of either:

  • ExactFit
  • AspectFill
  • AspectFit

By default the CCViewport is created with an ExactFit policy meaning no subsequent scaling is performed.

But there is no need (and in fact it's confusing) to further specify an additional viewport resolution policy which subsequently scales the exact bounds. Instead, a user can simply set a different design resolution to get the exact fit bounds they want.

As an analogy, it's like setting int x=4; x = x /2; vs. int x = 2;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant