Re: ScalingScrollView with Sketch [workaround]
Re: ScalingScrollView with Sketch [workaround]
- Subject: Re: ScalingScrollView with Sketch [workaround]
- From: Eric Forget <email@hidden>
- Date: Thu, 26 Feb 2004 12:40:54 -0500
Hi Jeff,
>
I came up with a different workaround that also works for rotated text
>
views in a scaled view. Give the following a whirl (I have done this
>
in my own application rather than doing it in the modified sketch
>
example, but I believe the theory is the same)
>
>
Do not override isRotatedOrScaleFromBase nor drawRect. Instead,
>
override setNeedsDisplayInRect
>
>
- (void) setNeedsDisplayInRect:(NSRect)nsRect
>
{
>
// Call ours first to do whatever it needs to do
>
[super setNeedsDisplayInRect:nsRect];
>
>
// Convert our rect into superview rect coordinates
>
NSRect superRect = [self convertRect:nsRect toView:[self superview]];
>
>
// Tell super view it needs to display
>
[[self superview] setNeedsDisplayInRect:superRect];
>
}
>
I've tried you code snipped. I looks like a good replacement for my drawRect
override. It is a bit less an hack than mine.
However, I still need to override isRotatedOrScaleFromBase because when the
view has been zoomed in and out 1 time, the text is squeeze (only while
editing).
>
Is your goal to ultimately create a text object similar to those in
>
OmniGraffle/Keynote?
Yep this is my goal... My next step was to allow the rotation...
Eric
___________________________________________________________________
Eric Forget Cafederic
email@hidden <
http://www.cafederic.com/>
Fingerprint <86D5 38F5 E1FD 5D9C 71C3 BAA3 797E 70A4 6210 C684>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.