| 1371 | } |
| 1372 | |
| 1373 | void Sprite::setStretchEnabled(bool enabled) |
| 1374 | { |
| 1375 | if (_stretchEnabled != enabled) |
| 1376 | { |
| 1377 | _stretchEnabled = enabled; |
| 1378 | |
| 1379 | // disabled centerrect / number of slices if disabled |
| 1380 | if (!enabled) |
| 1381 | setCenterRectNormalized(Rect(0, 0, 1, 1)); |
| 1382 | |
| 1383 | updateStretchFactor(); |
| 1384 | updatePoly(); |
| 1385 | } |
| 1386 | } |
| 1387 | |
| 1388 | bool Sprite::isStretchEnabled() const |
| 1389 | { |