home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Painting / DP_EXTRA.LZX / DPaintV.2_EXTRAS / Macros / Bevel.dprx next >
Encoding:
Text File  |  1995-11-01  |  1.9 KB  |  79 lines

  1. /*  DPaint Beveled Edge Macro By Doug Shannon
  2.  *  (c) 1994 Electronic Arts
  3.  *
  4.  *   Paints a beveled edge effect with your current brush
  5.  *
  6.  *   To Use:
  7.  *       Position your brush in the position where you want the
  8.  *       To occur. Execute the Macro from the keyboard.
  9.  *
  10.  *   How It Works:
  11.  *       This Macro uses Translucency to draw the highlights
  12.  *       (with white), and shadows (with black) over the original.
  13.  *       It then stamps the original in the middle
  14.  */
  15. level=50  /* This number is the amount of Translucency to use          *
  16.            * The lower  the number, the closer to solid the highlights *
  17.            * and shadows will be. In low color modes, use a level of 1 *
  18.            * and make sure that you have colors close to white and     *
  19.            * black in your palette.                                    */
  20.  
  21. BevX=1    /* This number is the amount of Bevel for X (in pixels)      */
  22. BevY=1    /* This number is the amount of Bevel for Y (in Pixels)      */
  23.           /* You can adjust the X and Y independently for resolutions  *
  24.            * other than 1:1.  To make the bevel inward, change these   *
  25.            * numbers to negatives.                                     */
  26.  
  27. Address Dpaint.1
  28. options results
  29.  
  30. screentofront
  31.  
  32. /* Memorize current X and Y coords */
  33. getcoord x
  34. mx=result
  35. getcoord y
  36. my=result
  37.  
  38. lockgui
  39.  
  40. /* Setup */
  41.  
  42. Dotted
  43. Matte
  44.  
  45. /* Paint Base Originals */
  46. Translucency OFF
  47. MoveTo (mx-bevx) (my-bevy)
  48. LeftMouse click
  49. MoveTo (mx) (my)
  50. LeftMouse Click
  51. MoveTo (mx+bevx) (my+bevy)
  52. LeftMouse click
  53.  
  54.  
  55. /* Paint Highlights */
  56. SetTranslucency level
  57. Translucency On
  58. Color
  59. ClosestColor 255 255 255
  60. SetFGColor RESULT
  61. MoveTo (mx-bevx) (my-bevy)
  62. LeftMouse Click
  63.  
  64. /* Paint Shadows */
  65. ClosestColor 0 0 0
  66. SetFGColor RESULT
  67. MoveTo (mx+bevx) (my+bevy)
  68. LeftMouse Click
  69.  
  70. /* Paint Original (centered) */
  71. Matte
  72. Translucency Off
  73. Moveto (mx) (my)
  74. LeftMouse Click
  75.  
  76.  
  77. unlockgui
  78.  
  79.