wxPalette unified. Source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,3 +1,14 @@
|
|||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
%% Name: palette.tex
|
||||||
|
%% Purpose: wxPalette docs
|
||||||
|
%% Author:
|
||||||
|
%% Modified by:
|
||||||
|
%% Created:
|
||||||
|
%% RCS-ID: $Id$
|
||||||
|
%% Copyright: (c) wxWidgets
|
||||||
|
%% License: wxWindows license
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
\section{\class{wxPalette}}\label{wxpalette}
|
\section{\class{wxPalette}}\label{wxpalette}
|
||||||
|
|
||||||
A palette is a table that maps pixel values to RGB colours. It allows the colours
|
A palette is a table that maps pixel values to RGB colours. It allows the colours
|
||||||
@@ -100,8 +111,8 @@ Returns number of entries in palette.
|
|||||||
|
|
||||||
\membersection{wxPalette::GetPixel}\label{wxpalettegetpixel}
|
\membersection{wxPalette::GetPixel}\label{wxpalettegetpixel}
|
||||||
|
|
||||||
\constfunc{int}{GetPixel}{\param{const unsigned char }{red}, \param{const unsigned char }{green},\rtfsp
|
\constfunc{int}{GetPixel}{\param{unsigned char }{red}, \param{unsigned char }{green},\rtfsp
|
||||||
\param{const unsigned char }{blue}}
|
\param{unsigned char }{blue}}
|
||||||
|
|
||||||
Returns a pixel value (index into the palette) for the given RGB values.
|
Returns a pixel value (index into the palette) for the given RGB values.
|
||||||
|
|
||||||
@@ -115,7 +126,7 @@ Returns a pixel value (index into the palette) for the given RGB values.
|
|||||||
|
|
||||||
\wxheading{Return value}
|
\wxheading{Return value}
|
||||||
|
|
||||||
The nearest palette index.
|
The nearest palette index or {\tt wxNOT\_FOUND} for unexpected errors.
|
||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
|
|
||||||
@@ -177,5 +188,3 @@ fail the test.
|
|||||||
|
|
||||||
Inequality operator. Two palettes are not equal if they contain pointers
|
Inequality operator. Two palettes are not equal if they contain pointers
|
||||||
to different underlying palette data. It does not compare each attribute.
|
to different underlying palette data. It does not compare each attribute.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.h
|
// Name: wx/generic/paletteg.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Created: 01/02/97
|
||||||
// Id:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling and Julian Smart
|
// Copyright: (c) 1998 Robert Roebling and Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -43,7 +43,7 @@ class WXDLLIMPEXP_CORE wxPalette: public wxPaletteBase
|
|||||||
virtual bool Ok() const;
|
virtual bool Ok() const;
|
||||||
|
|
||||||
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
int GetPixel( const unsigned char red, const unsigned char green, const unsigned char blue ) const;
|
int GetPixel( unsigned char red, unsigned char green, unsigned char blue ) const;
|
||||||
bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const;
|
bool GetRGB( int pixel, unsigned char *red, unsigned char *green, unsigned char *blue ) const;
|
||||||
|
|
||||||
// no data
|
// no data
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.h
|
// Name: wx/mac/carbon/palette.h
|
||||||
// Purpose: wxPalette class
|
// Purpose: wxPalette class
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
~wxPalette();
|
~wxPalette();
|
||||||
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
|
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||||
|
|
||||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.h
|
// Name: wx/mac/classic/palette.h
|
||||||
// Purpose: wxPalette class
|
// Purpose: wxPalette class
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
~wxPalette();
|
~wxPalette();
|
||||||
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
|
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||||
|
|
||||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.h
|
// Name: wx/mgl/palette.h
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Vaclav Slavik
|
// Author: Vaclav Slavik
|
||||||
// Created: 2001/03/11
|
// Created: 2001/03/11
|
||||||
@@ -42,7 +42,7 @@ public:
|
|||||||
virtual bool Ok() const;
|
virtual bool Ok() const;
|
||||||
|
|
||||||
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
|
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.h
|
// Name: wx/motif/palette.h
|
||||||
// Purpose: wxPalette class
|
// Purpose: wxPalette class
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
~wxPalette();
|
~wxPalette();
|
||||||
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
|
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||||
|
|
||||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.h
|
// Name: wx/msw/palette.h
|
||||||
// Purpose: wxPalette class
|
// Purpose: wxPalette class
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -39,7 +39,7 @@ public:
|
|||||||
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
~wxPalette(void);
|
~wxPalette(void);
|
||||||
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
|
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||||
|
|
||||||
virtual bool Ok(void) const { return (m_refData != NULL) ; }
|
virtual bool Ok(void) const { return (m_refData != NULL) ; }
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.h
|
// Name: wx/os2/palette.h
|
||||||
// Purpose: wxPalette class
|
// Purpose: wxPalette class
|
||||||
// Author: David Webster
|
// Author: David Webster
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -50,9 +50,9 @@ public:
|
|||||||
,const unsigned char* pGreen
|
,const unsigned char* pGreen
|
||||||
,const unsigned char* pBlue
|
,const unsigned char* pBlue
|
||||||
);
|
);
|
||||||
int GetPixel( const unsigned char cRed
|
int GetPixel( unsigned char cRed
|
||||||
,const unsigned char cGreen
|
,unsigned char cGreen
|
||||||
,const unsigned char cBlue
|
,unsigned char cBlue
|
||||||
) const;
|
) const;
|
||||||
bool GetRGB( int nPixel
|
bool GetRGB( int nPixel
|
||||||
,unsigned char* pRed
|
,unsigned char* pRed
|
||||||
@@ -77,4 +77,3 @@ public:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_PALETTE_H_
|
// _WX_PALETTE_H_
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#include "wx/object.h"
|
#include "wx/object.h"
|
||||||
#include "wx/gdiobj.h"
|
#include "wx/gdiobj.h"
|
||||||
|
|
||||||
// wxBrushBase
|
// wxPaletteBase
|
||||||
class WXDLLEXPORT wxPaletteBase: public wxGDIObject
|
class WXDLLEXPORT wxPaletteBase: public wxGDIObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@@ -39,7 +39,7 @@ public:
|
|||||||
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
~wxPalette(void);
|
~wxPalette(void);
|
||||||
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
|
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||||
|
|
||||||
virtual bool Ok(void) const { return (m_refData != NULL) ; }
|
virtual bool Ok(void) const { return (m_refData != NULL) ; }
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.h
|
// Name: wx/x11/palette.h
|
||||||
// Purpose: wxPalette class
|
// Purpose: wxPalette class
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
~wxPalette();
|
~wxPalette();
|
||||||
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
|
||||||
int GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const;
|
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||||
|
|
||||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Created: 01/02/97
|
// Created: 01/02/97
|
||||||
// Id:
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Robert Roebling and Julian Smart
|
// Copyright: (c) 1998 Robert Roebling and Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -120,11 +120,11 @@ bool wxPalette::Create(int n,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetPixel( const unsigned char red,
|
int wxPalette::GetPixel( unsigned char red,
|
||||||
const unsigned char green,
|
unsigned char green,
|
||||||
const unsigned char blue ) const
|
unsigned char blue ) const
|
||||||
{
|
{
|
||||||
if (!m_refData) return false;
|
if (!m_refData) return wxNOT_FOUND;
|
||||||
|
|
||||||
int closest = 0;
|
int closest = 0;
|
||||||
double d,distance = 1000.0; // max. dist is 256
|
double d,distance = 1000.0; // max. dist is 256
|
||||||
@@ -158,5 +158,3 @@ bool wxPalette::GetRGB(int pixel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_PALETTE
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.cpp
|
// Name: src/mac/carbon/palette.cpp
|
||||||
// Purpose: wxPalette
|
// Purpose: wxPalette
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 1998-01-01
|
// Created: 1998-01-01
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
@@ -52,29 +52,29 @@ wxPalette::~wxPalette()
|
|||||||
bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
|
bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
|
||||||
{
|
{
|
||||||
UnRef();
|
UnRef();
|
||||||
|
|
||||||
m_refData = new wxPaletteRefData;
|
m_refData = new wxPaletteRefData;
|
||||||
|
|
||||||
M_PALETTEDATA->m_count = n ;
|
M_PALETTEDATA->m_count = n ;
|
||||||
M_PALETTEDATA->m_palette = new wxColour[n] ;
|
M_PALETTEDATA->m_palette = new wxColour[n] ;
|
||||||
|
|
||||||
for ( int i = 0 ; i < n ; ++i)
|
for ( int i = 0 ; i < n ; ++i)
|
||||||
{
|
{
|
||||||
M_PALETTEDATA->m_palette[i].Set( red[i] , green[i] , blue[i] ) ;
|
M_PALETTEDATA->m_palette[i].Set( red[i] , green[i] , blue[i] ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
int wxPalette::GetPixel(unsigned char red, unsigned char green, unsigned char blue) const
|
||||||
{
|
{
|
||||||
if ( !m_refData )
|
if ( !m_refData )
|
||||||
return -1;
|
return wxNOT_FOUND;
|
||||||
|
|
||||||
long bestdiff = 3 * 256 ;
|
long bestdiff = 3 * 256 ;
|
||||||
long bestpos = 0 ;
|
long bestpos = 0 ;
|
||||||
long currentdiff ;
|
long currentdiff ;
|
||||||
|
|
||||||
for ( int i = 0 ; i < M_PALETTEDATA->m_count ; ++i )
|
for ( int i = 0 ; i < M_PALETTEDATA->m_count ; ++i )
|
||||||
{
|
{
|
||||||
const wxColour& col = M_PALETTEDATA->m_palette[i] ;
|
const wxColour& col = M_PALETTEDATA->m_palette[i] ;
|
||||||
@@ -84,29 +84,28 @@ int wxPalette::GetPixel(const unsigned char red, const unsigned char green, cons
|
|||||||
bestdiff = currentdiff ;
|
bestdiff = currentdiff ;
|
||||||
bestpos = i ;
|
bestpos = i ;
|
||||||
if ( bestdiff == 0 )
|
if ( bestdiff == 0 )
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return bestpos;
|
return bestpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
|
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
|
||||||
{
|
{
|
||||||
if ( !m_refData )
|
if ( !m_refData )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if (index < 0 || index >= M_PALETTEDATA->m_count)
|
if (index < 0 || index >= M_PALETTEDATA->m_count)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
const wxColour& col = M_PALETTEDATA->m_palette[index] ;
|
const wxColour& col = M_PALETTEDATA->m_palette[index] ;
|
||||||
*red = col.Red() ;
|
*red = col.Red() ;
|
||||||
*green = col.Green() ;
|
*green = col.Green() ;
|
||||||
*blue = col.Blue() ;
|
*blue = col.Blue() ;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_PALETTE
|
// wxUSE_PALETTE
|
||||||
|
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.cpp
|
// Name: src/mac/classic/palette.cpp
|
||||||
// Purpose: wxPalette
|
// Purpose: wxPalette
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 1998-01-01
|
// Created: 1998-01-01
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Stefan Csomor
|
// Copyright: (c) Stefan Csomor
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
@@ -52,29 +52,29 @@ wxPalette::~wxPalette()
|
|||||||
bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
|
bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
|
||||||
{
|
{
|
||||||
UnRef();
|
UnRef();
|
||||||
|
|
||||||
m_refData = new wxPaletteRefData;
|
m_refData = new wxPaletteRefData;
|
||||||
|
|
||||||
M_PALETTEDATA->m_count = n ;
|
M_PALETTEDATA->m_count = n ;
|
||||||
M_PALETTEDATA->m_palette = new wxColour[n] ;
|
M_PALETTEDATA->m_palette = new wxColour[n] ;
|
||||||
|
|
||||||
for ( int i = 0 ; i < n ; ++i)
|
for ( int i = 0 ; i < n ; ++i)
|
||||||
{
|
{
|
||||||
M_PALETTEDATA->m_palette[i].Set( red[i] , green[i] , blue[i] ) ;
|
M_PALETTEDATA->m_palette[i].Set( red[i] , green[i] , blue[i] ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
int wxPalette::GetPixel(unsigned char red, unsigned char green, unsigned char blue) const
|
||||||
{
|
{
|
||||||
if ( !m_refData )
|
if ( !m_refData )
|
||||||
return -1;
|
return wxNOT_FOUND;
|
||||||
|
|
||||||
long bestdiff = 3 * 256 ;
|
long bestdiff = 3 * 256 ;
|
||||||
long bestpos = 0 ;
|
long bestpos = 0 ;
|
||||||
long currentdiff ;
|
long currentdiff ;
|
||||||
|
|
||||||
for ( int i = 0 ; i < M_PALETTEDATA->m_count ; ++i )
|
for ( int i = 0 ; i < M_PALETTEDATA->m_count ; ++i )
|
||||||
{
|
{
|
||||||
const wxColour& col = &M_PALETTEDATA->m_palette[i] ;
|
const wxColour& col = &M_PALETTEDATA->m_palette[i] ;
|
||||||
@@ -84,29 +84,28 @@ int wxPalette::GetPixel(const unsigned char red, const unsigned char green, cons
|
|||||||
bestdiff = currentdiff ;
|
bestdiff = currentdiff ;
|
||||||
bestpos = i ;
|
bestpos = i ;
|
||||||
if ( bestdiff == 0 )
|
if ( bestdiff == 0 )
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return bestpos;
|
return bestpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
|
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
|
||||||
{
|
{
|
||||||
if ( !m_refData )
|
if ( !m_refData )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if (index < 0 || index >= M_PALETTEDATA->m_count)
|
if (index < 0 || index >= M_PALETTEDATA->m_count)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
const wxColour& col = &M_PALETTEDATA->m_palette[index] ;
|
const wxColour& col = &M_PALETTEDATA->m_palette[index] ;
|
||||||
*red = col.Red() ;
|
*red = col.Red() ;
|
||||||
*green = col.Green() ;
|
*green = col.Green() ;
|
||||||
*blue = col.Blue() ;
|
*blue = col.Blue() ;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// wxUSE_PALETTE
|
// wxUSE_PALETTE
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.cpp
|
// Name: src/mgl/palette.cpp
|
||||||
// Author: Vaclav Slavik
|
// Author: Vaclav Slavik
|
||||||
// Created: 2001/03/11
|
// Created: 2001/03/11
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
@@ -27,7 +27,7 @@ class wxPaletteRefData: public wxObjectRefData
|
|||||||
public:
|
public:
|
||||||
wxPaletteRefData(void);
|
wxPaletteRefData(void);
|
||||||
~wxPaletteRefData(void);
|
~wxPaletteRefData(void);
|
||||||
|
|
||||||
int m_count;
|
int m_count;
|
||||||
palette_t *m_entries;
|
palette_t *m_entries;
|
||||||
};
|
};
|
||||||
@@ -92,13 +92,13 @@ bool wxPalette::Ok(void) const
|
|||||||
|
|
||||||
bool wxPalette::Create(int n,
|
bool wxPalette::Create(int n,
|
||||||
const unsigned char *red,
|
const unsigned char *red,
|
||||||
const unsigned char *green,
|
const unsigned char *green,
|
||||||
const unsigned char *blue)
|
const unsigned char *blue)
|
||||||
{
|
{
|
||||||
UnRef();
|
UnRef();
|
||||||
m_refData = new wxPaletteRefData();
|
m_refData = new wxPaletteRefData();
|
||||||
|
|
||||||
M_PALETTEDATA->m_count = n;
|
M_PALETTEDATA->m_count = n;
|
||||||
M_PALETTEDATA->m_entries = new palette_t[n];
|
M_PALETTEDATA->m_entries = new palette_t[n];
|
||||||
|
|
||||||
palette_t *e = M_PALETTEDATA->m_entries;
|
palette_t *e = M_PALETTEDATA->m_entries;
|
||||||
@@ -110,17 +110,17 @@ bool wxPalette::Create(int n,
|
|||||||
e->alpha = 0;
|
e->alpha = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetPixel(const unsigned char red,
|
int wxPalette::GetPixel(unsigned char red,
|
||||||
const unsigned char green,
|
unsigned char green,
|
||||||
const unsigned char blue) const
|
unsigned char blue) const
|
||||||
{
|
{
|
||||||
if (!m_refData) return FALSE;
|
if (!m_refData) return wxNOT_FOUND;
|
||||||
|
|
||||||
int closest = 0;
|
int closest = 0;
|
||||||
double d,distance = 1000.0; // max. dist is 256
|
double d, distance = 1000.0; // max. dist is 256
|
||||||
|
|
||||||
palette_t *e = M_PALETTEDATA->m_entries;
|
palette_t *e = M_PALETTEDATA->m_entries;
|
||||||
for (int i = 0; i < M_PALETTEDATA->m_count; i++, e++)
|
for (int i = 0; i < M_PALETTEDATA->m_count; i++, e++)
|
||||||
@@ -132,33 +132,33 @@ int wxPalette::GetPixel(const unsigned char red,
|
|||||||
closest = i;
|
closest = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return closest;
|
|
||||||
|
return closest;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPalette::GetRGB(int pixel,
|
bool wxPalette::GetRGB(int pixel,
|
||||||
unsigned char *red,
|
unsigned char *red,
|
||||||
unsigned char *green,
|
unsigned char *green,
|
||||||
unsigned char *blue) const
|
unsigned char *blue) const
|
||||||
{
|
{
|
||||||
if (!m_refData) return FALSE;
|
if (!m_refData) return false;
|
||||||
if (pixel >= M_PALETTEDATA->m_count) return FALSE;
|
if (pixel >= M_PALETTEDATA->m_count) return false;
|
||||||
|
|
||||||
palette_t& p = M_PALETTEDATA->m_entries[pixel];
|
palette_t& p = M_PALETTEDATA->m_entries[pixel];
|
||||||
if (red) *red = p.red;
|
if (red) *red = p.red;
|
||||||
if (green) *green = p.green;
|
if (green) *green = p.green;
|
||||||
if (blue) *blue = p.blue;
|
if (blue) *blue = p.blue;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetColoursCount() const
|
int wxPalette::GetColoursCount() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), 0, wxT("invalid palette") );
|
wxCHECK_MSG( Ok(), 0, wxT("invalid palette") );
|
||||||
return M_PALETTEDATA->m_count;
|
return M_PALETTEDATA->m_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
palette_t *wxPalette::GetMGLpalette_t() const
|
palette_t *wxPalette::GetMGLpalette_t() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), NULL, wxT("invalid palette") );
|
wxCHECK_MSG( Ok(), NULL, wxT("invalid palette") );
|
||||||
return M_PALETTEDATA->m_entries;
|
return M_PALETTEDATA->m_entries;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -165,15 +165,15 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetPixel(const unsigned char WXUNUSED(red),
|
int wxPalette::GetPixel(unsigned char WXUNUSED(red),
|
||||||
const unsigned char WXUNUSED(green),
|
unsigned char WXUNUSED(green),
|
||||||
const unsigned char WXUNUSED(blue)) const
|
unsigned char WXUNUSED(blue)) const
|
||||||
{
|
{
|
||||||
if ( !m_refData )
|
if ( !m_refData )
|
||||||
return false;
|
return wxNOT_FOUND;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
return false;
|
return wxNOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPalette::GetRGB(int index, unsigned char *WXUNUSED(red), unsigned char *WXUNUSED(green), unsigned char *WXUNUSED(blue)) const
|
bool wxPalette::GetRGB(int index, unsigned char *WXUNUSED(red), unsigned char *WXUNUSED(green), unsigned char *WXUNUSED(blue)) const
|
||||||
@@ -358,4 +358,3 @@ void wxPalette::PutXColormap(WXDisplay* display, WXColormap cm, bool dp)
|
|||||||
|
|
||||||
M_PALETTEDATA->m_palettes.Append(c);
|
M_PALETTEDATA->m_palettes.Append(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.cpp
|
// Name: src/msw/palette.cpp
|
||||||
// Purpose: wxPalette
|
// Purpose: wxPalette
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -33,7 +33,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
|
|||||||
|
|
||||||
wxPaletteRefData::wxPaletteRefData(void)
|
wxPaletteRefData::wxPaletteRefData(void)
|
||||||
{
|
{
|
||||||
m_hPalette = 0;
|
m_hPalette = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPaletteRefData::~wxPaletteRefData(void)
|
wxPaletteRefData::~wxPaletteRefData(void)
|
||||||
@@ -67,71 +67,72 @@ bool wxPalette::FreeResource(bool WXUNUSED(force))
|
|||||||
|
|
||||||
bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
|
bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
|
||||||
{
|
{
|
||||||
UnRef();
|
UnRef();
|
||||||
|
|
||||||
#if defined(__WXMICROWIN__)
|
#if defined(__WXMICROWIN__)
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
m_refData = new wxPaletteRefData;
|
m_refData = new wxPaletteRefData;
|
||||||
|
|
||||||
NPLOGPALETTE npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, sizeof(LOGPALETTE) +
|
NPLOGPALETTE npPal = (NPLOGPALETTE)LocalAlloc(LMEM_FIXED, sizeof(LOGPALETTE) +
|
||||||
(WORD)n * sizeof(PALETTEENTRY));
|
(WORD)n * sizeof(PALETTEENTRY));
|
||||||
if (!npPal)
|
if (!npPal)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
npPal->palVersion = 0x300;
|
npPal->palVersion = 0x300;
|
||||||
npPal->palNumEntries = (WORD)n;
|
npPal->palNumEntries = (WORD)n;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < n; i ++)
|
for (i = 0; i < n; i ++)
|
||||||
{
|
{
|
||||||
npPal->palPalEntry[i].peRed = red[i];
|
npPal->palPalEntry[i].peRed = red[i];
|
||||||
npPal->palPalEntry[i].peGreen = green[i];
|
npPal->palPalEntry[i].peGreen = green[i];
|
||||||
npPal->palPalEntry[i].peBlue = blue[i];
|
npPal->palPalEntry[i].peBlue = blue[i];
|
||||||
npPal->palPalEntry[i].peFlags = 0;
|
npPal->palPalEntry[i].peFlags = 0;
|
||||||
}
|
}
|
||||||
M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal);
|
M_PALETTEDATA->m_hPalette = (WXHPALETTE) CreatePalette((LPLOGPALETTE)npPal);
|
||||||
LocalFree((HANDLE)npPal);
|
LocalFree((HANDLE)npPal);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
int wxPalette::GetPixel(unsigned char red, unsigned char green, unsigned char blue) const
|
||||||
{
|
{
|
||||||
#ifdef __WXMICROWIN__
|
#ifdef __WXMICROWIN__
|
||||||
return 0;
|
return wxNOT_FOUND;
|
||||||
#else
|
#else
|
||||||
if ( !m_refData )
|
if ( !m_refData )
|
||||||
return 0;
|
return wxNOT_FOUND;
|
||||||
|
|
||||||
return ::GetNearestPaletteIndex((HPALETTE) M_PALETTEDATA->m_hPalette, PALETTERGB(red, green, blue));
|
return ::GetNearestPaletteIndex((HPALETTE) M_PALETTEDATA->m_hPalette, PALETTERGB(red, green, blue));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
|
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
|
||||||
{
|
{
|
||||||
#ifdef __WXMICROWIN__
|
#ifdef __WXMICROWIN__
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
if ( !m_refData )
|
|
||||||
return false;
|
return false;
|
||||||
|
#else
|
||||||
|
if ( !m_refData )
|
||||||
|
return false;
|
||||||
|
|
||||||
if (index < 0 || index > 255)
|
if (index < 0 || index > 255)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
PALETTEENTRY entry;
|
PALETTEENTRY entry;
|
||||||
if (::GetPaletteEntries((HPALETTE) M_PALETTEDATA->m_hPalette, index, 1, &entry))
|
if (::GetPaletteEntries((HPALETTE) M_PALETTEDATA->m_hPalette, index, 1, &entry))
|
||||||
{
|
{
|
||||||
*red = entry.peRed;
|
*red = entry.peRed;
|
||||||
*green = entry.peGreen;
|
*green = entry.peGreen;
|
||||||
*blue = entry.peBlue;
|
*blue = entry.peBlue;
|
||||||
return true;
|
return true;
|
||||||
} else
|
}
|
||||||
return false;
|
else
|
||||||
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,4 +145,3 @@ void wxPalette::SetHPALETTE(WXHPALETTE pal)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_PALETTE
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.cpp
|
// Name: src/os2/palette.cpp
|
||||||
// Purpose: wxPalette
|
// Purpose: wxPalette
|
||||||
// Author: AUTHOR
|
// Author: AUTHOR
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -106,22 +106,20 @@ bool wxPalette::Create( int n,
|
|||||||
return true;
|
return true;
|
||||||
} // end of wxPalette::Create
|
} // end of wxPalette::Create
|
||||||
|
|
||||||
int wxPalette::GetPixel(
|
int wxPalette::GetPixel( unsigned char cRed,
|
||||||
const unsigned char cRed
|
unsigned char cGreen,
|
||||||
, const unsigned char cGreen
|
unsigned char cBlue) const
|
||||||
, const unsigned char cBlue
|
|
||||||
) const
|
|
||||||
{
|
{
|
||||||
bool bFound = FALSE;
|
bool bFound = false;
|
||||||
PULONG pualTable = NULL;
|
PULONG pualTable = NULL;
|
||||||
ULONG ulNumEntries;
|
ULONG ulNumEntries;
|
||||||
ULONG ulRGB = (PC_RESERVED * 16777216) +
|
ULONG ulRGB = (PC_RESERVED * 16777216) +
|
||||||
((int)cRed * 65536) +
|
((int)cRed * 65536) +
|
||||||
((int)cGreen * 256) +
|
((int)cGreen * 256) +
|
||||||
(int)cBlue;
|
(int)cBlue;
|
||||||
|
|
||||||
if (!m_refData)
|
if (!m_refData)
|
||||||
return FALSE;
|
return wxNOT_FOUND;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get number of entries first
|
// Get number of entries first
|
||||||
@@ -159,26 +157,24 @@ int wxPalette::GetPixel(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!bFound)
|
if (!bFound)
|
||||||
return 0;
|
return wxNOT_FOUND;
|
||||||
return (i + 1);
|
return (i + 1);
|
||||||
} // end of wxPalette::GetPixel
|
} // end of wxPalette::GetPixel
|
||||||
|
|
||||||
bool wxPalette::GetRGB(
|
bool wxPalette::GetRGB( int nIndex,
|
||||||
int nIndex
|
unsigned char* pRed,
|
||||||
, unsigned char* pRed
|
unsigned char* pGreen,
|
||||||
, unsigned char* pGreen
|
unsigned char* pBlue) const
|
||||||
, unsigned char* pBlue
|
|
||||||
) const
|
|
||||||
{
|
{
|
||||||
PULONG pualTable = NULL;
|
PULONG pualTable = NULL;
|
||||||
RGB2 vRGB;
|
RGB2 vRGB;
|
||||||
ULONG ulNumEntries;
|
ULONG ulNumEntries;
|
||||||
|
|
||||||
if (!m_refData)
|
if (!m_refData)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if (nIndex < 0 || nIndex > 255)
|
if (nIndex < 0 || nIndex > 255)
|
||||||
return FALSE;
|
return false;
|
||||||
//
|
//
|
||||||
// Get number of entries first
|
// Get number of entries first
|
||||||
//
|
//
|
||||||
@@ -207,7 +203,7 @@ bool wxPalette::GetRGB(
|
|||||||
*pBlue = vRGB.bBlue;
|
*pBlue = vRGB.bBlue;
|
||||||
*pGreen = vRGB.bGreen;
|
*pGreen = vRGB.bGreen;
|
||||||
*pRed = vRGB.bRed;
|
*pRed = vRGB.bRed;
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxPalette::GetRGB
|
} // end of wxPalette::GetRGB
|
||||||
|
|
||||||
void wxPalette::SetHPALETTE(
|
void wxPalette::SetHPALETTE(
|
||||||
|
@@ -61,9 +61,9 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
int wxPalette::GetPixel(unsigned char red, unsigned char green, unsigned char blue) const
|
||||||
{
|
{
|
||||||
return 0;
|
return wxNOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
|
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
|
||||||
@@ -76,4 +76,3 @@ void wxPalette::SetHPALETTE(WXHPALETTE pal)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_PALETTE
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: palette.cpp
|
// Name: src/x11/palette.cpp
|
||||||
// Purpose: wxPalette
|
// Purpose: wxPalette
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -164,13 +164,13 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
int wxPalette::GetPixel(unsigned char red, unsigned char green, unsigned char blue) const
|
||||||
{
|
{
|
||||||
if ( !m_refData )
|
if ( !m_refData )
|
||||||
return FALSE;
|
return wxNOT_FOUND;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return wxNOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPalette::GetRGB(int index, unsigned char *WXUNUSED(red), unsigned char *WXUNUSED(green), unsigned char *WXUNUSED(blue)) const
|
bool wxPalette::GetRGB(int index, unsigned char *WXUNUSED(red), unsigned char *WXUNUSED(green), unsigned char *WXUNUSED(blue)) const
|
||||||
@@ -351,4 +351,3 @@ void wxPalette::PutXColormap(WXDisplay* display, WXColormap cm, bool dp)
|
|||||||
|
|
||||||
M_PALETTEDATA->m_palettes.Append(c);
|
M_PALETTEDATA->m_palettes.Append(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user