diff -r 85e585250a3c -r 239ee311afeb Point.st --- a/Point.st Fri Jun 29 17:15:48 2018 +0200 +++ b/Point.st Fri Jun 29 18:00:24 2018 +0200 @@ -455,21 +455,12 @@ "Modified: / 9.7.1998 / 10:21:10 / cg" ! -asFractionalLayout - "return a LayoutOrigin from the receiver, - treating the receiver coordinates as fractional parts - (i.e. relative to superview). - Notice: in 10.5.x LayoutOrigin is not yet officially released." - - ^ LayoutOrigin fractionalFromPoint:self +asFloat + ^ self shouldNotImplement +! - " - (0@0.5) asFractionalLayout - (0@0.5) asLayout - (0@10) asLayout - (0@10) asOffsetLayout - " - +asFraction + ^ self shouldNotImplement ! asIntegerPoint @@ -477,40 +468,6 @@ ^ x asInteger @ y asInteger ! -asLayout - "return a LayoutOrigin from the receiver. - If the receiver coordinates are between 0 and 1, take - them as fractional parts (relative to superview). - Otherwise, treat them as absolute offsets. - Notice: in 10.5.x LayoutOrigin is not yet released." - - ^ LayoutOrigin fromPoint:self - - " - (0@0.5) asFractionalLayout - (0@0.5) asLayout - (0@10) asLayout - (0@10) asOffsetLayout - " - -! - -asOffsetLayout - "return a LayoutOrigin from the receiver, - treating the receiver coordinates as absolute offsets. - Notice: in 10.5.x LayoutOrigin is not yet released." - - ^ LayoutOrigin offsetFromPoint:self - - " - (0@0.5) asFractionalLayout - (0@0.5) asLayout - (0@10) asLayout - (0@10) asOffsetLayout - " - -! - asPoint "return the receiver as Point - this is the receiver" @@ -631,21 +588,21 @@ |offsetPoint| (anOffset isMemberOf:Point) ifTrue:[ "type hint to stc" - x := x + anOffset x. - y := y + anOffset y. - ^ self + x := x + anOffset x. + y := y + anOffset y. + ^ self ]. anOffset isNumber ifTrue:[ - x := x + anOffset. - y := y + anOffset. - ^ self + x := x + anOffset. + y := y + anOffset. + ^ self ]. "this is the general (& clean) code ..." offsetPoint := anOffset asPoint. - x := x + anOffset x. - y := y + anOffset y + x := x + offsetPoint x. + y := y + offsetPoint y ! !