| 136 | } |
| 137 | |
| 138 | bool parse_mouse_path(const std::wstring &path_text, std::vector<POINT> &path) { |
| 139 | path.clear(); |
| 140 | size_t start = 0; |
| 141 | while (start <= path_text.size()) { |
| 142 | const size_t end = path_text.find(L'|', start); |
| 143 | const std::wstring item = path_text.substr(start, end == std::wstring::npos ? std::wstring::npos : end - start); |
| 144 | POINT pt{}; |
| 145 | if (!parse_path_point(item, pt)) |
| 146 | return false; |
| 147 | path.push_back(pt); |
| 148 | if (end == std::wstring::npos) |
| 149 | break; |
| 150 | start = end + 1; |
| 151 | } |
| 152 | return path.size() >= 2; |
| 153 | } |
| 154 | |
| 155 | std::vector<POINT> expand_mouse_path(const std::vector<POINT> &key_points) { |
| 156 | if (key_points.empty()) |