Base transformation of a custom view
Base transformation of a custom view
- Subject: Base transformation of a custom view
- From: Jean Bovet <email@hidden>
- Date: Wed, 27 Mar 2002 20:26:12 +0100
>
Jean,
>
>
When you draw the image in your cell, try this:
>
>
[image setFlipped:YES];
>
// draw the image
>
[image setFlipped:NO];
>
It didn't work. In fact, how can I get the current transformation of a view
? Like this, I can be able to do the required transformation.
Jean
>
>
>
> My problem is the following: I would like to customize the drawing part
>
> of a
>
> cell in a matrix (like you did - or was it with an NSOutlineView?)
>
>
>
> My custom class inherit from NSCell (@interface MyCellClass : NSCell)
>
> and
>
> then I override the following method:
>
> -(void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView
>
> *)controlView.
>
>
>
> I'm then able to draw any text and image (with [myImage
>
> compositeToPoint:p
>
> operation:NSCompositeCopy]) inside the cell but, and that's the
>
> problem, all
>
> images are displayed with an rotation of 1800. I've realized that the
>
> relative coordinates system for the NSCell view is on the upper-left
>
> corner
>
> (and not the lower-left corner), but how can I display an image with the
>
> right orientation (with no rotation at all) ?
_______________________________________________
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.