gdimtf.cxx (fdbfc3c2) gdimtf.cxx (e6f63103)
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

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

1379 pAct->GetLink(), aEPSMtf ) );
1380 }
1381 break;
1382
1383 case( META_CLIPREGION_ACTION ):
1384 {
1385 MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
1386
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

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

1379 pAct->GetLink(), aEPSMtf ) );
1380 }
1381 break;
1382
1383 case( META_CLIPREGION_ACTION ):
1384 {
1385 MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
1386
1387 if( pAct->IsClipping() && pAct->GetRegion().HasPolyPolygon() )
1388 aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), sal_True ) );
1387 if( pAct->IsClipping() && pAct->GetRegion().HasPolyPolygonOrB2DPolyPolygon() )
1388 aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), sal_True ) );
1389 else
1390 {
1391 pAction->Duplicate();
1392 aMtf.AddAction( pAction );
1393 }
1394 }
1395 break;
1396

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

1401 }
1402 break;
1403
1404 case( META_ISECTREGIONCLIPREGION_ACTION ):
1405 {
1406 MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction;
1407 const Region& rRegion = pAct->GetRegion();
1408
1389 else
1390 {
1391 pAction->Duplicate();
1392 aMtf.AddAction( pAction );
1393 }
1394 }
1395 break;
1396

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

1401 }
1402 break;
1403
1404 case( META_ISECTREGIONCLIPREGION_ACTION ):
1405 {
1406 MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction;
1407 const Region& rRegion = pAct->GetRegion();
1408
1409 if( rRegion.HasPolyPolygon() )
1410 aMtf.AddAction( new MetaISectRegionClipRegionAction( Region( ImplGetRotatedPolyPolygon( rRegion.GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ) ) );
1409 if( rRegion.HasPolyPolygonOrB2DPolyPolygon() )
1410 aMtf.AddAction( new MetaISectRegionClipRegionAction( Region( ImplGetRotatedPolyPolygon( rRegion.GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ) ) );
1411 else
1412 {
1413 pAction->Duplicate();
1414 aMtf.AddAction( pAction );
1415 }
1416 }
1417 break;
1418

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

2739 }
2740 break;
2741
2742 case META_CLIPREGION_ACTION :
2743 {
2744 MetaClipRegionAction* pAct = dynamic_cast< MetaClipRegionAction* >(pAction);
2745 const Region& rRegion = pAct->GetRegion();
2746
1411 else
1412 {
1413 pAction->Duplicate();
1414 aMtf.AddAction( pAction );
1415 }
1416 }
1417 break;
1418

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

2739 }
2740 break;
2741
2742 case META_CLIPREGION_ACTION :
2743 {
2744 MetaClipRegionAction* pAct = dynamic_cast< MetaClipRegionAction* >(pAction);
2745 const Region& rRegion = pAct->GetRegion();
2746
2747 if(rRegion.HasPolyPolygon())
2747 if(rRegion.HasPolyPolygonOrB2DPolyPolygon())
2748 {
2749 // It has shown that this is a possible bottleneck for checksum calculation.
2750 // In worst case a very expensive RegionHandle representation gets created.
2751 // In this case it's cheaper to use the PolyPolygon
2748 {
2749 // It has shown that this is a possible bottleneck for checksum calculation.
2750 // In worst case a very expensive RegionHandle representation gets created.
2751 // In this case it's cheaper to use the PolyPolygon
2752 const basegfx::B2DPolyPolygon aPolyPolygon(rRegion.GetB2DPolyPolygon());
2752 const basegfx::B2DPolyPolygon aPolyPolygon(rRegion.GetAsB2DPolyPolygon());
2753 const sal_uInt32 nPolyCount(aPolyPolygon.count());
2754 SVBT64 aSVBT64;
2755
2756 for(sal_uInt32 a(0); a < nPolyCount; a++)
2757 {
2758 const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(a));
2759 const sal_uInt32 nPointCount(aPolygon.count());
2760 const bool bControl(aPolygon.areControlPointsUsed());

--- 378 unchanged lines hidden ---
2753 const sal_uInt32 nPolyCount(aPolyPolygon.count());
2754 SVBT64 aSVBT64;
2755
2756 for(sal_uInt32 a(0); a < nPolyCount; a++)
2757 {
2758 const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(a));
2759 const sal_uInt32 nPointCount(aPolygon.count());
2760 const bool bControl(aPolygon.areControlPointsUsed());

--- 378 unchanged lines hidden ---