deprecate SCViewHolder-layRight
[supercollider.git] / SCClassLibrary / Common / Geometry / Size.sc
blob8bb077a34e38d081c3f402bc1bc82e359440fce6
1 Size {
2         var <>width = 0, <>height = 0;
4         *new { arg width=0, height=0;
5                 ^super.newCopyArgs(width, height);
6         }
8         asSize { ^this }
10         asRect { ^Rect(0,0,width,height); }
12         asPoint { ^Point(width,height); }
14         asString {
15                 ^("Size(" ++ width ++ ", " ++ height ++ ")");
16         }
18         == { arg other;
19                 ^ other respondsTo: #[\width, \height] and: {
20                         (other.width == width) && (other.height == height)
21                 }
22         }