home *** CD-ROM | disk | FTP | other *** search
- /*
- This creates a simple effect where it seems you have zoomed
-
- $Id:$
- */
-
- /*-------------------------------------------------------------------*/
- /* I suggest you use this header as-is and add your own code below */
-
- OPTIONS RESULTS
- SIGNAL ON ERROR
- IF ADDRESS() = REXX THEN DO
- startedfromcli = 1
- ADDRESS PPT
- END
- ELSE DO
- startedfromcli = 0
- ADDRESS PPT
- END
- RESULT = 'no result'
-
- /*-------------------------------------------------------------------*/
- /* Add your code here */
-
- PARSE ARG frame
-
- IF DATATYPE(frame) ~= NUM THEN DO
- RC = 10
- RC2 = "No frame selected"
- SIGNAL ERROR
- END
-
- FRAMEINFO frame STEM inf
-
- perc.type = SLIDER
- perc.min = 1
- perc.max = 99
- perc.default = 85
- perc.label = "Area (%)"
-
- ASKREQ '"Area to zoom in?"' perc
-
- IF RESULT = 0 THEN DO
- COPYFRAME frame
- newframe = RESULT
-
- ntop = (100-perc.value)/2 * inf.height % 100
- nleft = (100-perc.value)/2 * inf.width % 100
-
- PROCESS frame BRIGHTNESS '-0.3'
- PROCESS newframe SCALE NEWWIDTH perc.value NEWHEIGHT perc.value PERCENT
- PROCESS frame COMPOSITE WITH newframe TOP ntop LEFT nleft METHOD 'Direct'
- DELETEFRAME newframe FORCE
- END
-
- EXIT 0
-
- /*-------------------------------------------------------------------*/
- /* Again, keep this part intact. This is the error handler. */
- ERROR :
- returncode = RC
- IF startedfromcli = 1 THEN DO
- SAY 'ERROR ' returncode ' on line ' SIGL ': ' RC2
- PPT_TO_BACK
- END
- ELSE
- SHOWERROR '"'RC2'"' SIGL
- EXIT returncode
-
-
-