salgdi.cxx (7f5c89d5) salgdi.cxx (97073f94)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1457 unchanged lines hidden (view full) ---

1466 nY = /*mnHeight*/ - (nY + nHeight);
1467
1468 // prepare the target context
1469 NSGraphicsContext* pOrigNSCtx = [NSGraphicsContext currentContext];
1470 [pOrigNSCtx retain];
1471
1472 // create new context
1473 NSGraphicsContext* pDrawNSCtx = [NSGraphicsContext graphicsContextWithGraphicsPort: mrContext flipped: IsFlipped()];
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1457 unchanged lines hidden (view full) ---

1466 nY = /*mnHeight*/ - (nY + nHeight);
1467
1468 // prepare the target context
1469 NSGraphicsContext* pOrigNSCtx = [NSGraphicsContext currentContext];
1470 [pOrigNSCtx retain];
1471
1472 // create new context
1473 NSGraphicsContext* pDrawNSCtx = [NSGraphicsContext graphicsContextWithGraphicsPort: mrContext flipped: IsFlipped()];
1474 // set it, setCurrentContext also releases the prviously set one
1474 // set it, setCurrentContext also releases the previously set one
1475 [NSGraphicsContext setCurrentContext: pDrawNSCtx];
1476
1477 // draw the EPS
1478 const NSRect aDstRect = NSMakeRect( nX, nY, nWidth, nHeight);
1479 const BOOL bOK = [xEpsImage drawInRect: aDstRect];
1480
1481 // restore the NSGraphicsContext
1482 [NSGraphicsContext setCurrentContext: pOrigNSCtx];

--- 1006 unchanged lines hidden (view full) ---

2489 aCGColorSpace, aCGBmpInfo );
2490 }
2491
2492 // initialize XOR mask context for drawing
2493 CGContextSetFillColorSpace( mxMaskContext, aCGColorSpace );
2494 CGContextSetStrokeColorSpace( mxMaskContext, aCGColorSpace );
2495 CGContextSetShouldAntialias( mxMaskContext, false );
2496
1475 [NSGraphicsContext setCurrentContext: pDrawNSCtx];
1476
1477 // draw the EPS
1478 const NSRect aDstRect = NSMakeRect( nX, nY, nWidth, nHeight);
1479 const BOOL bOK = [xEpsImage drawInRect: aDstRect];
1480
1481 // restore the NSGraphicsContext
1482 [NSGraphicsContext setCurrentContext: pOrigNSCtx];

--- 1006 unchanged lines hidden (view full) ---

2489 aCGColorSpace, aCGBmpInfo );
2490 }
2491
2492 // initialize XOR mask context for drawing
2493 CGContextSetFillColorSpace( mxMaskContext, aCGColorSpace );
2494 CGContextSetStrokeColorSpace( mxMaskContext, aCGColorSpace );
2495 CGContextSetShouldAntialias( mxMaskContext, false );
2496
2497 // improve the XorMask's XOR emulation a litte
2497 // improve the XorMask's XOR emulation a little
2498 // NOTE: currently only enabled for monochrome contexts
2499 if( aCGColorSpace == GetSalData()->mxGraySpace )
2500 CGContextSetBlendMode( mxMaskContext, kCGBlendModeDifference );
2501
2502 // initialize the transformation matrix to the drawing target
2503 const CGAffineTransform aCTM = CGContextGetCTM( xTargetContext );
2504 CGContextConcatCTM( mxMaskContext, aCTM );
2505 if( mxTempContext )

--- 46 unchanged lines hidden ---
2498 // NOTE: currently only enabled for monochrome contexts
2499 if( aCGColorSpace == GetSalData()->mxGraySpace )
2500 CGContextSetBlendMode( mxMaskContext, kCGBlendModeDifference );
2501
2502 // initialize the transformation matrix to the drawing target
2503 const CGAffineTransform aCTM = CGContextGetCTM( xTargetContext );
2504 CGContextConcatCTM( mxMaskContext, aCTM );
2505 if( mxTempContext )

--- 46 unchanged lines hidden ---