Changeset 73194 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.cpp
- Timestamp:
- Jul 18, 2018 7:14:24 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123797
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-shared.cpp
r69852 r73194 1190 1190 pBox->d = pSize->depth - pBox->z; 1191 1191 } 1192 1193 /** Clip. 1194 * 1195 * @param pBound Bounding rectangle. 1196 * @param pRect Rectangle to be clipped. 1197 */ 1198 void vmsvgaClipRect(SVGASignedRect const *pBound, 1199 SVGASignedRect *pRect) 1200 { 1201 int32_t left; 1202 int32_t top; 1203 int32_t right; 1204 int32_t bottom; 1205 1206 /* Right order. */ 1207 Assert(pBound->left <= pBound->right && pBound->top <= pBound->bottom); 1208 if (pRect->left < pRect->right) 1209 { 1210 left = pRect->left; 1211 right = pRect->right; 1212 } 1213 else 1214 { 1215 left = pRect->right; 1216 right = pRect->left; 1217 } 1218 if (pRect->top < pRect->bottom) 1219 { 1220 top = pRect->top; 1221 bottom = pRect->bottom; 1222 } 1223 else 1224 { 1225 top = pRect->bottom; 1226 bottom = pRect->top; 1227 } 1228 1229 if (left < pBound->left) 1230 left = pBound->left; 1231 if (right < pBound->left) 1232 right = pBound->left; 1233 1234 if (left > pBound->right) 1235 left = pBound->right; 1236 if (right > pBound->right) 1237 right = pBound->right; 1238 1239 if (top < pBound->top) 1240 top = pBound->top; 1241 if (bottom < pBound->top) 1242 bottom = pBound->top; 1243 1244 if (top > pBound->bottom) 1245 top = pBound->bottom; 1246 if (bottom > pBound->bottom) 1247 bottom = pBound->bottom; 1248 1249 pRect->left = left; 1250 pRect->right = right; 1251 pRect->top = top; 1252 pRect->bottom = bottom; 1253 }
Note:
See TracChangeset
for help on using the changeset viewer.