| 1267 | } |
| 1268 | |
| 1269 | ofVec2f CodeEntry::GetLinePos(int lineNum, bool end, bool published /*= true*/) |
| 1270 | { |
| 1271 | float x = mX - mScroll.x; |
| 1272 | float y = lineNum * mCharHeight + mY - mScroll.y; |
| 1273 | |
| 1274 | if (end) |
| 1275 | { |
| 1276 | std::string str = published ? mPublishedString : mString; |
| 1277 | auto lines = ofSplitString(str, "\n"); |
| 1278 | if (lineNum < (int)lines.size()) |
| 1279 | x += lines[lineNum].length() * mCharWidth; |
| 1280 | } |
| 1281 | |
| 1282 | return ofVec2f(x, y); |
| 1283 | } |
| 1284 | |
| 1285 | ofVec2f CodeEntry::GetCaretCoords(int caret) |
| 1286 | { |
no test coverage detected