• 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: how to make an NSWindow unmovable...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to make an NSWindow unmovable...


  • Subject: Re: how to make an NSWindow unmovable...
  • From: Eric Brunstad <email@hidden>
  • Date: Sun, 12 Jun 2005 21:12:52 -0400

Hi,

On Jun 12, 2005, at 8:45 PM, Philip George wrote:

On Jun 12, 2005, at 5:28 PM, Philip George wrote:


i actually have code lying around to draw a custom window based on provided corner/side/center pics, but i was trying to avoid using it.

if i can find no other solution, i'll fall back to that.


okay, i forgot i lost this code in a hard disk failure a few months ago.  i'm trying to re-implement it, but it's been a while so i'm a little hazy...

how can i draw an NSImage into the contentView of an NSWindow **without** the use of an NSImageView to hold the image?

all of this would be happening in the drawRect: method of a sublass of NSView that i'm using as the contentView of the window.

i have individual PNGs for top, bottom, left, right, 4-corners, and center.  all pics except the corners are meant to stretch on window resize.  the 4 corner pieces are always drawn at their original size.

i did this without NSImageViews last time.

the mechanics of the individual pieces (stretching/placement) is irrelevent i guess.

i just need to know how to write png data (represented as an NSImage) into an NSView (sans-NSImageView).

thanks.

- philip

See NSImage's - (void)compositeToPoint:(NSPoint)aPoint operation:(NSCompositingOperation)op.

This draws the NSImage into the current NSView.  So, calling this from within a -drawRect method would draw the image in the NSView that -drawRect was called on.

Eric Brunstad
Mind Sprockets Software
email@hidden
www.mindsprockets.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Scott Thompson <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Eric Brunstad <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Jeff Ganyard <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)
 >Re: how to make an NSWindow unmovable... (From: Philip George <email@hidden>)

  • Prev by Date: Re: Adding NSImage to empty QTMovie
  • Next by Date: Re: how to make an NSWindow unmovable...
  • Previous by thread: Re: how to make an NSWindow unmovable...
  • Next by thread: Re: how to make an NSWindow unmovable...
  • Index(es):
    • Date
    • Thread