First implementation of to_bytes/from_bytes for Vector,Point,Box,Polygon,SimplePolygon,Trans,CplxTrans,Text,Path,Edge,EdgePair and variants

This commit is contained in:
Matthias Koefferlein
2026-05-02 23:21:35 +02:00
parent 5ccf6260f1
commit fdaa93d234
28 changed files with 1658 additions and 36 deletions
+2
View File
@@ -34,6 +34,7 @@ class DBVector_TestClass < TestBase
assert_equal( a.to_s, "1,-17" )
assert_equal( RBA::DVector::from_s(a.to_s).to_s, a.to_s )
assert_equal( RBA::DVector::from_bytes(a.to_bytes).to_s, a.to_s )
assert_equal( (-a).to_s, "-1,17" )
assert_equal( b.to_s, "0,0" )
assert_equal( c.to_s, "5,11" )
@@ -88,6 +89,7 @@ class DBVector_TestClass < TestBase
assert_equal( a.to_s, "1,-17" )
assert_equal( RBA::Vector::from_s(a.to_s).to_s, a.to_s )
assert_equal( RBA::Vector::from_bytes(a.to_bytes).to_s, a.to_s )
assert_equal( (-a).to_s, "-1,17" )
assert_equal( b.to_s, "0,0" )
assert_equal( c.to_s, "5,11" )