• 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 do I make a screensaver that draws pictures?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I make a screensaver that draws pictures?


  • Subject: Re: How do I make a screensaver that draws pictures?
  • From: "Jeff Galyan" <email@hidden>
  • Date: Sun, 30 Dec 2001 17:23:03 -0700

Download Matrix from http://www.anamorphic.com. The source is included.
You'll want to pay special attention to the calls to [NSImage
compositeToPoint: fromRect:].

--Jeff



On 12/30/01 3:54 PM, "Taxxodium" <email@hidden> wrote:

> I'm trying to make a screensaver using the tutorial on cocoadevcentral. But
> instead of drawing shapes, I wanna be able to draw pictures and perhaps move
> then. Can anyone tell me how do that?
>
> SO far I have this, but doesn't do anything:
>
> - (void)animateOneFrame
> {
> NSImage *image;
> NSRect myRect;
> NSSize mySize;
>
> image = [[NSImage imageNamed:@"mypict.jpg"] copy];
>
> mySize = [image size];
>
> myRect.origin.x = 0;
> myRect.origin.y = 0;
> myRect.size = mySize;
>
> [image lockFocus];
> [image drawInRect:[self bounds] fromRect:myRect
> operation:NSCompositeCopy fraction:0.5];
> [image unlockFocus];
> }
> _______________________________________________
> 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.


References: 
 >How do I make a screensaver that draws pictures? (From: Taxxodium <email@hidden>)

  • Prev by Date: Re: How do I make a screensaver that draws pictures?
  • Next by Date: Cocoa questions
  • Previous by thread: Re: How do I make a screensaver that draws pictures?
  • Next by thread: Cocoa questions
  • Index(es):
    • Date
    • Thread