Bitmap Image Filters
Subject:   Centering the view.
Date:   2002-08-12 05:02:38
From:   infallible
Response to: Centering the view.

I am looking for a solution for that problem also.
1. Fixing lower-left corner problem is easy, just overwrite one method:

- (BOOL)isFlipped
return YES;

now about centering the view :/....

I have 1 idea:
1. make a new subclass from NSView called MyPositioningView or something.
2. add a MyImageView subview to MyPositioningView
3. then check if the clipview is larger than the image * scaleFactor. If it is set MyPositioningView's frame as big as clipView's frame, but if not then make it as big as your image * scaleFactor.
4. change MyImageView's frame origin.

I am gonna try it this week[when i got time], but maybe somebody knows a better way...

Oh easiest way would be just make a subclass of NSScrollView and overwrite the (void)tile method, but its not a good solution[ euw ugly!] :( ].

btw. sorry about my poor english. And good luck with your book Mike :).

1 to 1 of 1
  1. Solution here:
    2002-08-12 07:30:31  infallible [View]

    • Oh almost forgot
      2002-08-12 07:53:03  infallible [View]

1 to 1 of 1