• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Compositing text onto an NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compositing text onto an NSImageView


  • Subject: Re: Compositing text onto an NSImageView
  • From: Stéphane Sudre <email@hidden>
  • Date: Fri, 8 Jun 2001 13:23:13 +0200

On vendredi, juin 8, 2001, at 09:49 AM, Will Price wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have an NSImageView with an image in it. I now want to place text
overlayed on top of the image rotated at a 45 degree angle similar to
a watermark.

I'm very foggy on what I would need to do this. I get the feeling it
involves something to do with an NSBezierPath and I'm not sure what I
do to get the text onto the image...

Any pointers on how I should proceed here?

Do you want the NSImage to keep this "watermark" or not ?

If the answer is no, one solution might be to a put a custom subclass of a NSView on top of the NSImageView

Rotate the View using - (void)rotateByAngle:(float)angle;

and in the - (void) drawRect:(NSRect) frame; method of your custom subclass, draw a string.

If you're lazy or like optimization, simply add a NSTextField with tranparent background and do the rotate stuff.


References: 
 >Compositing text onto an NSImageView (From: Will Price <email@hidden>)

  • Prev by Date: Re: Compositing text onto an NSImageView
  • Next by Date: Re: Hidden Comments
  • Previous by thread: Re: Compositing text onto an NSImageView
  • Next by thread: Clever question on Localization
  • Index(es):
    • Date
    • Thread