| 489 | } |
| 490 | |
| 491 | std::string VisualToolBase::GetLineVectorClip(AssDialogue *diag, int &scale, bool &inverse) { |
| 492 | auto blocks = diag->ParseTags(); |
| 493 | |
| 494 | scale = 1; |
| 495 | inverse = false; |
| 496 | |
| 497 | param_vec tag = find_tag(blocks, "\\iclip"); |
| 498 | if (tag) |
| 499 | inverse = true; |
| 500 | else |
| 501 | tag = find_tag(blocks, "\\clip"); |
| 502 | |
| 503 | if (tag && tag->size() == 4) { |
| 504 | return agi::format("m %d %d l %d %d %d %d %d %d" |
| 505 | , (*tag)[0].Get<int>(), (*tag)[1].Get<int>() |
| 506 | , (*tag)[2].Get<int>(), (*tag)[1].Get<int>() |
| 507 | , (*tag)[2].Get<int>(), (*tag)[3].Get<int>() |
| 508 | , (*tag)[0].Get<int>(), (*tag)[3].Get<int>()); |
| 509 | } |
| 510 | if (tag) { |
| 511 | scale = std::max((*tag)[0].Get(scale), 1); |
| 512 | return (*tag)[1].Get<std::string>(""); |
| 513 | } |
| 514 | |
| 515 | return ""; |
| 516 | } |
| 517 | |
| 518 | void VisualToolBase::SetSelectedOverride(std::string const& tag, std::string const& value) { |
| 519 | for (auto line : c->selectionController->GetSelectedSet()) |