PIRect complete

This commit is contained in:
Andrey
2022-03-21 10:35:34 +03:00
parent 2596b119ac
commit 3dd0d0b6cf
7 changed files with 160 additions and 57 deletions

View File

@@ -619,6 +619,16 @@ PIRectd PIVariant::toRect() const {
}
/** @brief Returns variant content as rect
* \details In case of PILined type returns line value. \n
* In case of other types returns empty PILined. */
PILined PIVariant::toLine() const {
PIByteArray ba(_content);
if (_type == PIVariant::pivLine) {PILined r; ba >> r; return r;}
return PILined();
}
/** @brief Returns variant content as math vector
* \details In case of PIMathVectord type returns rect value. \n
* In case of other types returns empty PIMathVectord. */