How to draw a rotated image in a view?

  • Hello all,
    I'd like to print a NSImage object, but its size made it'd better to
    be printed out by rotate 90 degree. I create a NSView (or a
    NSImageView if it works) and would like draw the rotated image into
    that view, then print that view out. If anybody know a good way to do
    that?

    Thanks for any information!
    Fei
  • On 10/2/06, Fei Li <feil...> wrote:
    > Hello all,
    > I'd like to print a NSImage object, but its size made it'd better to
    > be printed out by rotate 90 degree. I create a NSView (or a
    > NSImageView if it works) and would like draw the rotated image into
    > that view, then print that view out. If anybody know a good way to do
    > that?

    Apple has good documentation on this search for it, in particular...

    <http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide
    /Transforms/chapter_4_section_3.html
    >

    -Shawn
  • Thank you very much for your reply.

    I got it. I create a NSView, transform it's coordinate, draw the
    image in it's drawRect, then print the view out.

    Thanks again.
    On Oct 2, 2006, at 10:47 AM, Shawn Erickson wrote:

    > On 10/2/06, Fei Li <feil...> wrote:
    >> Hello all,
    >> I'd like to print a NSImage object, but its size made it'd better to
    >> be printed out by rotate 90 degree. I create a NSView (or a
    >> NSImageView if it works) and would like draw the rotated image into
    >> that view, then print that view out. If anybody know a good way to do
    >> that?
    >
    > Apple has good documentation on this search for it, in particular...
    >
    > <http://developer.apple.com/documentation/Cocoa/Conceptual/
    > CocoaDrawingGuide/Transforms/chapter_4_section_3.html>
    >
    > -Shawn
  • hi
    can i use the equal methode to rotate a nstextfield? i have rotate
    the textfield but the content was cuted...

    best regards

    philippe

    Am 03.10.2006 um 17:53 schrieb Fei Li:

    > Thank you very much for your reply.
    >
    > I got it. I create a NSView, transform it's coordinate, draw the
    > image in it's drawRect, then print the view out.
    >
    > Thanks again.
    > On Oct 2, 2006, at 10:47 AM, Shawn Erickson wrote:
    >
    >> On 10/2/06, Fei Li <feil...> wrote:
    >>> Hello all,
    >>> I'd like to print a NSImage object, but its size made it'd better to
    >>> be printed out by rotate 90 degree. I create a NSView (or a
    >>> NSImageView if it works) and would like draw the rotated image into
    >>> that view, then print that view out. If anybody know a good way
    >>> to do
    >>> that?
    >>
    >> Apple has good documentation on this search for it, in particular...
    >>
    >> <http://developer.apple.com/documentation/Cocoa/Conceptual/
    >> CocoaDrawingGuide/Transforms/chapter_4_section_3.html>
    >>
    >> -Shawn
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/my-mailing%
    > 40treeinspired.ch
    >
    > This email sent to <my-mailing...>
  • > can i use the equal methode to rotate a nstextfield? i have rotate
    > the textfield but the content was cuted...

      hi
      you can rotate your textfield by using "setFrameRotation" method.
      for example if editor is your textField then,
          [editor setFrameRotation:50.0];
      Trry this and then let me know.

    >> I got it. I create a NSView, transform it's coordinate, draw the
    >> image in it's drawRect, then print the view out.
    >>
    >> Thanks again.
    >> On Oct 2, 2006, at 10:47 AM, Shawn Erickson wrote:
    >>
    >>> On 10/2/06, Fei Li <feil...> wrote:
    >>>> Hello all,
    >>>> I'd like to print a NSImage object, but its size made it'd better to
    >>>> be printed out by rotate 90 degree. I create a NSView (or a
    >>>> NSImageView if it works) and would like draw the rotated image into
    >>>> that view, then print that view out. If anybody know a good way  to do
    >>>> that?
    >>>
    >>> Apple has good documentation on this search for it, in particular...
    >>>
    >>> <http://developer.apple.com/documentation/Cocoa/Conceptual/
    > >> CocoaDrawingGuide/Transforms/chapter_4_section_3.html>
    >>>
    >>> -Shawn
    >>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/my-mailing%
    >> 40treeinspired.ch
    >>
    >> This email sent to <my-mailing...>
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<nishant_yede...>
    om

    >
    > This email sent to <nishant_yede...>

    >

    --
    ______________________________________________
    IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com
    Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
  • hi
    thank a lot. i't works!!

    thank you again!

    best regards

    philippe

    Am 04.10.2006 um 08:06 schrieb Nishant Yede:

    >
    >
    >> can i use the equal methode to rotate a nstextfield? i have rotate
    >> the textfield but the content was cuted...
    >
    > hi
    > you can rotate your textfield by using "setFrameRotation" method.
    > for example if editor is your textField then,
    > [editor setFrameRotation:50.0];
    > Trry this and then let me know.
    >
    >
    >>> I got it. I create a NSView, transform it's coordinate, draw the
    >>> image in it's drawRect, then print the view out.
    >>>
    >>> Thanks again.
    >>> On Oct 2, 2006, at 10:47 AM, Shawn Erickson wrote:
    >>>
    >>>> On 10/2/06, Fei Li <feil...> wrote:
    >>>>> Hello all,
    >>>>> I'd like to print a NSImage object, but its size made it'd
    >>>>> better to
    >>>>> be printed out by rotate 90 degree. I create a NSView (or a
    >>>>> NSImageView if it works) and would like draw the rotated image
    >>>>> into
    >>>>> that view, then print that view out. If anybody know a good
    >>>>> way  to do
    >>>>> that?
    >>>>
    >>>> Apple has good documentation on this search for it, in
    >>>> particular...
    >>>>
    >>>> <http://developer.apple.com/documentation/Cocoa/Conceptual/
    >>>> CocoaDrawingGuide/Transforms/chapter_4_section_3.html>
    >>>>
    >>>> -Shawn
    >>>
    >>> _______________________________________________
    >>> Do not post admin requests to the list. They will be ignored.
    >>> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >>> Help/Unsubscribe/Update your Subscription:
    >>> http://lists.apple.com/mailman/options/cocoa-dev/my-mailing%
    >>> 40treeinspired.ch
    >>>
    >>> This email sent to <my-mailing...>
    >>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/nishant_yede%
    >> 40indiainfo.com
    >>
    >> This email sent to <nishant_yede...>
    >
    >>
    >
    >
    > --
    > ______________________________________________
    > IndiaInfo Mail - the free e-mail service with a difference!
    > www.indiainfo.com
    > Check out our value-added Premium features, such as an extra 20MB
    > for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today