Rectangle.st
changeset 17239 6f71da3ffaea
parent 17238 94b805b727cf
child 17240 9e36e4384637
equal deleted inserted replaced
17238:94b805b727cf 17239:6f71da3ffaea
   390 
   390 
   391 corner
   391 corner
   392     "return the corner"
   392     "return the corner"
   393 
   393 
   394 %{  /* NOCONTEXT */
   394 %{  /* NOCONTEXT */
   395     OBJ _left = __INST(left);
   395     if (self == @global(Rectangle)) {
   396     OBJ _top = __INST(top);
   396         OBJ _left = __INST(left);
   397     OBJ _width = __INST(width);
   397         OBJ _top = __INST(top);
   398     OBJ _height = __INST(height);
   398         OBJ _width = __INST(width);
   399 
   399         OBJ _height = __INST(height);
   400     if (__bothSmallInteger(_left, _top)
   400 
   401      && __bothSmallInteger(_width, _height)) {
   401         if (__bothSmallInteger(_left, _top)
   402         if (self == @global(Rectangle)) {
   402          && __bothSmallInteger(_width, _height)) {
   403             if (__CanDoQuickNew(sizeof(struct __Point))) {      /* OBJECT ALLOCATION */
   403             if (__CanDoQuickNew(sizeof(struct __Point))) {      /* OBJECT ALLOCATION */
   404                 OBJ newPoint;
   404                 OBJ newPoint;
   405                 int spc;
   405                 int spc;
   406                 int cX = __intVal(_left) + __intVal(_width);
   406                 int cX = __intVal(_left) + __intVal(_width);
   407                 int cY = __intVal(_top) + __intVal(_height);
   407                 int cY = __intVal(_top) + __intVal(_height);
  1894 ! !
  1894 ! !
  1895 
  1895 
  1896 !Rectangle class methodsFor:'documentation'!
  1896 !Rectangle class methodsFor:'documentation'!
  1897 
  1897 
  1898 version
  1898 version
  1899     ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.88 2014-12-21 20:15:53 cg Exp $'
  1899     ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.89 2014-12-21 22:40:14 cg Exp $'
  1900 !
  1900 !
  1901 
  1901 
  1902 version_CVS
  1902 version_CVS
  1903     ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.88 2014-12-21 20:15:53 cg Exp $'
  1903     ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.89 2014-12-21 22:40:14 cg Exp $'
  1904 ! !
  1904 ! !
  1905 
  1905