• 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
Add NSString into an NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Add NSString into an NSImage


  • Subject: Add NSString into an NSImage
  • From: Roberto Sobachi <email@hidden>
  • Date: Mon, 16 Feb 2004 14:23:27 +0100

I've readed all documentation about including text into an NSImage, and
return this one.

It's not so clear.

How can I calculate the Point of my NSImage without a View?

I've got this code:

NSBundle * bundle = [NSBundle mainBundle];
NSString * path = [bundle pathForImageResource:@"drag_image"];
NSImage *tempImage = [[[NSImage alloc] initWithContentsOfFile:path]
autorelease];

NSAttributedString *tempString;
[tempString initWithString: @"sddfgfgfd"];

[tempImage lockFocus];

???????

[tempImage unlockFocus];


return tempImage;






Roberto Sobachi
developer
http://www.xidiar.com
_______________________________________________
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.

  • Follow-Ups:
    • Re: Add NSString into an NSImage
      • From: Stephane Sudre <email@hidden>
  • Prev by Date: Re: calling method via IMP that returns non id type - compiler warning
  • Next by Date: Cant't use UTF-8 source files. False string interpretation.
  • Previous by thread: Re: Self contained MetaPackages
  • Next by thread: Re: Add NSString into an NSImage
  • Index(es):
    • Date
    • Thread