git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
92 lines
1.6 KiB
C++
92 lines
1.6 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: palette.cpp
|
|
// Purpose: wxPalette
|
|
// Author: AUTHOR
|
|
// Modified by:
|
|
// Created: ??/??/98
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) AUTHOR
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifdef __GNUG__
|
|
#pragma implementation "palette.h"
|
|
#endif
|
|
|
|
#include "wx/palette.h"
|
|
|
|
#if !USE_SHARED_LIBRARIES
|
|
IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
|
|
#endif
|
|
|
|
/*
|
|
* Palette
|
|
*
|
|
*/
|
|
|
|
wxPaletteRefData::wxPaletteRefData()
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
wxPaletteRefData::~wxPaletteRefData()
|
|
{
|
|
// TODO
|
|
}
|
|
|
|
wxPalette::wxPalette()
|
|
{
|
|
}
|
|
|
|
wxPalette::wxPalette(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
|
|
{
|
|
Create(n, red, green, blue);
|
|
}
|
|
|
|
wxPalette::~wxPalette()
|
|
{
|
|
}
|
|
|
|
bool wxPalette::FreeResource(bool force)
|
|
{
|
|
if ( M_PALETTEDATA && M_PALETTEDATA->m_hPalette)
|
|
{
|
|
DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette);
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue)
|
|
{
|
|
UnRef();
|
|
|
|
m_refData = new wxPaletteRefData;
|
|
|
|
// TODO
|
|
|
|
return FALSE;
|
|
}
|
|
|
|
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
|
{
|
|
if ( !m_refData )
|
|
return FALSE;
|
|
|
|
// TODO
|
|
return FALSE;
|
|
}
|
|
|
|
bool wxPalette::GetRGB(int index, unsigned char *red, unsigned char *green, unsigned char *blue) const
|
|
{
|
|
if ( !m_refData )
|
|
return FALSE;
|
|
|
|
if (index < 0 || index > 255)
|
|
return FALSE;
|
|
|
|
// TODO
|
|
return FALSE;
|
|
}
|
|
|
|
|