Image.st
changeset 7640 25640118d11f
parent 7637 a809c69a2cf4
child 7659 01fe20eef85d
equal deleted inserted replaced
7639:78da2ec0985d 7640:25640118d11f
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 1991 by Claus Gittinger
     2  COPYRIGHT (c) 1991 by Claus Gittinger
     5               All Rights Reserved
     3               All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
 14980     ].
 14978     ].
 14981 
 14979 
 14982     isLeft := leftOrRight sameAs:#left.
 14980     isLeft := leftOrRight sameAs:#left.
 14983     isLeft ifTrue:[
 14981     isLeft ifTrue:[
 14984         workPoint := (xRun - 1)@yRun.
 14982         workPoint := (xRun - 1)@yRun.
 14985         [(
 14983         [
 14986             (tempForm pixelAtX:workPoint x y:workPoint y) == 0 and:[
 14984             ((tempForm pixelAtX:workPoint x y:workPoint y) == 0)
 14987             (tempForm pixelAtX:workPoint x y:workPoint y + additionalY) == 1]) and:[
 14985             and:[ ((tempForm pixelAtX:workPoint x y:workPoint y + additionalY) == 1) 
 14988             (tempForm pixelAtX:workPoint x - 1 y:workPoint y + additionalY) == 1]
 14986             and:[ ((tempForm pixelAtX:workPoint x - 1 y:workPoint y + additionalY) == 1) ]]
 14989         ] whileTrue:[
 14987         ] whileTrue:[
 14990             startX := workPoint x.
 14988             startX := workPoint x.
 14991             endX isNil ifTrue:[endX := workPoint x].
 14989             endX isNil ifTrue:[endX := workPoint x].
 14992             workPoint := (workPoint x - 1)@yRun.
 14990             workPoint := (workPoint x - 1)@yRun.
 14993         ].
 14991         ].
 14994     ] ifFalse:[
 14992     ] ifFalse:[
 14995         workPoint := (xRun + 1)@yRun.
 14993         workPoint := (xRun + 1)@yRun.
 14996         [(
 14994         [
 14997             (tempForm pixelAtX:workPoint x y:workPoint y) == 0 and:[
 14995             ((tempForm pixelAtX:workPoint x y:workPoint y) == 0)
 14998             (tempForm pixelAtX:workPoint x y:workPoint y + additionalY) == 1]) and:[
 14996             and:[ ((tempForm pixelAtX:workPoint x y:workPoint y + additionalY) == 1) 
 14999             (tempForm pixelAtX:workPoint x + 1 y:workPoint y + additionalY) == 1]
 14997             and:[ ((tempForm pixelAtX:workPoint x + 1 y:workPoint y + additionalY) == 1) ]]
 15000         ] whileTrue:[
 14998         ] whileTrue:[
 15001             endX := workPoint x.
 14999             endX := workPoint x.
 15002             startX isNil ifTrue:[startX := workPoint x].
 15000             startX isNil ifTrue:[startX := workPoint x].
 15003             workPoint := (workPoint x + 1)@yRun.
 15001             workPoint := (workPoint x + 1)@yRun.
 15004         ].
 15002         ].
 15051     ].
 15049     ].
 15052 
 15050 
 15053     isBottom := bottomOrTop sameAs:#bottom.
 15051     isBottom := bottomOrTop sameAs:#bottom.
 15054     isBottom ifTrue:[
 15052     isBottom ifTrue:[
 15055         workPoint := xRun@(yRun + 1).
 15053         workPoint := xRun@(yRun + 1).
 15056         [(
 15054         [
 15057             (tempForm pixelAtX:workPoint x y:workPoint y) == 0 and:[
 15055             ((tempForm pixelAtX:workPoint x y:workPoint y) == 0) 
 15058             (tempForm pixelAtX:workPoint x + additionalX y:workPoint y) == 1]) and:[
 15056             and:[ ((tempForm pixelAtX:workPoint x + additionalX y:workPoint y) == 1) 
 15059             (tempForm pixelAtX:workPoint x + additionalX y:workPoint y + 1) == 1]
 15057             and:[ ((tempForm pixelAtX:workPoint x + additionalX y:workPoint y + 1) == 1) ]]
 15060         ] whileTrue:[
 15058         ] whileTrue:[
 15061             endY := workPoint y.
 15059             endY := workPoint y.
 15062             startY isNil ifTrue:[startY := workPoint y].
 15060             startY isNil ifTrue:[startY := workPoint y].
 15063             workPoint := xRun@(workPoint y + 1).
 15061             workPoint := xRun@(workPoint y + 1).
 15064         ].
 15062         ].
 15065     ] ifFalse:[
 15063     ] ifFalse:[
 15066         workPoint := xRun@(yRun - 1).
 15064         workPoint := xRun@(yRun - 1).
 15067         [(
 15065         [
 15068             (tempForm pixelAtX:workPoint x y:workPoint y) == 0 and:[
 15066             ((tempForm pixelAtX:workPoint x y:workPoint y) == 0) 
 15069             (tempForm pixelAtX:workPoint x + additionalX y:workPoint y) == 1]) and:[
 15067             and:[ ((tempForm pixelAtX:workPoint x + additionalX y:workPoint y) == 1) 
 15070             (tempForm pixelAtX:workPoint x + additionalX y:workPoint y - 1) == 1]
 15068             and:[ ((tempForm pixelAtX:workPoint x + additionalX y:workPoint y - 1) == 1) ]]
 15071         ] whileTrue:[
 15069         ] whileTrue:[
 15072             startY := workPoint y.
 15070             startY := workPoint y.
 15073             endY isNil ifTrue:[endY := workPoint y].
 15071             endY isNil ifTrue:[endY := workPoint y].
 15074             workPoint := xRun@(workPoint y - 1).
 15072             workPoint := xRun@(workPoint y - 1).
 15075         ].
 15073         ].