• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Drawing scaled lines
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing scaled lines


  • Subject: Re: Drawing scaled lines
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Fri, 7 Jan 2005 20:56:00 +0100

At 11:41 Uhr -0800 07.01.2005, Mark Dawson wrote:
I want to draw line figures (lines, rects, etc) that are correctly scaled (i.e., 1" on screen is 1' in real life). I haven't quite figured out the question to ask to find the correct documentationŠ

I don't think you can do that. You'd have to know the resolution of the screen. My screen for instance is 19", at 1280x1024, but I can also switch it to 1024x768 or 800x600. I don't think the screens provide any way for Cocoa to determine their physical size. You can only find out their pixel dimensions, but if I set my screen to 1024x768, it'll report the same size as an iBook with a 12" screen or an iBook with a 14" screen.


I think what's usually done is to have a default, and during setup to display a small ruler. Ask people to take a ruler to the screen and measure where on the screen ruler the one-inch-mark is, and enter that in your app. Then you can calculate the size from that.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Drawing scaled lines (From: Mark Dawson <email@hidden>)

  • Prev by Date: Re: Drawing scaled lines
  • Next by Date: Bindings & Undo
  • Previous by thread: Re: Drawing scaled lines
  • Next by thread: Re: Drawing scaled lines
  • Index(es):
    • Date
    • Thread