home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Src / Win32Api / RGBQUAD.java < prev    next >
Encoding:
Java Source  |  1998-03-05  |  861 b   |  31 lines

  1. // Copyright (C) 1997 Microsoft Corporation  All Rights Reserved
  2.  
  3. // These classes provide direct, low-overhead access to commonly used
  4. // Windows api. These classes use the new J/Direct feature.
  5. //
  6. // Information on how to use J/Direct to write your own declarations
  7. // can be found in the Microsoft SDK for Java 2.0.
  8.  
  9. package com.ms.win32;
  10.  
  11. /** @dll.struct() */
  12. public class RGBQUAD {
  13.         public byte rgbBlue;
  14.         public byte rgbGreen;
  15.         public byte rgbRed;
  16.         public byte rgbReserved;
  17.  
  18.         public static int   getBlue( int rgbQuad ) {
  19.             return( rgbQuad & 0xff );
  20.         }
  21.  
  22.         public static int   getGreen( int rgbQuad ) {
  23.             return( (rgbQuad >> 8) & 0xff );
  24.         }
  25.  
  26.         public static int   getRed( int rgbQuad ) {
  27.             return( (rgbQuad >> 16) & 0xff );
  28.         }
  29. }
  30.  
  31.