home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Sound / SkinCrop / Rexx / SkinCrop.ifx next >
Text File  |  1999-07-09  |  28KB  |  1,104 lines

  1. /*
  2.  * $VER: SkinCrop 0.8 (9.7.99)
  3.  *
  4.  * Arexx program for the ImageFX image processing system.
  5.  * Written by Zer0-X / o'Moses   (zrx.oms@sci.fi)
  6.  *
  7.  * All Rights Released
  8.  *
  9.  * SkinCrop - Script to easily chop out the important parts of images for
  10.  *            creating skins for (mainly) the Amiga's MPEG-Audio player.
  11.  *
  12.  *            The script will ask you to choose the buffer where the image
  13.  *            to be converted is stored and informs if something is wrong.
  14.  *
  15.  *            And remember this: All temporary & final images will be
  16.  *            saved to the selected path overwriting anything that exists!
  17.  *
  18.  *            More information about this subject can be found from:
  19.  *            http://www.algonet.se/~daniel7/winamp/skinspecs.html
  20.  *
  21.  *
  22.  * 0.1
  23.  *    31.05.99 Just had an idea and started this thing out.
  24.  *             It actually seems to be working quite OK.
  25.  * 0.2
  26.  *    01.06.99 Some coordinate adjustments to suit better for AmigaAMP.
  27.  *             Cleaning the script (SPEED) & commenting it a bit.
  28.  *             Imagebuffer selector & sizecheck added.
  29.  *             Now copies the titlebar from the main image too.
  30.  *             Some more frames added to the buttons to help to coordinate.
  31.  *             Added destination directory requester & few error handlings.
  32.  * 0.3
  33.  *    02.06.99 Added some conversion options to create a framed backup of
  34.  *             the main image (MAIN_BAK) to help finding the used areas, to
  35.  *             set the frame color, to delete the temporary images, to
  36.  *             disable the NUMBERS, PLAYPAUS & TEXT images creation & to
  37.  *             disable the creation of help frames.
  38.  *             Now resets the drawtool, mode, style & colors to defaults.
  39.  * 0.4
  40.  *    04.06.99 Added option to create 3D beveled edges ready for the buttons.
  41.  *             Added few more output filetypes to choose from. (The backup of
  42.  *             MAIN image is still saved in the IFF-ILBM format for quality.)
  43.  * 0.5
  44.  *    17.06.99 Fixed the beveling to create a bit more rounded edges.
  45.  *             Added options to create a custom NUMBERS & PLAYPAUS images.
  46.  *             Added one more help frame to the end of NUMBERS that seems to
  47.  *             be shown if no songs are loaded when a new skin is loaded.
  48.  *             Added some more look to the POSBAR, VOLUME & PANNING sliders.
  49.  *             Added option to bevel also the MAIN image.
  50.  * 0.6
  51.  *    23.06.99 Added option to create markings for the play-control buttons.
  52.  *             Changed file VOLBAR to VOLUME as this seems to be the name
  53.  *             used more often and works now on TMLG too.
  54.  *             POSBAR, VOLUME & PANNING sliders now use the help frame color.
  55.  *             Fixed a little graphics bug between SHUFFLE & REPEAT buttons.
  56.  *             Changed default options a bit (Hopefully doesn't matter).
  57.  *             Added option to change the amount of beveling.
  58.  *             Added option to create lights for the SHUFREP images.
  59.  * 0.7
  60.  *    05.07.99 Fixed a little bug in the MONOSTER image (TMLG once more).
  61.  *             Fixed few coordinates to make the skins more compatible with
  62.  *             AmigaAMP, AMPlifier, TMLG (and WinAMP if you prefer that).
  63.  *             Added option to create beveled edges for the other visuals.
  64.  * 0.8
  65.  *    09.07.99 Added Crop & Scale features (well, a sort of like that).
  66.  *             Added 8bit rendering for AGA users, but to get rid of those
  67.  *             are you sure requesters the only way seems to be to disable
  68.  *             verify from the prefs.
  69.  *             Added 3bit (~8 color) TEXT image I use for testing the script
  70.  *             to the archive for "lazy" people disliking the frame cubes.
  71.  *             Added bit more look to the TITLEBAR image for other players.
  72.  *
  73.  */
  74.  
  75. OPTIONS RESULTS
  76.  
  77. SIGNAL ON BREAK_C
  78. SIGNAL ON ERROR
  79.  
  80. path = 'RAM:'
  81. fform = 'ILBM'
  82. jpgq = ''
  83. fsuf = 'IFF'
  84. PRMAGA = 0
  85.  
  86. LockInput
  87. LockGui
  88. Undo Off
  89.  
  90.  
  91. SelectBuffer
  92. GetMain
  93. IF RESULT = "" THEN DO
  94.    RequestNotify 'No image available.'
  95.    CALL ERROR
  96. END
  97.  
  98. SLICEME:
  99. GetMain
  100. PARSE VAR RESULT name width height pad last
  101. IF (width ~= 275) | (height ~= 116) THEN DO
  102.    IF (height ~= 275) | (pad ~= 116) THEN DO
  103.       RequestNotify 'Image must be 275 x 116 pixels.'
  104.       Crop
  105.       Scale
  106.       CALL SLICEME
  107.    END
  108. END
  109.  
  110. PARAM.1 = 'CHECK 12 1 15 15 "Backup MAIN image with used areas marked." 0'
  111. PARAM.2 = 'CHECK 12 15 15 15 "Create help frames for buttons & MONO/STEREO." 0'
  112. PARAM.3 = 'CHECK 12 29 15 15 "3D Beveled buttons (Overrides help frames)." 1'
  113. PARAM.4 = 'CHECK 12 57 15 15 "Create NUMBERS, PLAYPAUS & TEXT frame images." 0'
  114. PARAM.5 = 'CHECK 380 71 15 15 "Delete temporary images." 1'
  115. PARAM.6 = 'SLIDER 420 20 80 12 "Red" 200 0 255 %ld'
  116. PARAM.7 = 'SLIDER 420 34 80 12 "Green" 128 0 255 %ld'
  117. PARAM.8 = 'SLIDER 420 48 80 12 "Blue" 255 0 255 %ld'
  118. PARAM.9 = 'TEXT 455 3 1 1 "Help Frame & Slider Color" JU=2'
  119. PARAM.10 = 'BORDER 370 16 170 50'
  120. PARAM.11 = 'CYCLE 439 109 80 12 "Output format:" 0 "IFF/JPG/BMP/AGA-IFF"'
  121. PARAM.12 = 'SLIDER 439 124 80 12 "JPG Quality" 85 1 100 %ld'
  122. PARAM.13 = 'CHECK 12 71 15 15 "Custom NUMBERS image (Overrides frames)." 1'
  123. PARAM.14 = 'CHECK 12 85 15 15 "Custom PLAYPAUS image (Overrides frames)." 1'
  124. PARAM.15 = 'CHECK 12 43 15 15 "3D Beveled MAIN image." 1'
  125. PARAM.16 = 'CHECK 12 99 15 15 "Custom play control button markings." 1'
  126. PARAM.17 = 'SLIDER 439 89 80 12 "Bevel amount" 64 0 255 %ld'
  127. PARAM.18 = 'CHECK 12 113 15 15 "Create lights for SHUFREP button images." 1'
  128. PARAM.19 = 'CHECK 12 127 15 15 "Bevel other visual blocks." 1'
  129. PARAM.20 = 'END'
  130.  
  131. NewComplexRequest '"Skin Conversion Options"' PARAM 550 145
  132. IF rc ~= 0 THEN CALL ERROR
  133.  
  134. PRMBAK = RESULT.1
  135. PRMHLP = RESULT.2
  136. PRMBEV = RESULT.3
  137. PRMNUM = RESULT.4
  138. PRMDEL = RESULT.5
  139. PRMCNU = RESULT.13
  140. PRMCPL = RESULT.14
  141. PRMBMA = RESULT.15
  142. PRMMRK = RESULT.16
  143. PRMLIG = RESULT.18
  144. PRMBVI = RESULT.19
  145. RR = RESULT.6
  146. GG = RESULT.7
  147. BB = RESULT.8
  148. BEV = RESULT.17
  149.  
  150. IF RESULT.11 = 1 THEN DO
  151.    fform = 'JPEG'
  152.    jpgq = RESULT.12
  153.    fsuf = 'JPG'
  154. END
  155. ELSE IF RESULT.11 = 2 THEN DO
  156.    fform = 'BMP'
  157.    fsuf = 'BMP'
  158. END
  159. ELSE IF RESULT.11 = 3 THEN DO
  160.    PRMAGA = 1
  161.    SetRender Foreign
  162.    Render Monitor Default
  163.    Render Mode Lores NoLace
  164.    Render Dither 1 0 3
  165.    Render Colors 256
  166. END
  167.  
  168. RequestFile '"Select destination directory:"' path DIRONLY
  169. IF rc ~= 0 THEN CALL ERROR
  170. outpath = result
  171. IF RIGHT(outpath,1) ~= ':' THEN DO
  172.    outpath = outpath || '/'
  173. END
  174.  
  175.  
  176. Pen 0 1
  177. oldpen = RESULT
  178. DrawTool FREEDRAW
  179. oldtool = RESULT
  180. DrawMode NORMAL
  181. oldmode = RESULT
  182. DrawStyle NORMAL
  183. oldstyle = RESULT
  184. FillMode SOLID
  185. oldfill = RESULT
  186. GetPalette 0
  187. oldpal0 = RESULT
  188. SetPalette 0 0 0 0
  189. GetPalette 1
  190. oldpal1 = RESULT
  191. SetPalette 1 RR GG BB
  192. GetPalette 2
  193. oldpal2 = RESULT
  194. SetPalette 2 0 128 255
  195. GetPalette 3
  196. oldpal3 = RESULT
  197. SetPalette 3 255 255 0
  198. GetPalette 4
  199. oldpal4 = RESULT
  200. SetPalette 4 0 255 0
  201. GetPalette 5
  202. oldpal5 = RESULT
  203. SetPalette 5 0 128 0
  204. GetPalette 6
  205. oldpal6 = RESULT
  206. SetPalette 6 255 0 0
  207. GetPalette 7
  208. oldpal7 = RESULT
  209. SetPalette 7 128 0 0
  210. ActiveColor 0
  211. oldcol = RESULT
  212.  
  213.  
  214. SaveBufferAs ILBM '"'||outpath||'_Main_Image.IFF"' Force
  215.  
  216.  
  217. LoadBuffer '"'||outpath||'_Main_Image.IFF"' Force New
  218. IF PRMBMA ~= 0 THEN DO
  219.    xc=0 ; yc=0 ; xs=275 ; ys=116 ; CALL BBoxUO
  220. END
  221. IF PRMBVI ~= 0 THEN DO
  222.    xc=9 ; yc=21 ; xs=10 ; ys=45 ; CALL BBoxDO    /* Clutterbar */
  223.    xc=23 ; yc=27 ; xs=13 ; ys=7 ; CALL BBoxDO    /* Play Stop Pause Indicator */
  224.    FilledBox 24 28 11 9
  225.    xc=39 ; yc=31 ; xs=8 ; ys=3 ; CALL BBoxDO    /* Minus Sign */
  226.    FilledBox 40 32 6 1
  227.    xc=47 ; yc=25 ; xs=11 ; ys=15 ; CALL BBoxDO    /* Minute Digit 10s */
  228.    FilledBox 48 26 9 13
  229.    xc=59 ; yc=25 ; xs=11 ; ys=15 ; CALL BBoxDO    /* Minute Digit 1s */
  230.    FilledBox 60 26 9 13
  231.    xc=77 ; yc=25 ; xs=11 ; ys=15 ; CALL BBoxDO    /* Second Digit 10s */
  232.    FilledBox 78 26 9 13
  233.    xc=89 ; yc=25 ; xs=11 ; ys=15 ; CALL BBoxDO    /* Second Digit 1s */
  234.    FilledBox 90 26 9 13
  235.    xc=23 ; yc=42 ; xs=79 ; ys=18 ; CALL BBoxDO    /* Spectrometer Display */
  236.    FilledBox 24 43 77 16
  237.    xc=111 ; yc=26 ; xs=154 ; ys=8 ; CALL BBoxDO    /* Song Title Display */
  238.    FilledBox 112 27 152 6
  239.    xc=110 ; yc=42 ; xs=18 ; ys=8 ; CALL BBoxDO    /* Bitrate Display */
  240.    FilledBox 111 43 16 6
  241.    xc=155 ; yc=42 ; xs=12 ; ys=8 ; CALL BBoxDO    /* Sample Rate Display */
  242.    FilledBox 156 43 10 6
  243.    xc=106 ; yc=56 ; xs=70 ; ys=15 ; CALL BBoxDO    /* Volume Slider */
  244.    xc=176 ; yc=56 ; xs=40 ; ys=15 ; CALL BBoxDO    /* Panning Slider */
  245.    xc=15 ; yc=71 ; xs=250 ; ys=12 ; CALL BBoxDO    /* Position Bar */
  246. END
  247. fname = 'MAIN.' ; CALL RenderPic
  248.  
  249. /*
  250.  * Scissors
  251.  * Box 24 28 11 9
  252.  * SaveBrushAs ILBM '"'||outpath||'_Play_Stop_Pause_Indicator.IFF"'
  253.  * Scissors
  254.  * Box 40 32 6 1
  255.  * SaveBrushAs ILBM '"'||outpath||'_Minus_Sign.IFF"'
  256.  * Scissors
  257.  * Box 48 26 9 13
  258.  * SaveBrushAs ILBM '"'||outpath||'_Minute_Digit_10s.IFF"'
  259.  * Scissors
  260.  * Box 60 26 9 13
  261.  * SaveBrushAs ILBM '"'||outpath||'_Minute_Digit_1s.IFF"'
  262.  * Scissors
  263.  * Box 78 26 9 13
  264.  * SaveBrushAs ILBM '"'||outpath||'_Second_Digit_10s.IFF"'
  265.  * Scissors
  266.  * Box 90 26 9 13
  267.  * SaveBrushAs ILBM '"'||outpath||'_Second_Digit_1s.IFF"'
  268.  * Scissors
  269.  * Box 24 43 77 16
  270.  * SaveBrushAs ILBM '"'||outpath||'_Spectrometer_Display.IFF"'
  271.  * Scissors
  272.  * Box 112 27 152 6
  273.  * SaveBrushAs ILBM '"'||outpath||'_Song_Title_Display.IFF"'
  274.  * Scissors
  275.  * Box 111 43 16 6
  276.  * SaveBrushAs ILBM '"'||outpath||'_Bitrate_Display.IFF"'
  277.  * Scissors
  278.  * Box 156 43 10 6
  279.  * SaveBrushAs ILBM '"'||outpath||'_Sample_Rate_Display.IFF"'
  280.  * Scissors
  281.  * Box 177 57 38 13
  282.  * SaveBrushAs ILBM '"'||outpath||'_Panning_Slider.IFF"'
  283.  * Scissors
  284.  * Box 253 91 13 15
  285.  * SaveBrushAs ILBM '"'||outpath||'_About_Button.IFF"'
  286.  */
  287.  
  288.  
  289. Scissors
  290. Box 10 22 8 43
  291. SaveBrushAs ILBM '"'||outpath||'_Clutterbar.IFF"'
  292. Scissors
  293. Box 0 0 275 14
  294. SaveBrushAs ILBM '"'||outpath||'_Titlebar.IFF"'
  295. Scissors
  296. Box 212 41 29 12
  297. SaveBrushAs ILBM '"'||outpath||'_Mono_Indicator.IFF"'
  298. Scissors
  299. Box 239 41 29 12
  300. SaveBrushAs ILBM '"'||outpath||'_Stereo_Indicator.IFF"'
  301. Scissors
  302. Box 107 57 68 13
  303. SaveBrushAs ILBM '"'||outpath||'_Volume_Slider.IFF"'
  304. Scissors
  305. Box 219 58 23 12
  306. SaveBrushAs ILBM '"'||outpath||'_Equalizer_Button.IFF"'
  307. Scissors
  308. Box 242 58 23 12
  309. SaveBrushAs ILBM '"'||outpath||'_Playlist_Editor_Button.IFF"'
  310. Scissors
  311. Box 16 72 248 10
  312. SaveBrushAs ILBM '"'||outpath||'_Position_Bar.IFF"'
  313. Scissors
  314. Box 16 88 114 18
  315. SaveBrushAs ILBM '"'||outpath||'_Play_Control_Buttons.IFF"'
  316. Scissors
  317. Box 136 89 22 16
  318. SaveBrushAs ILBM '"'||outpath||'_Eject_Button.IFF"'
  319. Scissors
  320. Box 164 89 46 15
  321. SaveBrushAs ILBM '"'||outpath||'_Shuffle_Button.IFF"'
  322. Scissors
  323. Box 210 89 28 15
  324. SaveBrushAs ILBM '"'||outpath||'_Repeat_Button.IFF"'
  325. KillBrush
  326. KillBuffer Force
  327.  
  328.  
  329. /*
  330.  * Create framed backup of the main image.
  331.  */
  332. IF PRMBAK ~= 0 THEN DO
  333.    LoadBuffer '"'||outpath||'_Main_Image.IFF"' Force New
  334.    ActiveColor 1
  335.    Box 10 22 8 43
  336.    Box 24 28 11 9
  337.    Line 40 32 45 32
  338.    Box 48 26 9 13
  339.    Box 60 26 9 13
  340.    Box 78 26 9 13
  341.    Box 90 26 9 13
  342.    Box 24 43 77 16
  343.    Box 112 27 152 6
  344.    Box 111 43 16 6
  345.    Box 156 43 10 6
  346.    Box 177 57 38 13
  347.    Box 253 91 13 15
  348.    Box 0 0 275 14
  349.    Box 212 41 27 12
  350.    Box 239 41 29 12
  351.    Box 107 57 68 13
  352.    Box 219 58 23 12
  353.    Box 242 58 23 12
  354.    Box 16 72 248 10
  355.    Box 16 88 114 18
  356.    Box 136 89 22 16
  357.    Box 164 89 46 15
  358.    Box 210 89 28 15
  359.    SaveBufferAs ILBM '"'||outpath||'MAIN_BAK.IFF"' Force
  360.    KillBuffer Force
  361. END
  362.  
  363.  
  364. /*
  365.  * Title bar & option buttons.
  366.  */
  367.  
  368.    CreateBuffer 344 87 Force 255 255 255 New
  369.    ActiveColor 0
  370.    Box 0 36 17 7
  371.    Box 17 36 3 7
  372.    Box 20 36 3 7
  373.    Box 23 36 3 7
  374.    LoadBrush '"'||outpath||'_Titlebar.IFF"'
  375.    BrushHandle 0 0
  376.    Point 27 0
  377.    Point 27 15
  378.    Point 27 29
  379.    Point 27 42
  380.    Point 27 57
  381.    Point 27 72
  382.    LoadBrush '"'||outpath||'_Clutterbar.IFF"'
  383.    BrushHandle 0 0
  384.    Point 304 0
  385.    Point 312 0
  386.    Point 304 44
  387.    Point 312 44
  388.    Point 320 44
  389.    Point 328 44
  390.    Point 336 44
  391.    Scissors
  392.    Box 33 3 9 9
  393.    BrushHandle 0 0
  394.    Point 0 0
  395.    Point 0 9
  396.    Scissors
  397.    Box 271 3 9 9
  398.    BrushHandle 0 0
  399.    Point 9 0
  400.    Point 9 9
  401.    Scissors
  402.    Box 291 3 9 9
  403.    BrushHandle 0 0
  404.    Point 18 0
  405.    Point 18 9
  406.    Scissors
  407.    Box 281 3 9 9
  408.    BrushHandle 0 0
  409.    Point 0 18
  410.    Point 9 18
  411.    Point 0 27
  412.    Point 9 27
  413.    KillBrush
  414.    ActiveColor 1
  415.    Box 196 31 7 10
  416.    Box 203 31 10 10
  417.    Box 213 31 9 10
  418.    Box 222 31 9 10
  419.    Box 231 31 11 10
  420.    Box 242 31 10 10
  421.    Box 196 44 7 10
  422.    Box 203 44 10 10
  423.    Box 213 44 9 10
  424.    Box 222 44 9 10
  425.    Box 231 44 11 10
  426.    Box 242 44 10 10
  427.    Box 106 34 38 4
  428.    Box 157 33 3 6
  429.    Box 161 33 10 6
  430.    Box 174 33 10 6
  431.    Box 253 33 17 7
  432.    Box 106 47 38 4
  433.    Box 157 46 3 6
  434.    Box 161 46 10 6
  435.    Box 174 46 10 6
  436.    Box 253 46 17 7
  437.    IF PRMBEV ~= 0 THEN DO
  438.       xc=0 ; yc=0 ; xs=9 ; ys=9 ; CALL BBoxU
  439.       xc=0 ; yc=9 ; xs=9 ; ys=9 ; CALL BBoxD
  440.       xc=9 ; yc=0 ; xs=9 ; ys=9 ; CALL BBoxU
  441.       xc=9 ; yc=9 ; xs=9 ; ys=9 ; CALL BBoxD
  442.       xc=18 ; yc=0 ; xs=9 ; ys=9 ; CALL BBoxU
  443.       xc=18 ; yc=9 ; xs=9 ; ys=9 ; CALL BBoxD
  444.       xc=0 ; yc=18 ; xs=9 ; ys=9 ; CALL BBoxU
  445.       xc=9 ; yc=18 ; xs=9 ; ys=9 ; CALL BBoxD
  446.       xc=0 ; yc=27 ; xs=9 ; ys=9 ; CALL BBoxU
  447.       xc=9 ; yc=27 ; xs=9 ; ys=9 ; CALL BBoxD
  448.       xc=33 ; yc=3 ; xs=9 ; ys=9 ; CALL BBoxU
  449.       xc=271 ; yc=3 ; xs=9 ; ys=9 ; CALL BBoxU
  450.       xc=281 ; yc=3 ; xs=9 ; ys=9 ; CALL BBoxU
  451.       xc=291 ; yc=3 ; xs=9 ; ys=9 ; CALL BBoxU
  452.       xc=33 ; yc=18 ; xs=9 ; ys=9 ; CALL BBoxU
  453.       xc=271 ; yc=18 ; xs=9 ; ys=9 ; CALL BBoxU
  454.       xc=281 ; yc=18 ; xs=9 ; ys=9 ; CALL BBoxU
  455.       xc=291 ; yc=18 ; xs=9 ; ys=9 ; CALL BBoxU
  456.       xc=33 ; yc=32 ; xs=9 ; ys=9 ; CALL BBoxU
  457.       xc=271 ; yc=32 ; xs=9 ; ys=9 ; CALL BBoxU
  458.       xc=281 ; yc=32 ; xs=9 ; ys=9 ; CALL BBoxU
  459.       xc=291 ; yc=32 ; xs=9 ; ys=9 ; CALL BBoxU
  460.       xc=33 ; yc=45 ; xs=9 ; ys=9 ; CALL BBoxU
  461.       xc=271 ; yc=45 ; xs=9 ; ys=9 ; CALL BBoxU
  462.       xc=281 ; yc=45 ; xs=9 ; ys=9 ; CALL BBoxU
  463.       xc=291 ; yc=45 ; xs=9 ; ys=9 ; CALL BBoxU
  464.       xc=33 ; yc=60 ; xs=9 ; ys=9 ; CALL BBoxU
  465.       xc=271 ; yc=60 ; xs=9 ; ys=9 ; CALL BBoxU
  466.       xc=281 ; yc=60 ; xs=9 ; ys=9 ; CALL BBoxU
  467.       xc=291 ; yc=60 ; xs=9 ; ys=9 ; CALL BBoxU
  468.       xc=33 ; yc=75 ; xs=9 ; ys=9 ; CALL BBoxU
  469.       xc=271 ; yc=75 ; xs=9 ; ys=9 ; CALL BBoxU
  470.       xc=281 ; yc=75 ; xs=9 ; ys=9 ; CALL BBoxU
  471.       xc=291 ; yc=75 ; xs=9 ; ys=9 ; CALL BBoxU
  472.    END
  473.    ELSE IF PRMHLP ~= 0 THEN DO
  474.       Box 0 0 9 9
  475.       Box 0 9 9 9
  476.       Box 9 0 9 9
  477.       Box 9 9 9 9
  478.       Box 18 0 9 9
  479.       Box 18 9 9 9
  480.       Box 0 18 9 9
  481.       Box 9 18 9 9
  482.       Box 0 27 9 9
  483.       Box 9 27 9 9
  484.       Box 33 3 9 9
  485.       Box 271 3 9 9
  486.       Box 281 3 9 9
  487.       Box 291 3 9 9
  488.       Box 33 18 9 9
  489.       Box 271 18 9 9
  490.       Box 281 18 9 9
  491.       Box 291 18 9 9
  492.       Box 33 32 9 9
  493.       Box 271 32 9 9
  494.       Box 281 32 9 9
  495.       Box 291 32 9 9
  496.       Box 33 45 9 9
  497.       Box 271 45 9 9
  498.       Box 281 45 9 9
  499.       Box 291 45 9 9
  500.       Box 33 60 9 9
  501.       Box 271 60 9 9
  502.       Box 281 60 9 9
  503.       Box 291 60 9 9
  504.       Box 33 75 9 9
  505.       Box 271 75 9 9
  506.       Box 281 75 9 9
  507.       Box 291 75 9 9
  508.    END
  509.    Box 305 46 6 8
  510.    Box 313 54 6 8
  511.    Box 321 62 6 8
  512.    Box 329 70 6 8
  513.    Box 337 78 6 7
  514.    fname = 'TITLEBAR.' ; CALL RenderPic
  515.    KillBuffer Force
  516.  
  517.  
  518. /*
  519.  * Position bar.
  520.  */
  521.  
  522.    CreateBuffer 307 10 Force 255 255 255 New
  523.    LoadBrush '"'||outpath||'_Position_Bar.IFF"'
  524.    BrushHandle 0 0
  525.    Point 0 0
  526.    KillBrush
  527.    ActiveColor 1
  528.    FilledBox 248 0 29 10
  529.    xc=248 ; yc=0 ; xs=29 ; ys=10 ; CALL BBoxUO
  530.    FilledBox 278 0 29 10
  531.    xc=278 ; yc=0 ; xs=29 ; ys=10 ; CALL BBoxDO
  532.    fname = 'POSBAR.' ; CALL RenderPic
  533.    KillBuffer Force
  534.  
  535.  
  536. /*
  537.  * Volume & panning sliders.
  538.  */
  539.  
  540.    CreateBuffer 68 433 Force 255 255 255 New
  541.    LoadBrush '"'||outpath||'_Volume_Slider.IFF"'
  542.    BrushHandle 0 0
  543.    i = 0
  544.    DO UNTIL i = 420
  545.       Point 0 i
  546.       i = i + 15
  547.    END
  548.    KillBrush
  549.    FilledBox 0 422 14 11
  550.    xc=0 ; yc=422 ; xs=14 ; ys=11 ; CALL BBoxDO
  551.    FilledBox 15 422 14 11
  552.    xc=15 ; yc=422 ; xs=14 ; ys=11 ; CALL BBoxUO
  553.    fname = 'VOLUME.' ; CALL RenderPic
  554.    KillBuffer Force
  555.  
  556.  
  557. /*
  558.  * Play, pause, stop, eject & other control buttons.
  559.  */
  560.  
  561.    CreateBuffer 136 36 Force 255 255 255 New
  562.    LoadBrush '"'||outpath||'_Play_Control_Buttons.IFF"'
  563.    BrushHandle 0 0
  564.    Point 0 0
  565.    Point 0 18
  566.    LoadBrush '"'||outpath||'_Eject_Button.IFF"'
  567.    BrushHandle 0 0
  568.    Point 114 0
  569.    Point 114 16
  570.    KillBrush
  571.    IF PRMBEV ~= 0 THEN DO
  572.       xc=0 ; yc=0 ; xs=23 ; ys=18 ; CALL BBoxU
  573.       xc=23 ; yc=0 ; xs=23 ; ys=18 ; CALL BBoxU
  574.       xc=46 ; yc=0 ; xs=23 ; ys=18 ; CALL BBoxU
  575.       xc=69 ; yc=0 ; xs=23 ; ys=18 ; CALL BBoxU
  576.       xc=92 ; yc=0 ; xs=22 ; ys=18 ; CALL BBoxU
  577.       xc=114 ; yc=0 ; xs=22 ; ys=16 ; CALL BBoxU
  578.       xc=0 ; yc=18 ; xs=23 ; ys=18 ; CALL BBoxD
  579.       xc=23 ; yc=18 ; xs=23 ; ys=18 ; CALL BBoxD
  580.       xc=46 ; yc=18 ; xs=23 ; ys=18 ; CALL BBoxD
  581.       xc=69 ; yc=18 ; xs=23 ; ys=18 ; CALL BBoxD
  582.       xc=92 ; yc=18 ; xs=22 ; ys=18 ; CALL BBoxD
  583.       xc=114 ; yc=16 ; xs=22 ; ys=16 ; CALL BBoxD
  584.    END
  585.    ELSE IF PRMHLP ~= 0 THEN DO
  586.       ActiveColor 1
  587.       Box 0 0 23 18
  588.       Box 23 18 23 18
  589.       Box 46 0 23 18
  590.       Box 69 18 23 18
  591.       Box 92 0 22 18
  592.       Box 114 16 22 16
  593.    END
  594.    IF PRMMRK ~= 0 THEN DO
  595.       DrawMode DARKEN 64
  596.       Line 6 4 6 13        /* PREV */
  597.       Line 6 4 7 4
  598.       Line 8 8 8 9
  599.       Line 9 7 16 4
  600.       Line 29 4 29 13        /* PLAY */
  601.       Line 29 4 39 8
  602.       Line 52 4 52 13        /* PAUSE */
  603.       Line 52 4 55 4
  604.       Line 59 4 59 13
  605.       Line 59 4 62 4
  606.       Line 75 4 75 13        /* STOP */
  607.       Line 75 4 85 4
  608.       Line 97 4 97 13        /* NEXT */
  609.       Point 97 4
  610.       Line 98 4 105 8
  611.       Line 106 4 106 13
  612.       Line 106 4 107 4
  613.       Line 121 7 124 4        /* EJECT */
  614.       Line 125 4 127 6
  615.       Line 121 10 121 11
  616.       Line 121 10 128 10
  617.       Line 6 22 6 31        /* PREV */
  618.       Line 6 22 7 22
  619.       Line 8 26 8 27
  620.       Line 9 25 16 22
  621.       Line 29 22 29 31        /* PLAY */
  622.       Line 29 22 39 26
  623.       Line 52 22 52 31        /* PAUSE */
  624.       Line 52 22 55 22
  625.       Line 59 22 59 31
  626.       Line 59 22 62 22
  627.       Line 75 22 75 31        /* STOP */
  628.       Line 75 22 85 22
  629.       Line 97 22 97 31        /* NEXT */
  630.       Point 97 22
  631.       Line 98 22 105 26
  632.       Line 106 22 106 31
  633.       Line 106 22 107 22
  634.       Line 121 23 124 20    /* EJECT */
  635.       Line 125 20 127 22
  636.       Line 121 26 121 27
  637.       Line 121 26 128 26
  638.  
  639.       DrawMode LIGHTEN 64
  640.       Line 7 5 7 13        /* PREV */
  641.       Line 9 10 16 13
  642.       Line 16 5 16 13
  643.       Point 30 13        /* PLAY */
  644.       Line 31 12 39 9
  645.       Line 53 13 55 13        /* PAUSE */
  646.       Line 55 5 55 13
  647.       Line 60 13 62 13
  648.       Line 62 5 62 13
  649.       Line 76 13 85 13        /* STOP */
  650.       Line 85 5 85 13
  651.       Line 98 13 105 9        /* NEXT */
  652.       Line 107 5 107 13
  653.       Line 122 7 128 7        /* EJECT */
  654.       Line 122 11 128 11
  655.       Line 7 23 7 31        /* PREV */
  656.       Line 9 28 16 31
  657.       Line 16 23 16 31
  658.       Point 30 31        /* PLAY */
  659.       Line 31 30 39 27
  660.       Line 53 31 55 31        /* PAUSE */
  661.       Line 55 23 55 31
  662.       Line 60 31 62 31
  663.       Line 62 23 62 31
  664.       Line 76 31 85 31        /* STOP */
  665.       Line 85 23 85 31
  666.       Line 98 31 105 27        /* NEXT */
  667.       Line 107 23 107 31
  668.       Line 122 23 128 23    /* EJECT */
  669.       Line 122 27 128 27
  670.       DrawMode NORMAL
  671.    END
  672.    fname = 'CBUTTONS.' ; CALL RenderPic
  673.    KillBuffer Force
  674.  
  675.  
  676. /*
  677.  * Equalizer, playlist editor, repeat & shuffle buttons.
  678.  */
  679.  
  680.    CreateBuffer 92 85 Force 255 255 255 New
  681.    LoadBrush '"'||outpath||'_Repeat_Button.IFF"'
  682.    BrushHandle 0 0
  683.    Point 0 0
  684.    Point 0 15
  685.    Point 0 30
  686.    Point 0 45
  687.    LoadBrush '"'||outpath||'_Shuffle_Button.IFF"'
  688.    BrushHandle 0 0
  689.    Point 28 0
  690.    Point 28 15
  691.    Point 28 30
  692.    Point 28 45
  693.    LoadBrush '"'||outpath||'_Equalizer_Button.IFF"'
  694.    BrushHandle 0 0
  695.    Point 0 61
  696.    Point 46 61
  697.    Point 0 73
  698.    Point 46 73
  699.    LoadBrush '"'||outpath||'_Playlist_Editor_Button.IFF"'
  700.    BrushHandle 0 0
  701.    Point 23 61
  702.    Point 69 61
  703.    Point 23 73
  704.    Point 69 73
  705.    KillBrush
  706.    IF PRMBEV ~= 0 THEN DO
  707.       xc=0 ; yc=0 ; xs=28 ; ys=15 ; CALL BBoxU
  708.       xc=0 ; yc=15 ; xs=28 ; ys=15 ; CALL BBoxD
  709.       xc=0 ; yc=30 ; xs=28 ; ys=15 ; CALL BBoxU
  710.       xc=0 ; yc=45 ; xs=28 ; ys=15 ; CALL BBoxD
  711.       xc=28 ; yc=0 ; xs=46 ; ys=15 ; CALL BBoxU
  712.       xc=28 ; yc=15 ; xs=46 ; ys=15 ; CALL BBoxD
  713.       xc=28 ; yc=30 ; xs=46 ; ys=15 ; CALL BBoxU
  714.       xc=28 ; yc=45 ; xs=46 ; ys=15 ; CALL BBoxD
  715.       xc=0 ; yc=61 ; xs=23 ; ys=12 ; CALL BBoxU
  716.       xc=0 ; yc=73 ; xs=23 ; ys=12 ; CALL BBoxU
  717.       xc=23 ; yc=61 ; xs=23 ; ys=12 ; CALL BBoxU
  718.       xc=23 ; yc=73 ; xs=23 ; ys=12 ; CALL BBoxU
  719.       xc=46 ; yc=61 ; xs=23 ; ys=12 ; CALL BBoxD
  720.       xc=46 ; yc=73 ; xs=23 ; ys=12 ; CALL BBoxD
  721.       xc=69 ; yc=61 ; xs=23 ; ys=12 ; CALL BBoxD
  722.       xc=69 ; yc=73 ; xs=23 ; ys=12 ; CALL BBoxD
  723.    END
  724.    ELSE IF PRMHLP ~= 0 THEN DO
  725.       Box 0 0 28 15
  726.       Box 28 15 46 15
  727.       Box 0 30 28 15
  728.       Box 28 45 46 15
  729.       Box 0 61 23 12
  730.       Box 23 73 23 12
  731.       Box 46 61 23 12
  732.       Box 69 73 23 12
  733.    END
  734.    IF PRMLIG ~= 0 THEN DO
  735.       xc=3 ; yc=3 ; xs=5 ; ys=4 ; CALL BBoxDO
  736.       xc=31 ; yc=3 ; xs=5 ; ys=4 ; CALL BBoxDO
  737.       xc=3 ; yc=18 ; xs=5 ; ys=4 ; CALL BBoxDO
  738.       xc=31 ; yc=18 ; xs=5 ; ys=4 ; CALL BBoxDO
  739.       xc=3 ; yc=33 ; xs=5 ; ys=4 ; CALL BBoxDO
  740.       xc=31 ; yc=33 ; xs=5 ; ys=4 ; CALL BBoxDO
  741.       xc=3 ; yc=48 ; xs=5 ; ys=4 ; CALL BBoxDO
  742.       xc=31 ; yc=48 ; xs=5 ; ys=4 ; CALL BBoxDO
  743.       xc=3 ; yc=64 ; xs=5 ; ys=3 ; CALL BBoxDO
  744.       xc=26 ; yc=64 ; xs=5 ; ys=3 ; CALL BBoxDO
  745.       xc=49 ; yc=64 ; xs=5 ; ys=3 ; CALL BBoxDO
  746.       xc=72 ; yc=64 ; xs=5 ; ys=3 ; CALL BBoxDO
  747.       xc=3 ; yc=76 ; xs=5 ; ys=3 ; CALL BBoxDO
  748.       xc=26 ; yc=76 ; xs=5 ; ys=3 ; CALL BBoxDO
  749.       xc=49 ; yc=76 ; xs=5 ; ys=3 ; CALL BBoxDO
  750.       xc=72 ; yc=76 ; xs=5 ; ys=3 ; CALL BBoxDO
  751.       ActiveColor 5
  752.       Box 4 4 3 2
  753.       Box 32 4 3 2
  754.       Box 4 19 3 2
  755.       Box 32 19 3 2
  756.       Line 4 65 6 65
  757.       Line 27 65 29 65
  758.       Line 50 65 52 65
  759.       Line 73 65 75 65
  760.       ActiveColor 4
  761.       Box 4 34 3 2
  762.       Box 32 34 3 2
  763.       Box 4 49 3 2
  764.       Box 32 49 3 2
  765.       Line 4 77 6 77
  766.       Line 27 77 29 77
  767.       Line 50 77 52 77
  768.       Line 73 77 75 77
  769.       ActiveColor 1
  770.    END
  771.    Scissors
  772.    Box 0 0 1 15
  773.    BrushHandle 0 0
  774.    Point 74 0
  775.    Point 74 15
  776.    Point 74 30
  777.    Point 74 45
  778.    fname = 'SHUFREP.' ; CALL RenderPic
  779.    KillBuffer Force
  780.  
  781.  
  782. /*
  783.  * Mono & stereo indicators.
  784.  */
  785.  
  786.    CreateBuffer 58 24 Force 255 255 255 New
  787.    LoadBrush '"'||outpath||'_Stereo_Indicator.IFF"'
  788.    BrushHandle 0 0
  789.    Point 0 0
  790.    Point 0 12
  791.    LoadBrush '"'||outpath||'_Mono_Indicator.IFF"'
  792.    BrushHandle 0 0
  793.    Point 29 0
  794.    Point 29 12
  795.    KillBrush
  796.    IF PRMHLP ~= 0 THEN DO
  797.       Box 0 0 29 12
  798.       Box 29 12 29 12
  799.    END
  800.    fname = 'MONOSTER.' ; CALL RenderPic
  801.    KillBuffer Force
  802.  
  803.  
  804. /*
  805.  * Play, pause & stop indicator lights.
  806.  */
  807.  
  808. IF PRMCPL ~= 0 THEN DO
  809.    CreateBuffer 42 9 Force 0 0 0 New
  810.    ActiveColor 5
  811.    NewArea
  812.    AddArea 4 0
  813.    AddArea 8 4
  814.    AddArea 4 8
  815.    AddArea 4 0
  816.    Poly
  817.    Box 10 2 3 5
  818.    Box 14 2 3 5
  819.    Box 20 2 5 5
  820.    Box 36 0 3 3
  821.    ActiveColor 4
  822.    NewArea
  823.    AddArea 5 2
  824.    AddArea 7 4
  825.    AddArea 5 6
  826.    AddArea 5 2
  827.    FilledPoly
  828.    Box 11 3 1 3
  829.    Box 15 3 1 3
  830.    FilledBox 21 3 3 3
  831.    Point 37 1
  832.    ActiveColor 7
  833.    Box 39 6 3 3
  834.    ActiveColor 6
  835.    Point 40 7
  836.    ActiveColor 0
  837.    fname = 'PLAYPAUS.' ; CALL RenderPic
  838.    KillBuffer Force
  839. END
  840. ELSE IF PRMNUM ~= 0 THEN DO
  841.    CreateBuffer 42 9 Force 255 255 255 New
  842.    ActiveColor 0
  843.    Box 0 0 9 9
  844.    Box 9 0 9 9
  845.    Box 18 0 9 9
  846.    Box 27 0 9 9
  847.    Box 36 0 3 9
  848.    Box 39 0 3 9
  849.    fname = 'PLAYPAUS.' ; CALL RenderPic
  850.    KillBuffer Force
  851. END
  852.  
  853.  
  854. /*
  855.  * Text fonts.
  856.  */
  857.  
  858. IF PRMNUM ~= 0 THEN DO
  859.    CreateBuffer 155 18 Force 255 255 255 New
  860.    ActiveColor 0
  861.    i = 0
  862.    DO UNTIL i = 155
  863.       Box i 0 5 6
  864.       Box i 6 5 6
  865.       Box i 12 5 6
  866.       i = i + 5
  867.    END
  868.    fname = 'TEXT.' ; CALL RenderPic
  869.    KillBuffer Force
  870. END
  871.  
  872.  
  873. /*
  874.  * Timer numbers.
  875.  */
  876.  
  877. IF PRMCNU ~= 0 THEN DO
  878.    CreateBuffer 99 13 Force 0 0 0 New
  879.    ActiveColor 3
  880.    Box 2 0 5 1        /* 0 */
  881.    Box 0 2 1 3
  882.    Box 8 2 1 3
  883.    Box 0 8 1 3
  884.    Box 8 8 1 3
  885.    Box 2 12 5 1
  886.    Box 17 2 1 3        /* 1 */
  887.    Box 17 8 1 3
  888.    Box 20 0 5 1        /* 2 */
  889.    Box 26 2 1 3
  890.    Box 20 6 5 1
  891.    Box 18 8 1 3
  892.    Box 20 12 5 1
  893.    Box 29 0 5 1        /* 3 */
  894.    Box 35 2 1 3
  895.    Box 29 6 5 1
  896.    Box 35 8 1 3
  897.    Box 29 12 5 1
  898.    Box 36 2 1 3        /* 4 */
  899.    Box 44 2 1 3
  900.    Box 38 6 5 1
  901.    Box 44 8 1 3
  902.    Box 47 0 5 1        /* 5 */
  903.    Box 45 2 1 3
  904.    Box 47 6 5 1
  905.    Box 53 8 1 3
  906.    Box 47 12 5 1
  907.    Box 56 0 5 1        /* 6 */
  908.    Box 54 2 1 3
  909.    Box 56 6 5 1
  910.    Box 54 8 1 3
  911.    Box 62 8 1 3
  912.    Box 56 12 5 1
  913.    Box 65 0 5 1        /* 7 */
  914.    Box 71 2 1 3
  915.    Box 71 8 1 3
  916.    Box 74 0 5 1        /* 8 */
  917.    Box 72 2 1 3
  918.    Box 80 2 1 3
  919.    Box 74 6 5 1
  920.    Box 72 8 1 3
  921.    Box 80 8 1 3
  922.    Box 74 12 5 1
  923.    Box 83 0 5 1        /* 9 */
  924.    Box 81 2 1 3
  925.    Box 89 2 1 3
  926.    Box 83 6 5 1
  927.    Box 89 8 1 3
  928.    Box 83 12 5 1
  929.    Box 92 0 5 1        /* "0" */
  930.    Box 90 2 1 3
  931.    Box 98 2 1 3
  932.    Box 90 8 1 3
  933.    Box 98 8 1 3
  934.    Box 92 12 5 1
  935.    fname = 'NUMBERS.' ; CALL RenderPic
  936.    KillBuffer Force
  937. END
  938. ELSE IF PRMNUM ~= 0 THEN DO
  939.    CreateBuffer 99 13 Force 255 255 255 New
  940.    ActiveColor 0
  941.    i = 0
  942.    DO UNTIL i = 90
  943.       Box i 0 9 13
  944.       i = i + 9
  945.    END
  946.    Box 19 6 6 1
  947.    fname = 'NUMBERS.' ; CALL RenderPic
  948.    KillBuffer Force
  949. END
  950.  
  951.  
  952. /*
  953.  * Delete temporary images.
  954.  */
  955.  
  956. IF PRMDEL ~= 0 THEN DO
  957.    ADDRESS COMMAND 'Delete "'||outpath||'_Main_Image.IFF"'
  958.    ADDRESS COMMAND 'Delete "'||outpath||'_Clutterbar.IFF"'
  959.    ADDRESS COMMAND 'Delete "'||outpath||'_Titlebar.IFF"'
  960.    ADDRESS COMMAND 'Delete "'||outpath||'_Mono_Indicator.IFF"'
  961.    ADDRESS COMMAND 'Delete "'||outpath||'_Stereo_Indicator.IFF"'
  962.    ADDRESS COMMAND 'Delete "'||outpath||'_Volume_Slider.IFF"'
  963.    ADDRESS COMMAND 'Delete "'||outpath||'_Equalizer_Button.IFF"'
  964.    ADDRESS COMMAND 'Delete "'||outpath||'_Playlist_Editor_Button.IFF"'
  965.    ADDRESS COMMAND 'Delete "'||outpath||'_Position_Bar.IFF"'
  966.    ADDRESS COMMAND 'Delete "'||outpath||'_Play_Control_Buttons.IFF"'
  967.    ADDRESS COMMAND 'Delete "'||outpath||'_Eject_Button.IFF"'
  968.    ADDRESS COMMAND 'Delete "'||outpath||'_Shuffle_Button.IFF"'
  969.    ADDRESS COMMAND 'Delete "'||outpath||'_Repeat_Button.IFF"'
  970. END
  971.  
  972.  
  973. BREAK_C:
  974.    RequestNotify 'Script completed!'
  975.  
  976. ERROR:
  977.    ActiveColor oldcol
  978.    SetPalette 7 oldpal7
  979.    SetPalette 6 oldpal6
  980.    SetPalette 5 oldpal5
  981.    SetPalette 4 oldpal4
  982.    SetPalette 3 oldpal3
  983.    SetPalette 2 oldpal2
  984.    SetPalette 1 oldpal1
  985.    SetPalette 0 oldpal0
  986.    Pen oldpen
  987.    DrawTool oldtool
  988.    DrawMode oldmode
  989.    DrawStyle oldstyle
  990.    FillMode oldfill
  991.  
  992. Undo On
  993. UnlockGui
  994. UnlockInput
  995.  
  996. EXIT
  997.  
  998.  
  999.  
  1000. BBoxUO:
  1001.    DrawMode DARKEN BEV
  1002.    Point xc+xs-1 yc+ys-1
  1003.    Point xc+xs-2 yc+ys-1
  1004.    Point xc+xs-1 yc+ys-2
  1005.    DrawTool FREELINE
  1006.    Line xc+xs-1 yc xc+xs-1 yc+ys-1
  1007.    Line xc+xs-1 yc+ys-1 xc yc+ys-1
  1008.    DrawTool FREEDRAW
  1009.    DrawMode LIGHTEN BEV
  1010.    Point xc yc
  1011.    Point xc+1 yc
  1012.    Point xc yc+1
  1013.    DrawTool FREELINE
  1014.    Line xc yc+ys-1 xc yc
  1015.    Line xc yc xc+xs-1 yc
  1016.    DrawTool FREEDRAW
  1017.    DrawMode NORMAL
  1018.    Return 0
  1019.  
  1020. BBoxU:
  1021.    DrawMode DARKEN BEV
  1022.    Point xc+xs-1 yc+ys-2
  1023.    Point xc+xs-2 yc+ys-2
  1024.    Point xc+xs-2 yc+ys-2
  1025.    Point xc+xs-2 yc+ys-2
  1026.    Point xc+xs-2 yc+ys-1
  1027.    DrawTool FREELINE
  1028.    Line xc+xs-1 yc+1 xc+xs-1 yc+ys-2
  1029.    Line xc+1 yc+ys-1 xc+xs-2 yc+ys-1
  1030.    DrawTool FREEDRAW
  1031.    DrawMode LIGHTEN BEV
  1032.    Point xc+1 yc+ys-2
  1033.    Point xc yc+1
  1034.    Point xc+1 yc+1
  1035.    Point xc+1 yc+1
  1036.    Point xc+1 yc+1
  1037.    Point xc+1 yc
  1038.    Point xc+xs-2 yc+1
  1039.    DrawTool FREELINE
  1040.    Line xc yc+1 xc yc+ys-2
  1041.    Line xc+1 yc xc+xs-2 yc
  1042.    DrawTool FREEDRAW
  1043.    DrawMode NORMAL
  1044.    Return 0
  1045.  
  1046.  
  1047. BBoxDO:
  1048.    DrawMode DARKEN BEV
  1049.    Point xc yc
  1050.    Point xc+1 yc
  1051.    Point xc yc+1
  1052.    DrawTool FREELINE
  1053.    Line xc yc+ys-1 xc yc
  1054.    Line xc yc xc+xs-1 yc
  1055.    DrawTool FREEDRAW
  1056.    DrawMode LIGHTEN BEV
  1057.    Point xc+xs-1 yc+ys-1
  1058.    Point xc+xs-2 yc+ys-1
  1059.    Point xc+xs-1 yc+ys-2
  1060.    DrawTool FREELINE
  1061.    Line xc+xs-1 yc xc+xs-1 yc+ys-1
  1062.    Line xc+xs-1 yc+ys-1 xc yc+ys-1
  1063.    DrawTool FREEDRAW
  1064.    DrawMode NORMAL
  1065.    Return 0
  1066.  
  1067. BBoxD:
  1068.    DrawMode DARKEN BEV
  1069.    Point xc+1 yc+ys-2
  1070.    Point xc yc+1
  1071.    Point xc+1 yc+1
  1072.    Point xc+1 yc+1
  1073.    Point xc+1 yc+1
  1074.    Point xc+1 yc
  1075.    Point xc+xs-2 yc+1
  1076.    DrawTool FREELINE
  1077.    Line xc yc+1 xc yc+ys-2
  1078.    Line xc+1 yc xc+xs-2 yc
  1079.    DrawTool FREEDRAW
  1080.    DrawMode LIGHTEN BEV
  1081.    Point xc+xs-1 yc+ys-2
  1082.    Point xc+xs-2 yc+ys-2
  1083.    Point xc+xs-2 yc+ys-2
  1084.    Point xc+xs-2 yc+ys-2
  1085.    Point xc+xs-2 yc+ys-1
  1086.    DrawTool FREELINE
  1087.    Line xc+xs-1 yc+1 xc+xs-1 yc+ys-2
  1088.    Line xc+1 yc+ys-1 xc+xs-2 yc+ys-1
  1089.    DrawTool FREEDRAW
  1090.    DrawMode NORMAL
  1091.    Return 0
  1092.  
  1093.  
  1094. RenderPic:
  1095.    IF PRMAGA ~= 0 THEN DO
  1096.       Render Go
  1097.       SaveRenderedAs fform '"'||outpath||fname||fsuf||'"' jpgq Force
  1098.       Render Close
  1099.    END
  1100.    ELSE DO
  1101.       SaveBufferAs fform '"'||outpath||fname||fsuf||'"' jpgq Force
  1102.    END
  1103.    Return 0
  1104.