home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1999 November / SOTMC_Nov1999-Ultimate.iso / mac / REALbasic ƒ / Plugins / Plugins SDK / gfxplugin.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-11-25  |  539 b   |  23 lines  |  [TEXT/CWIE]

  1. #include "rb_plugin.h"
  2.  
  3. static void HighlightRect(REALgraphics context, int left, int top, int width, int height)
  4. {
  5.     Rect r;
  6.  
  7.     REALSelectGraphics(context);
  8.     SetRect(&r, left, top, left + width, top + height);
  9.     LMSetHiliteMode(LMGetHiliteMode() & 127);
  10.     InvertRect(&r);
  11. }
  12.  
  13. REALmethodDefinition HighlightRectDefn = {
  14.     (REALproc) HighlightRect,
  15.     REALnoImplementation,
  16.     "HighlightRect(g As Graphics, left as integer, top as integer, width as integer, height as integer)"
  17. };
  18.  
  19. void PluginEntry(void)
  20. {
  21.     REALRegisterMethod(&HighlightRectDefn);
  22. }
  23.