home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Goodies / REAL Software / REALbasic Plug-ins SDK / Examples / obsolete / Gfxplugin / gfxplugin.cpp next >
Encoding:
C/C++ Source or Header  |  1998-11-25  |  539 b   |  23 lines

  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.