regionband.cxx (daf45454) regionband.cxx (86e1cf34)
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

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

783 }
784
785 // both boundaries inserted? -> nothing more to do
786 if ( bTopBoundaryInserted && bTop2BoundaryInserted && bBottomBoundaryInserted )
787 {
788 break;
789 }
790
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

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

783 }
784
785 // both boundaries inserted? -> nothing more to do
786 if ( bTopBoundaryInserted && bTop2BoundaryInserted && bBottomBoundaryInserted )
787 {
788 break;
789 }
790
791 // insert bands between two bands if neccessary
791 // insert bands between two bands if necessary
792 if ( pBand->mpNextBand )
793 {
794 if ( (pBand->mnYBottom + 1) < pBand->mpNextBand->mnYTop )
795 {
796 // copy band with list and set new boundary
797 pNewBand = new ImplRegionBand( pBand->mnYBottom+1, pBand->mpNextBand->mnYTop-1 );
798
799 // insert band into the list

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

972
973void RegionBand::Union(const RegionBand& rSource)
974{
975 // apply all rectangles from rSource to this
976 ImplRegionBand* pBand = rSource.mpFirstBand;
977
978 while ( pBand )
979 {
792 if ( pBand->mpNextBand )
793 {
794 if ( (pBand->mnYBottom + 1) < pBand->mpNextBand->mnYTop )
795 {
796 // copy band with list and set new boundary
797 pNewBand = new ImplRegionBand( pBand->mnYBottom+1, pBand->mpNextBand->mnYTop-1 );
798
799 // insert band into the list

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

972
973void RegionBand::Union(const RegionBand& rSource)
974{
975 // apply all rectangles from rSource to this
976 ImplRegionBand* pBand = rSource.mpFirstBand;
977
978 while ( pBand )
979 {
980 // insert bands if the boundaries are not allready in the list
980 // insert bands if the boundaries are not already in the list
981 InsertBands(pBand->mnYTop, pBand->mnYBottom);
982
983 // process all elements of the list
984 ImplRegionBandSep* pSep = pBand->mpFirstSep;
985
986 while(pSep)
987 {
988 Union(pSep->mnXLeft, pBand->mnYTop, pSep->mnXRight, pBand->mnYBottom);

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

1089 pBand->mbTouched = false;
1090 pBand = pBand->mpNextBand;
1091 }
1092
1093 pBand = rSource.mpFirstBand;
1094
1095 while ( pBand )
1096 {
981 InsertBands(pBand->mnYTop, pBand->mnYBottom);
982
983 // process all elements of the list
984 ImplRegionBandSep* pSep = pBand->mpFirstSep;
985
986 while(pSep)
987 {
988 Union(pSep->mnXLeft, pBand->mnYTop, pSep->mnXRight, pBand->mnYBottom);

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

1089 pBand->mbTouched = false;
1090 pBand = pBand->mpNextBand;
1091 }
1092
1093 pBand = rSource.mpFirstBand;
1094
1095 while ( pBand )
1096 {
1097 // insert bands if the boundaries are not allready in the list
1097 // insert bands if the boundaries are not already in the list
1098 InsertBands( pBand->mnYTop, pBand->mnYBottom );
1099
1100 // process all elements of the list
1101 ImplRegionBandSep* pSep = pBand->mpFirstSep;
1102
1103 while ( pSep )
1104 {
1105 // left boundary?

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

1122 }
1123
1124 pSep = pSep->mpNextSep;
1125 }
1126
1127 pBand = pBand->mpNextBand;
1128 }
1129
1098 InsertBands( pBand->mnYTop, pBand->mnYBottom );
1099
1100 // process all elements of the list
1101 ImplRegionBandSep* pSep = pBand->mpFirstSep;
1102
1103 while ( pSep )
1104 {
1105 // left boundary?

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

1122 }
1123
1124 pSep = pSep->mpNextSep;
1125 }
1126
1127 pBand = pBand->mpNextBand;
1128 }
1129
1130 // remove all untouched bands if bands allready left
1130 // remove all untouched bands if bands already left
1131 ImplRegionBand* pPrevBand = 0;
1132 pBand = mpFirstBand;
1133
1134 while ( pBand )
1135 {
1136 if ( !pBand->mbTouched )
1137 {
1138 // save pointer

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

1163
1164bool RegionBand::Exclude(const RegionBand& rSource)
1165{
1166 // Alle Rechtecke aus der uebergebenen Region auf diese Region anwenden
1167 ImplRegionBand* pBand = rSource.mpFirstBand;
1168
1169 while ( pBand )
1170 {
1131 ImplRegionBand* pPrevBand = 0;
1132 pBand = mpFirstBand;
1133
1134 while ( pBand )
1135 {
1136 if ( !pBand->mbTouched )
1137 {
1138 // save pointer

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

1163
1164bool RegionBand::Exclude(const RegionBand& rSource)
1165{
1166 // Alle Rechtecke aus der uebergebenen Region auf diese Region anwenden
1167 ImplRegionBand* pBand = rSource.mpFirstBand;
1168
1169 while ( pBand )
1170 {
1171 // insert bands if the boundaries are not allready in the list
1171 // insert bands if the boundaries are not already in the list
1172 InsertBands( pBand->mnYTop, pBand->mnYBottom );
1173
1174 // process all elements of the list
1175 ImplRegionBandSep* pSep = pBand->mpFirstSep;
1176
1177 while ( pSep )
1178 {
1179 Exclude( pSep->mnXLeft, pBand->mnYTop, pSep->mnXRight, pBand->mnYBottom );

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

1220}
1221
1222void RegionBand::XOr(const RegionBand& rSource)
1223{
1224 ImplRegionBand* pBand = rSource.mpFirstBand;
1225
1226 while ( pBand )
1227 {
1172 InsertBands( pBand->mnYTop, pBand->mnYBottom );
1173
1174 // process all elements of the list
1175 ImplRegionBandSep* pSep = pBand->mpFirstSep;
1176
1177 while ( pSep )
1178 {
1179 Exclude( pSep->mnXLeft, pBand->mnYTop, pSep->mnXRight, pBand->mnYBottom );

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

1220}
1221
1222void RegionBand::XOr(const RegionBand& rSource)
1223{
1224 ImplRegionBand* pBand = rSource.mpFirstBand;
1225
1226 while ( pBand )
1227 {
1228 // insert bands if the boundaries are not allready in the list
1228 // insert bands if the boundaries are not already in the list
1229 InsertBands( pBand->mnYTop, pBand->mnYBottom );
1230
1231 // process all elements of the list
1232 ImplRegionBandSep* pSep = pBand->mpFirstSep;
1233
1234 while ( pSep )
1235 {
1236 XOr( pSep->mnXLeft, pBand->mnYTop, pSep->mnXRight, pBand->mnYBottom );

--- 148 unchanged lines hidden ---
1229 InsertBands( pBand->mnYTop, pBand->mnYBottom );
1230
1231 // process all elements of the list
1232 ImplRegionBandSep* pSep = pBand->mpFirstSep;
1233
1234 while ( pSep )
1235 {
1236 XOr( pSep->mnXLeft, pBand->mnYTop, pSep->mnXRight, pBand->mnYBottom );

--- 148 unchanged lines hidden ---