dlgcol.cpp File Reference

(r1785/r751)

#include "camtypes.h"
#include "dlgcol.h"

Go to the source code of this file.

Defines

#define new   CAM_DEBUG_NEW

Functions

static void GetOSColour (DocColour *Col, wxSystemColour ColID)
 Given a Windows COLORREF colour word, creates an equivalent DocColour.


Define Documentation

#define new   CAM_DEBUG_NEW
 

Definition at line 111 of file dlgcol.cpp.


Function Documentation

static void GetOSColour DocColour Col,
wxSystemColour  ColID
[static]
 

Given a Windows COLORREF colour word, creates an equivalent DocColour.

static void GetOSColour(DocColour *Col, INT32 ColID)

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/11/94
Parameters:
Col - DocColour to be set [INPUTS] ColID - Windows ID of the system colour to be read (cf GetSysColor)
Col is filled in with an appropriate definition for the colour [OUTPUTS]
Notes: This method may check for specific values and tweak them to get better results from GRenderRegions (e.g. GDraw gives a less noticable dither for RGB(191,191,191) than for (192,192,192), as it cannot exactly match that RGB value- this is the default WIndows background grey, so it is important to match it as closely as possible

Scope: private (to dlgcol.cpp)

Definition at line 170 of file dlgcol.cpp.

00171 {
00172     wxColour ColDef = wxSystemSettings::GetColour(ColID);
00173     
00174     if (ColDef == wxColour(192, 192, 192))
00175     {
00176         *Col = DocColour(191, 191, 191);
00177 
00178         Col->SetSeparable(FALSE);   // UI colours should not colour-separate
00179         return;
00180     }
00181     
00182     *Col = DocColour((INT32) ColDef.Red(),
00183                      (INT32) ColDef.Green(),
00184                      (INT32) ColDef.Blue());
00185 
00186     Col->SetSeparable(FALSE);       // UI colours should not colour-separate
00187 }


Generated on Sat Nov 10 03:49:30 2007 for Camelot by  doxygen 1.4.4