salbmp.cxx (9f62ea84) | salbmp.cxx (cd426cce) |
---|---|
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 --- 82 unchanged lines hidden (view full) --- 91 mnWidth = nWidth; 92 mnHeight = nHeight; 93 mnBits = nBitmapBits ? nBitmapBits : 32; 94 95 // initialize drawing context 96 CreateContext(); 97 98 // copy layer content into the bitmap buffer | 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 --- 82 unchanged lines hidden (view full) --- 91 mnWidth = nWidth; 92 mnHeight = nHeight; 93 mnBits = nBitmapBits ? nBitmapBits : 32; 94 95 // initialize drawing context 96 CreateContext(); 97 98 // copy layer content into the bitmap buffer |
99 const CGPoint aSrcPoint = { -nX, -nY }; | 99 const CGPoint aSrcPoint = CGPointMake( -nX, -nY); |
100 ::CGContextDrawLayerAtPoint( mxGraphicContext, aSrcPoint, xLayer ); 101 return true; 102} 103 104// ------------------------------------------------------------------ 105 106bool AquaSalBitmap::Create( const Size& rSize, sal_uInt16 nBits, const BitmapPalette& rBitmapPalette ) 107{ --- 618 unchanged lines hidden (view full) --- 726 if( !nX && !nY && (mnWidth == nNewWidth) && (mnHeight == nNewHeight) ) 727 { 728 xCroppedImage = mxCachedImage; 729 CFRetain( xCroppedImage ); 730 } 731 else 732 { 733 nY = mnHeight - (nY + nNewHeight); // adjust for y-mirrored context | 100 ::CGContextDrawLayerAtPoint( mxGraphicContext, aSrcPoint, xLayer ); 101 return true; 102} 103 104// ------------------------------------------------------------------ 105 106bool AquaSalBitmap::Create( const Size& rSize, sal_uInt16 nBits, const BitmapPalette& rBitmapPalette ) 107{ --- 618 unchanged lines hidden (view full) --- 726 if( !nX && !nY && (mnWidth == nNewWidth) && (mnHeight == nNewHeight) ) 727 { 728 xCroppedImage = mxCachedImage; 729 CFRetain( xCroppedImage ); 730 } 731 else 732 { 733 nY = mnHeight - (nY + nNewHeight); // adjust for y-mirrored context |
734 const CGRect aCropRect = {{nX, nY}, {nNewWidth, nNewHeight}}; | 734 const CGRect aCropRect = CGRectMake( nX, nY, nNewWidth, nNewHeight); |
735 xCroppedImage = CGImageCreateWithImageInRect( mxCachedImage, aCropRect ); 736 } 737 738 return xCroppedImage; 739} 740 741// ------------------------------------------------------------------ 742 --- 161 unchanged lines hidden --- | 735 xCroppedImage = CGImageCreateWithImageInRect( mxCachedImage, aCropRect ); 736 } 737 738 return xCroppedImage; 739} 740 741// ------------------------------------------------------------------ 742 --- 161 unchanged lines hidden --- |