mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-22 14:07:15 +02:00
Merge pull request #1443 from KLayout/issue-1441
Fixed issue #1441 (RDB support for text attributes like size, font, h…
This commit is contained in:
Vendored
+2
-2
@@ -1102,7 +1102,7 @@ class DBShapes_TestClass < TestBase
|
||||
|
||||
arr = []
|
||||
shapes.each( RBA::Shapes::SAll ) { |s| arr.push( s.to_s ) }
|
||||
assert_equal( arr, ["edge (1,2;3,4)", "text ('text',r0 100,200)", "text ('blabla',m0 100,200) prop_id=1"] )
|
||||
assert_equal( arr, ["edge (1,2;3,4)", "text ('text',r0 100,200)", "text ('blabla',m0 100,200) f=3 ha=c va=b prop_id=1"] )
|
||||
|
||||
assert_equal( s1.is_valid?, true )
|
||||
assert_equal( s1.shapes.is_valid?(s1), true )
|
||||
@@ -1316,7 +1316,7 @@ class DBShapes_TestClass < TestBase
|
||||
|
||||
arr = []
|
||||
shapes.each( RBA::Shapes::SAll ) { |s| arr.push( s.to_s ) }
|
||||
assert_equal( arr, ["edge (1,2;3,4)", "text ('text',r0 100,200)", "text ('blabla',m0 100,200) prop_id=1"] )
|
||||
assert_equal( arr, ["edge (1,2;3,4)", "text ('text',r0 100,200)", "text ('blabla',m0 100,200) f=3 ha=c va=b prop_id=1"] )
|
||||
|
||||
assert_equal( s1.is_valid?, true )
|
||||
assert_equal( s1.shapes.is_valid?(s1), true )
|
||||
|
||||
Vendored
+10
-10
@@ -102,20 +102,20 @@ class DBText_TestClass < TestBase
|
||||
|
||||
b = a.dup
|
||||
|
||||
assert_equal( a.moved( RBA::DPoint::new( 0, 1 ) ).to_s, "('hallo',m45 5,8)" )
|
||||
assert_equal( a.moved( RBA::DPoint::new( 0, 1 ) ).to_s, "('hallo',m45 5,8) s=23 f=8 ha=r va=b" )
|
||||
a.move( RBA::DPoint::new( 1, 0 ) )
|
||||
assert_equal( a.to_s, "('hallo',m45 6,7)" )
|
||||
assert_equal( a.to_s, "('hallo',m45 6,7) s=23 f=8 ha=r va=b" )
|
||||
|
||||
b = b.transformed( RBA::DTrans::new( RBA::DTrans::R0, RBA::DPoint::new( 1, 0 )) )
|
||||
assert_equal( b.to_s, "('hallo',m45 6,7)" )
|
||||
assert_equal( b.to_s, "('hallo',m45 6,7) s=23 f=8 ha=r va=b" )
|
||||
|
||||
m = RBA::DCplxTrans::new( RBA::DTrans::new, 1.5 )
|
||||
assert_equal( a.transformed(m).class.to_s, "RBA::DText" )
|
||||
assert_equal( a.transformed(m).to_s, "('hallo',m45 9,10.5)" )
|
||||
assert_equal( a.transformed(m).to_s, "('hallo',m45 9,10.5) s=34.5 f=8 ha=r va=b" )
|
||||
|
||||
m = RBA::VCplxTrans::new( 1000.0 )
|
||||
assert_equal( a.transformed(m).class.to_s, "RBA::Text" )
|
||||
assert_equal( a.transformed(m).to_s, "('hallo',m45 6000,7000)" )
|
||||
assert_equal( a.transformed(m).to_s, "('hallo',m45 6000,7000) s=23000 f=8 ha=r va=b" )
|
||||
|
||||
end
|
||||
|
||||
@@ -196,16 +196,16 @@ class DBText_TestClass < TestBase
|
||||
|
||||
b = a.dup
|
||||
|
||||
assert_equal( a.moved( RBA::Point::new( 0, 1 ) ).to_s, "('hallo',m45 5,8)" )
|
||||
assert_equal( a.moved( RBA::Point::new( 0, 1 ) ).to_s, "('hallo',m45 5,8) s=23 f=8 ha=l va=t" )
|
||||
a.move( RBA::Point::new( 1, 0 ) )
|
||||
assert_equal( a.to_s, "('hallo',m45 6,7)" )
|
||||
assert_equal( a.to_s, "('hallo',m45 6,7) s=23 f=8 ha=l va=t" )
|
||||
|
||||
b = b.transformed( RBA::Trans::new( RBA::Trans::R0, RBA::Point::new( 1, 0 )) )
|
||||
assert_equal( b.to_s, "('hallo',m45 6,7)" )
|
||||
assert_equal( b.to_s, "('hallo',m45 6,7) s=23 f=8 ha=l va=t" )
|
||||
|
||||
m = RBA::CplxTrans::new( RBA::Trans::new, 1.5 )
|
||||
assert_equal( a.transformed(m).to_s, "('hallo',m45 9,10.5)" )
|
||||
assert_equal( a.transformed(RBA::ICplxTrans::new(m)).to_s, "('hallo',m45 9,11)" )
|
||||
assert_equal( a.transformed(m).to_s, "('hallo',m45 9,10.5) s=34.5 f=8 ha=l va=t" )
|
||||
assert_equal( a.transformed(RBA::ICplxTrans::new(m)).to_s, "('hallo',m45 9,11) s=35 f=8 ha=l va=t" )
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user