Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected offset on iOS using clipping node #408

Open
totallyeviljake opened this issue Apr 30, 2014 · 0 comments
Open

Unexpected offset on iOS using clipping node #408

totallyeviljake opened this issue Apr 30, 2014 · 0 comments
Labels

Comments

@totallyeviljake
Copy link
Member

Seen here: https://cocos2dxna.codeplex.com/discussions/543703

I have an issue with CCClipMode.Bounds.

When I add an image to a layer and place it at the corner of the layer and set the CCClipMode.Bounds on the layer, the image is clipped but the 'clip area' shifts on different resolutions. The 'clip area' shifts upwards in landscape when the Y-value of the CCDrawManager.VisibleOrigin is greater than 0. The shift of the 'clip area' is shifted exactly this value. The image stays on the same location on the screen, but the area that's visible shifts up.

I created a small example below just to demonstrate. I know there are other options for just a CCSprite, it's just an example. I have the same problem when I use a CCTableView.

Is it a bug? Does anyone have the same issue? Is it related to a setting?
// imageLayer

CCLayer imageLayer = new CCLayer(CCClipMode.Bounds);

imageLayer.ContentSize = new CCSize(175f,223f);

imageLayer.Position = new CCPoint(100,100);

// image

CCSprite image = Model.Packages.AtlasMain ["ButtonCalendarNormal"];

image.AnchorPoint = CCPoint.AnchorMiddle;

image.Position = new CCPoint(87.5f, 111.5f); // half the size of the actual image

imageLayer.AddChild(image);

this.AddChild(imageLayer);

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

No branches or pull requests

1 participant