home *** CD-ROM | disk | FTP | other *** search
- /* $VER: PlaceGraphicAt.rexx 1.0a (03.24.95)
- Copyright 1995 Soft-Logik Publishing Corporation
- May not be distributed without Soft-Logik Publishing Corporation's express written permission */
-
- /* Bugfix 09.09.95 Carsten A. Duske */
-
- OPTIONS RESULTS
- TRACE OFF
-
- /* Make sure rexx support is opened */
- IF ~SHOW('L','rexxsupport.library') THEN
- CALL ADDLIB('rexxsupport.library',0,-30)
- IF ~SHOW('L','softlogik:libs/slarexxsupport.library') THEN
- CALL ADDLIB('softlogik:libs/slarexxsupport.library', 0, -30)
-
- ADDRESS 'PAGESTREAM'
-
- /* SELECT THE GRAPHIC */
- 'REFRESH WAIT'
- 'PLACEGRAPHIC STATUS'
- IF rc~=0 THEN SIGNAL CANCEL
-
- /* GET THE OBJECT ID AND TYPE */
- 'GETOBJECT TYPE OBJTYPE'
- objnum = result
-
- /* POSITION THE PICTURE */
- 'GETREGION COORD MESSAGE "Click or drag to place the picture."'
- IF rc=10 THEN DO
- 'DELETEOBJECT'
- SIGNAL CANCEL
- END
-
- boxw = ABS(P2D(coord.x1) - P2D(coord.x2))
- boxh = ABS(P2D(coord.y1) - P2D(coord.y2))
-
- IF (boxw<0.25) | (boxh<0.25) THEN DO
- IF objtype=12 THEN 'GETPICTURE POSITION PSTEM'
- IF objtype=2 THEN 'GETDRAWING POSITION PSTEM'
- IF objtype=13 THEN 'GETEPS POSITION PSTEM'
- objw = ABS(P2D(pstem.right) - P2D(pstem.left))
- objh = ABS(P2D(pstem.top) - P2D(pstem.bottom))
- coord.x2 = P2D(coord.x1) + objw
- coord.y2 = P2D(coord.y1) + objh
- END
-
- IF objtype=12 THEN 'EDITPICTURE POSITION' coord.x1 coord.y1 coord.x2 coord.y2
- IF objtype=2 THEN 'EDITDRAWING POSITION' coord.x1 coord.y1 coord.x2 coord.y2
- IF objtype=13 THEN 'EDITEPS POSITION' coord.x1 coord.y1 coord.x2 coord.y2
-
- 'REFRESH CONTINUE'
-
- EXIT
-
-
- CANCEL:
- 'REFRESH CONTINUE'
- EXIT
-