Skip navigation.
 
mlRe: drawPageBorderWithSize: and NSPrintScalingFactor
FROM : David Dunham
DATE : Tue Aug 01 18:30:10 2006

On 30 Jul 2006, at 20:47, David Dunham wrote:

>> I've got a single view that I print. It's created for printing (so 
>> it's not inside an NSScrollView). My drawPageBorderWithSize: works 
>> perfectly when the scaling in Page Setup is 100%. When it's set to 
>> anything else, the origin of my border is all wrong.

>
> I've managed to adjust the origin via an ugly hack, so it seems to 
> work with scaling less than 100%. If I scale up, however, my frame 
> isn't completely drawn. Then again, neither is my text -- the first 
> page or two is clipped.


For the record: I was able to solve this by setting my own clip 
rectangle in drawPageBorderWithSize:. I'm not going to post in any 
detail because it's all voodoo and you probably don't want to copy my 
code. (And because there seem to be interactions between scaling in 
drawPageBorderWithSize: and drawRect: that complicate things.)

David Dunham    A Sharp, LLC
Voice/Fax: 206 783 7404    http://a-sharp.com
Efficiency is intelligent laziness.

Related mailsAuthorDate
mldrawPageBorderWithSize: and NSPrintScalingFactor David Dunham Jul 31, 04:17
mlRe: drawPageBorderWithSize: and NSPrintScalingFactor David Dunham Jul 31, 05:47
mlRe: drawPageBorderWithSize: and NSPrintScalingFactor David Dunham Aug 1, 18:30