extensions.st
changeset 4139 6dffe5499f3b
parent 4089 a64828e69680
equal deleted inserted replaced
4138:6300b7e324a4 4139:6dffe5499f3b
    13      'image/gif' asMimeType isImage
    13      'image/gif' asMimeType isImage
    14      'image/gif' asMimeType asMimeType
    14      'image/gif' asMimeType asMimeType
    15     "
    15     "
    16 ! !
    16 ! !
    17 
    17 
       
    18 !Point methodsFor:'converting'!
       
    19 
       
    20 asFractionalLayout
       
    21     "return a LayoutOrigin from the receiver,
       
    22      treating the receiver coordinates as fractional parts
       
    23      (i.e. relative to superview).
       
    24      Notice: in 10.5.x LayoutOrigin is not yet officially released."
       
    25 
       
    26     ^ LayoutOrigin fractionalFromPoint:self
       
    27 
       
    28     "
       
    29      (0@0.5) asFractionalLayout
       
    30      (0@0.5) asLayout
       
    31      (0@10) asLayout
       
    32      (0@10) asOffsetLayout
       
    33     "
       
    34 
       
    35 ! !
       
    36 
       
    37 !Point methodsFor:'converting'!
       
    38 
       
    39 asLayout
       
    40     "return a LayoutOrigin from the receiver.
       
    41      If the receiver coordinates are between 0 and 1, take
       
    42      them as fractional parts (relative to superview).
       
    43      Otherwise, treat them as absolute offsets.
       
    44      Notice: in 10.5.x LayoutOrigin is not yet released."
       
    45 
       
    46     ^ LayoutOrigin fromPoint:self
       
    47 
       
    48     "
       
    49      (0@0.5) asFractionalLayout
       
    50      (0@0.5) asLayout
       
    51      (0@10) asLayout
       
    52      (0@10) asOffsetLayout
       
    53     "
       
    54 
       
    55 ! !
       
    56 
       
    57 !Point methodsFor:'converting'!
       
    58 
       
    59 asOffsetLayout
       
    60     "return a LayoutOrigin from the receiver,
       
    61      treating the receiver coordinates as absolute offsets.
       
    62      Notice: in 10.5.x LayoutOrigin is not yet released."
       
    63 
       
    64     ^ LayoutOrigin offsetFromPoint:self
       
    65 
       
    66     "
       
    67      (0@0.5) asFractionalLayout
       
    68      (0@0.5) asLayout
       
    69      (0@10) asLayout
       
    70      (0@10) asOffsetLayout
       
    71     "
       
    72 
       
    73 ! !
       
    74 
    18 !stx_libview2 class methodsFor:'documentation'!
    75 !stx_libview2 class methodsFor:'documentation'!
    19 
    76 
    20 extensionsVersion_CVS
    77 extensionsVersion_CVS
    21     ^ '$Header$'
    78     ^ '$Header$'
    22 ! !
    79 ! !