Re: Flipped horizontal NSRulerView?
Re: Flipped horizontal NSRulerView?
- Subject: Re: Flipped horizontal NSRulerView?
- From: Conrad Shultz <email@hidden>
- Date: Thu, 11 Aug 2011 01:27:08 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 8/10/11 9:47 PM, Graham Cox wrote:
> Yes, I think so - subclass & override -drawHashMarksAndLabelsInRect.
> I think the comment that the horizontal ruler already assumes a
> flipped coordinate system refers to the fact that it draws text,
> which likes flipped coordinates, and also maybe makes it easier to
> lay out.
Thanks for the response.
Unless I'm missing something big, overriding this method is rather
non-trivial. There doesn't seem to be any way to get at the positions
that NSRulerView internally calculates normally, so I will have to do
all my own math, including sorting out the stepUp/stepDown stuff that
you usually get for free.
This is fine (even if it's not how I would prefer to be spending time),
but it makes me wonder what benefit I will really get then from using
NSRulerView. Since I don't anticipate using markers or event handling
on the axis scales, I wonder whether it might make more sense to scrap
NSRulerView entirely and just do the axis drawing in the scroll view's
documentView's drawRect: (which is already being used to plot the actual
data).
Thoughts? This is the first time I've dealt with NSRulerView so I don't
know if there are other hidden benefits that I would forgo.
- --
Conrad Shultz
Synthetiq Solutions
www.synthetiqsolutions.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk5DklwACgkQaOlrz5+0JdWUIACfdVFTNflb6goKIxS7YBe0Fpsb
FnkAniJXwbEyFPD+kF8H6JTH1hb79FNr
=xVTb
-----END PGP SIGNATURE-----
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden