| 528 | } |
| 529 | |
| 530 | void scaleTexture(const Vector2& scale) |
| 531 | { |
| 532 | std::string command("scaleTexture: "); |
| 533 | command += "sScale=" + string::to_string(scale[0]) + ", tScale=" + string::to_string(scale[1]); |
| 534 | |
| 535 | UndoableCommand undo(command); |
| 536 | |
| 537 | // Prepare the 1.0-based scale value (incoming values are relative to 0) |
| 538 | Vector2 patchScale = scale + Vector2(1, 1); |
| 539 | |
| 540 | // Flip every node about its own center point |
| 541 | GlobalSelectionSystem().foreachFace([&](IFace& face) { TextureScaler::ScaleFace(face, patchScale); }); |
| 542 | GlobalSelectionSystem().foreachPatch([&](IPatch& patch) { TextureScaler::ScalePatch(patch, patchScale); }); |
| 543 | } |
| 544 | |
| 545 | void rotateTexture(const float angle) |
| 546 | { |
no test coverage detected