home *** CD-ROM | disk | FTP | other *** search
- /* FW_MultiOval.rexx 1.0 (04.01.95) by NDY's
-
- Wraps a text around four ovals at once. */
-
- /* Init */
- OPTIONS RESULTS
- rxport="FinalWrapperPort"
- IF ~Show("P",rxport) THEN EXIT 10
- ADDRESS VALUE rxport
- Lock ON
- Prefs STORE
- Set ZIP 1 /* Make window small */
- oldzip=RESULT
- SIGNAL ON ERROR
-
- /* Read oval and text */
- GetVal TGAD
- text=RESULT
- GetVal XGAD
- x=RESULT
- GetVal YGAD
- y=RESULT
- GetVal WGAD
- w=RESULT
- GetVal HGAD
- h=RESULT
- IF text="" | x="" | y="" | w="" | h="" THEN CALL ERROR
- /* The four ovals */
- l=Length(text)%4
- t.1=Left(text,l)
- t.2=SubStr(text,l+1,l)
- t.3=SubStr(text,l+l+1,l)
- t.4=Right(text,Length(text)-l-l-l)
- x.1=x-w*0.55
- x.2=x
- x.3=x+w*0.55
- x.4=x
- y.1=y
- y.2=y-h*0.55
- y.3=y
- y.4=y+h*0.55
- /* Set options */
- SetVal ARC 180
- SetState ARC 1
- SetState BEG 1
- SetMode BEG 1 /* clockwise */
- DO i=1 TO 4
- SetVal BEG (180+i*90)//360
- SetVal TGAD t.i
- SetVal XGAD x.i
- SetVal YGAD y.i
- Go
- END
-
- /* Cleanup (this one or a similar code should be used by all FW macros): */
-
- /* BEGIN exit */
- ERROR:
- Set ZIP oldzip
- Prefs RESET
- Lock OFF
- EXIT
- /* END exit */
-