home *** CD-ROM | disk | FTP | other *** search
- /*
- Control Tower Arexx Script
- Written By J.L. White
- (C)1995 Merlin's Software
- Lines=6
- 01=Magnifying Glass
- 02=
- 03=This script loads each image of the File List Window
- 04=into ImageFX and moves a magnifying glass along a
- 05=user defined path and magnifies the image under the
- 06=glass part of the magnifying glass.
-
- */
-
- options results
-
- arg FrameNum TotalNum
- address "IMAGEFX.1"
- ScreenToFront
- if FrameNum = 0 then do
- FrameNum = 1
- KillBrush
- call PickLine()
- RequestSlider '"Enter Amount To Magnify!"' 1 100 30
- Answer2 = Result
- call open TempFile,"RAM:CT-IFLB",W
- call writeln TempFile,Answer
- call writeln TempFile,Answer2
- call close TempFile
- end
- else do
- call open TempFile,"RAM:CT-IFLB",R
- line = readln(TempFile)
- parse var line X1 Y1 X2 Y2
- line = readln(TempFile)
- parse var line Answer2
- call close TempFile
- end
-
- ActiveColor 1
- DrawMode Normal
- DrawStyle Normal
- Pen 0 1
- Blend 100
- AlphaChannel Off
- EdgeMode Normal 0
- FillMode Solid 0 0 0 SMOOTH
- AirbrushSettings 5 50 0 Spray
- call GetXYCords
- Buffer2Swap
- AlphaChannel Off
- ClearBuffer 0 0 0 FORCE
- FilledOval X Y 84 72
- Buffer2Alpha
- Swap
- Buffer2Swap
- Scissors
- FilledOval X Y 84 72
- GetBrush
- parse var result Name BWidth BHeight Blah
- Scale BWidth+Answer2 BHeight+Answer2
- BrushHandle BWidth%2 BHeight%2
- Point X-(Answer2%2) Y-(Answer2%2)
- KillBrush
- Swap
- EdgeMode Normal
- AlphaChannel FRISKET
- Merge 100 Alpha
- AlphaChannel Off
- LoadBrush "CT:Brushes/MagGlass"
- BrushHandle 0 0
- Blend 75
- DrawMode Darken
- BrushHandle 0 0
- Point (X-162)+6 (Y-86)+6
- Blend 100
- DrawMode Normal
- Point X-162 Y-86
- KillBrush
- exit
-
-
- GetXYCords:
- TotalKey = 1
- NumKey = (TotalNum/TotalKey)
- FirstNum = ((NumKey - (NumKey-(FrameNum-1)))%NumKey)+1
- SecNum = FirstNum+1
- if FirstNum = TotalKey then do
- NumKey = NumKey - 1
- NewNum = (((FrameNum-((FirstNum-1)*NumKey)))-(TotalKey-1))
- end
- else
- NewNum = ((FrameNum-((FirstNum-1)*NumKey)))
- if X2 < X1 then do
- DiffX = -((X1-X2)/(NumKey))
- end
- else do
- DiffX = ((X2-X1)/(NumKey))
- end
- if Y2 < Y1 then do
- DiffY = -((Y1-Y2)/(NumKey))
- end
- else do
- DiffY = ((Y2-Y1)/(NumKey))
- end
- X = (X1 + (DiffX*NewNum))-DiffX
- Y = (Y1 + (DiffY*NewNum))-DiffY
- X = X % 1
- Y = Y % 1
- return
-
- PickLine:
- Menu ToolBox
- RequestNotify "Draw Line From Point A To Point B For Movement Of Magnifying Glass!"
- DrawTool Line
- HidePanel
- Undo On
- WaitFor SELECTDOWN
- parse var result X1 Y1
- WaitFor SELECTUP
- parse var result X2 Y2
- Undo
- ShowPanel
- Undo Off
- GetMain
- parse var result Name Width Height Blah
- if X1 < 10 then X1 = -50
- if Y1 < 10 then Y1 = -10
- if X2 > (Width-10) then X2 = Width+100
- if Y2 > (Height-10) then Y2 = Width+10
- X1 = strip(X1)
- Y1 = strip(Y1)
- X2 = strip(X2)
- Y2 = strip(Y2)
- Answer = X1" "Y1" "X2" "Y2
- RequestResponse "Is The Line You Have Drawn Correct?"
- if rc ~= 0 then call PickLine()
-
- return
-