PDA

View Full Version : Specified pixel sizes




vodouman
May 17, 2011, 03:41 PM
Hi guys,

I'm looking to get into iPhone development. I have experience in C++ so will be starting slow and hopefully working my way towards something interesting.

If I wanted to implement pixel specific shapes into an iOS app how would I go about it (e.g. perhaps I may want 20 pixels wide and 10 pixels down) - I want to produce 2D rectangles on screen and because of the limited screen size of the device I have to be very specific in regards to how many 2D shapes I can fit on the screen.

Is it possible for me to define shapes in a pixel x pixel format or is it done using a coordinate system via OpenGL? Do any of you have a suggestion to solve a problem like this?

Thanks!

- Vodouman



aaronbrethorst
May 17, 2011, 10:12 PM
Hi guys,

I'm looking to get into iPhone development. I have experience in C++ so will be starting slow and hopefully working my way towards something interesting.

If I wanted to implement pixel specific shapes into an iOS app how would I go about it (e.g. perhaps I may want 20 pixels wide and 10 pixels down) - I want to produce 2D rectangles on screen and because of the limited screen size of the device I have to be very specific in regards to how many 2D shapes I can fit on the screen.

Is it possible for me to define shapes in a pixel x pixel format or is it done using a coordinate system via OpenGL? Do any of you have a suggestion to solve a problem like this?

Thanks!

- Vodouman

Go check out Core Graphics. Apple has quite a bit of sample code on developer.apple.com that shows you how to use it.