Exemplo n.º 1
0
        /*! \brief Sets and returns the closest GCOL for a palette entry.
         * \param [in] paletteEntry A palette entry in the form 0xBBGGRR00.
         * \param [in] gcolAction The GCOL action.
         * \return The closest GCOL that was set.  */
        public static int SetGCOL(uint paletteEntry,
                                  OS.GCOLAction gcolAction)
        {
            int gcol, log2bpp;

            NativeMethods.ColourTrans_SetGCOL(paletteEntry,
                                              0,
                                              gcolAction,
                                              out gcol,
                                              out log2bpp);
            return(gcol);
        }
Exemplo n.º 2
0
        /*! \brief Changes the foreground or background colour to a GCOL number.
         * \param [in] gcol GCOL number.
         * \param [in] gcolAction GCOL action.
         * \param [in] background \e true to set the background colour instead of the foreground.
         * \param [in] text \e true to set the text colour instead of the graphics colour.
         * \return Nothing.  */
        public static void SetColour(int gcol,
                                     OS.GCOLAction gcolAction,
                                     bool background,
                                     bool text)
        {
            int flags = 0;

            if (background)
            {
                flags |= (1 << 7);
            }
            if (text)
            {
                flags |= (1 << 9);
            }
            NativeMethods.ColourTrans_SetColour(gcol, flags, gcolAction);
        }
Exemplo n.º 3
0
 /*! \brief Changes the foreground colour to a GCOL number.
  * \param [in] gcol GCOL number.
  * \param [in] gcolAction GCOL action.
  * \return Nothing.  */
 public static void SetColour(int gcol, OS.GCOLAction gcolAction)
 {
     SetColour(gcol, gcolAction, false, false);
 }
Exemplo n.º 4
0
 internal static extern void ColourTrans_SetOppGCOL(uint paletteEntry,
                                                    uint flags,
                                                    OS.GCOLAction gcolAction,
                                                    out int gcolOut,
                                                    out int log2BppOut);
Exemplo n.º 5
0
 internal static extern void ColourTrans_SetColour(int gcol,
                                                   int flags,
                                                   OS.GCOLAction gcolAction);