--- a/extensions.st Fri Jun 29 17:59:07 2018 +0200
+++ b/extensions.st Fri Jun 29 17:59:59 2018 +0200
@@ -15,6 +15,63 @@
"
! !
+!Point methodsFor:'converting'!
+
+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
+
+ "
+ (0@0.5) asFractionalLayout
+ (0@0.5) asLayout
+ (0@10) asLayout
+ (0@10) asOffsetLayout
+ "
+
+! !
+
+!Point methodsFor:'converting'!
+
+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
+ "
+
+! !
+
+!Point methodsFor:'converting'!
+
+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
+ "
+
+! !
+
!stx_libview2 class methodsFor:'documentation'!
extensionsVersion_CVS