adk123
adk123

Reputation: 1

How to get coordinates from a image for CGRectMake

Is there a program, that you can drag a box around a specific area of an image, and it will give you the coordinates you need to input into CGRectMake?

//The numbers in here
CCSprite *sprite = [CCSprite spriteWithSpriteSheet:spriteSheet rect:CGRectMake(608,6,44,45)];

The way i do it know, is by guessing, and recompiling every time till i get it right... there has to be a better way.

Upvotes: 0

Views: 623

Answers (2)

Michael Kessler
Michael Kessler

Reputation: 14235

You have the Pixie app pre-installed on Mac.

I am not a designer and don't have tools like Photoshop, so Pixie does quite a good job for my needs.

One thing that you are better to change in the Preferences is to check the "Mouse Hot Spot" checkbox so that you will see the current pixel in the center...

Upvotes: 1

Eiko
Eiko

Reputation: 25632

Your image processing software is a good candidate. I.e. if you select a region in Photoshop, the info panel will give you this information.

Upvotes: 0

Related Questions