------------------------------------------------------------------------------
| 102 | |
| 103 | //------------------------------------------------------------------------------ |
| 104 | void vtkPixelExtent::Split( |
| 105 | int i1, int j1, const vtkPixelExtent& ext, deque<vtkPixelExtent>& newExts) |
| 106 | { |
| 107 | // cell is inside, split results in as many as |
| 108 | // 4 new extents. check for each one. |
| 109 | int i0 = i1 - 1; |
| 110 | int j0 = j1 - 1; |
| 111 | |
| 112 | int outside = 1; |
| 113 | |
| 114 | // lower left |
| 115 | if (ext.Contains(i0, j0)) |
| 116 | { |
| 117 | newExts.emplace_back(ext[0], i0, ext[2], j0); |
| 118 | outside = 0; |
| 119 | } |
| 120 | // lower right |
| 121 | if (ext.Contains(i1, j0)) |
| 122 | { |
| 123 | newExts.emplace_back(i1, ext[1], ext[2], j0); |
| 124 | outside = 0; |
| 125 | } |
| 126 | // upper left |
| 127 | if (ext.Contains(i0, j1)) |
| 128 | { |
| 129 | newExts.emplace_back(ext[0], i0, j1, ext[3]); |
| 130 | outside = 0; |
| 131 | } |
| 132 | // upper right |
| 133 | if (ext.Contains(i1, j1)) |
| 134 | { |
| 135 | newExts.emplace_back(i1, ext[1], j1, ext[3]); |
| 136 | outside = 0; |
| 137 | } |
| 138 | |
| 139 | // split cell is outside, pass through |
| 140 | if (outside) |
| 141 | { |
| 142 | newExts.push_back(ext); |
| 143 | return; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | //------------------------------------------------------------------------------ |
| 148 | void vtkPixelExtent::Subtract( |
nothing calls this directly
no test coverage detected