• 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: scaling down without NSImage while printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scaling down without NSImage while printing


  • Subject: Re: scaling down without NSImage while printing
  • From: Hidetomo Katsura <email@hidden>
  • Date: Thu, 23 Dec 2004 11:11:48 -0800

i figure it out. the following code seems to work on 10.2.8 as well while printing.

  view = [[NSView alloc] initWithFrame:srcRect];
  [self addSubview:view];
  [view scaleUnitSquareToSize:scaleSize];
  [view lockFocus];
  [customView drawRect:srcRect];
  [view unlockFocus];
  [view removeFromSuperview];
  [view release];

thanks anyway,
katsura

On Dec 23, 2004, at 9:20 AM, Hidetomo Katsura wrote:

the following code works fine on 10.3.7 but fails on 10.2.8 while printing. i need to scale srcRect down to dstRect to make it fit in the page size.

image = [[NSImage alloc] initWithSize:srcRect];
[image lockFocus];
[view drawRect:srcRect];
[image unlockFocus];
[image drawInRect:dstRect fromRect:srcRect operation:NSCompositeCopy fraction:1.0];
[image release];


how can i scale it down without using NSImage on 10.2.8 while printing? any suggestions?

thanks in advance,
katsura

_______________________________________________ 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: 
 >scaling down without NSImage while printing (From: Hidetomo Katsura <email@hidden>)

  • Prev by Date: Re: Why is indexOfObjectIdenticalTo: *far* faster than indexOfObject: ?
  • Next by Date: Re: Examining the Call Stack
  • Previous by thread: scaling down without NSImage while printing
  • Next by thread: Bundling Framework Problem
  • Index(es):
    • Date
    • Thread