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

Get different anchor points when apply different images to the same cc.Sprite #1073

Open
zyfu0000 opened this issue Aug 11, 2013 · 1 comment

Comments

@zyfu0000
Copy link

Add a sprite with a png image

this.sprite = cc.Sprite.create("image/HelloWorld.png");
this.sprite.setPosition(cc.p(0, 0));
this.sprite.setAnchorPoint(cc.p(0, 0));
this.addChild(this.sprite, 0);

the image's left-bottom corner is exactly on the screen's left-bottom corner.

Then I change another png image, the image's right-top corner is on the screen's center point, that is to say, the anchor point doesn't change.

Any rules about image file's format? or, is it a bug?

@dingpinglv
Copy link
Contributor

Hi, zyfu0000

What does the "change another png image" mean?

Could you please give some codes to reproduces the question?

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

No branches or pull requests

2 participants