fixing the usage of hishape
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1444,18 +1444,14 @@ void wxMacCoreGraphicsContext::Clip( const wxRegion ®ion )
|
|||||||
{
|
{
|
||||||
if( m_cgContext )
|
if( m_cgContext )
|
||||||
{
|
{
|
||||||
HIShapeRef shape = HIShapeCreateWithQDRgn( (RgnHandle) region.GetWXHRGN() );
|
HIShapeReplacePathInCGContext( region.GetWXHRGN() , m_cgContext );
|
||||||
HIShapeReplacePathInCGContext( shape, m_cgContext );
|
|
||||||
CGContextClip( m_cgContext );
|
CGContextClip( m_cgContext );
|
||||||
CFRelease( shape );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// this offsetting to device coords is not really correct, but since we cannot apply affine transforms
|
// this offsetting to device coords is not really correct, but since we cannot apply affine transforms
|
||||||
// to regions we try at least to have correct translations
|
// to regions we try at least to have correct translations
|
||||||
wxMacCFRefHolder<HIShapeRef> hishape ;
|
HIMutableShapeRef mutableShape = HIShapeCreateMutableCopy( region.GetWXHRGN() );
|
||||||
hishape.Set( HIShapeCreateWithQDRgn( (RgnHandle) region.GetWXHRGN() ));
|
|
||||||
HIMutableShapeRef mutableShape = HIShapeCreateMutableCopy( hishape );
|
|
||||||
|
|
||||||
CGPoint transformedOrigin = CGPointApplyAffineTransform( CGPointZero, m_windowTransform );
|
CGPoint transformedOrigin = CGPointApplyAffineTransform( CGPointZero, m_windowTransform );
|
||||||
HIShapeOffset( mutableShape, transformedOrigin.x, transformedOrigin.y );
|
HIShapeOffset( mutableShape, transformedOrigin.x, transformedOrigin.y );
|
||||||
|
Reference in New Issue
Block a user