+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name: pen.tex
+%% Purpose: wxPen docs
+%% Author:
+%% Modified by:
+%% Created:
+%% RCS-ID: $Id$
+%% Copyright: (c) wxWidgets
+%% License: wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
\section{\class{wxPen}}\label{wxpen}
A pen is a drawing tool for drawing outlines. It is used for drawing
lines and painting the outline of rectangles, ellipses, etc. It has a
-colour, a width and a style.
+colour, a width and a style.
\wxheading{Derived from}
\func{void}{SetColour}{\param{const wxString\& }{colourName}}
-\func{void}{SetColour}{\param{int}{ red}, \param{int}{ green}, \param{int}{ blue}}
+\func{void}{SetColour}{\param{const unsigned char}{ red}, \param{const unsigned char}{ green}, \param{const unsigned char}{ blue}}
The pen's colour is changed to the given colour.
\func{void}{RemovePen}{\param{wxPen*}{ pen}}
Used by wxWidgets to remove a pen from the list.
-
-
/////////////////////////////////////////////////////////////////////////////
-// Name: include/wx/cocoa/brush.h
+// Name: wx/cocoa/brush.h
// Purpose: wxBrush class
// Author: David Elliott <dfe@cox.net>
// Modified by:
// ------------------------------------------------------------------------
// Implementation
// ------------------------------------------------------------------------
- virtual void SetColour(const wxColour& col) ;
- virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
- virtual void SetStyle(int style) ;
- virtual void SetStipple(const wxBitmap& stipple) ;
+ virtual void SetColour(const wxColour& col) ;
+ virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
+ virtual void SetStyle(int style) ;
+ virtual void SetStipple(const wxBitmap& stipple) ;
// assignment
wxBrush& operator = (const wxBrush& brush)
// Created: 2003/08/02 (stubs from 22.03.2003)
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __WX_COCOA_PEN_H__
virtual bool Ok() const { return (m_refData != NULL) ; }
void SetColour(const wxColour& col) ;
- void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
+ void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
void SetWidth(int width);
void SetStyle(int style);
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.h
+// Name: wx/gtk/brush.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
wxBitmap *GetStipple() const;
void SetColour( const wxColour& col );
- void SetColour( unsigned char r, unsigned char g, unsigned char b );
+ void SetColour( const unsigned char r, const unsigned char g, const unsigned char b );
void SetStyle( int style );
void SetStipple( const wxBitmap& stipple );
{
public:
wxPen() { }
-
+
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
~wxPen();
-
+
wxPen( const wxPen& pen )
: wxGDIObject()
{ Ref(pen); }
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
-
+
bool Ok() const { return m_refData != NULL; }
-
+
bool operator == ( const wxPen& pen ) const;
bool operator != (const wxPen& pen) const { return !(*this == pen); }
void SetColour( const wxColour &colour );
- void SetColour( int red, int green, int blue );
+ void SetColour( const unsigned char red, const unsigned char green, const unsigned char blue );
void SetCap( int capStyle );
void SetJoin( int joinStyle );
void SetStyle( int style );
void SetWidth( int width );
void SetDashes( int number_of_dashes, const wxDash *dash );
-
+
wxColour &GetColour() const;
int GetCap() const;
int GetJoin() const;
int GetDashCount() const;
wxDash* GetDash() const;
-private:
+private:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
-
+
DECLARE_DYNAMIC_CLASS(wxPen)
};
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.h
+// Name: wx/gtk/brush.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
wxBitmap *GetStipple() const;
void SetColour( const wxColour& col );
- void SetColour( unsigned char r, unsigned char g, unsigned char b );
+ void SetColour( const unsigned char r, const unsigned char g, const unsigned char b );
void SetStyle( int style );
void SetStipple( const wxBitmap& stipple );
{
public:
wxPen() { }
-
+
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
~wxPen();
-
+
wxPen( const wxPen& pen )
: wxGDIObject()
{ Ref(pen); }
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
-
+
bool Ok() const { return m_refData != NULL; }
-
+
bool operator == ( const wxPen& pen ) const;
bool operator != (const wxPen& pen) const { return !(*this == pen); }
void SetColour( const wxColour &colour );
- void SetColour( int red, int green, int blue );
+ void SetColour( const unsigned char red, const unsigned char green, const unsigned char blue );
void SetCap( int capStyle );
void SetJoin( int joinStyle );
void SetStyle( int style );
void SetWidth( int width );
void SetDashes( int number_of_dashes, const wxDash *dash );
-
+
wxColour &GetColour() const;
int GetCap() const;
int GetJoin() const;
int GetDashCount() const;
wxDash* GetDash() const;
-private:
+private:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
-
+
DECLARE_DYNAMIC_CLASS(wxPen)
};
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.h
+// Name: wx/mac/carbon/brush.h
// Purpose: wxBrush class
// Author: Stefan Csomor
// Modified by:
{ Ref(brush); }
~wxBrush();
- virtual void SetColour(const wxColour& col) ;
- virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
+ virtual void SetColour(const wxColour& col) ;
+ virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
virtual void SetStyle(int style) ;
virtual void SetStipple(const wxBitmap& stipple) ;
virtual void MacSetTheme(short macThemeBrush) ;
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/mac/pen.h
+// Name: wx/mac/carbon/pen.h
// Purpose: wxPen class
// Author: Stefan Csomor
// Modified by:
// Override in order to recreate the pen
void SetColour(const wxColour& col) ;
- void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
+ void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
void SetWidth(int width) ;
void SetStyle(int style) ;
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.h
+// Name: wx/mac/classic/brush.h
// Purpose: wxBrush class
// Author: Stefan Csomor
// Modified by:
~wxBrush();
virtual void SetColour(const wxColour& col) ;
- virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
+ virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
virtual void SetStyle(int style) ;
virtual void SetStipple(const wxBitmap& stipple) ;
virtual void SetMacTheme(short macThemeBrush) ;
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/mac/pen.h
+// Name: wx/mac/classic/pen.h
// Purpose: wxPen class
// Author: Stefan Csomor
// Modified by:
// Override in order to recreate the pen
void SetColour(const wxColour& col) ;
- void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
+ void SetColour(const unsigned char r, const unsigned char g, const unsigned char b) ;
void SetWidth(int width) ;
void SetStyle(int style) ;
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.h
+// Name: wx/mgl/brush.h
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
wxBitmap *GetStipple() const;
void SetColour(const wxColour& col);
- void SetColour(unsigned char r, unsigned char g, unsigned char b);
+ void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
void SetStyle(int style);
void SetStipple(const wxBitmap& stipple);
bool operator != (const wxPen& pen) const;
void SetColour(const wxColour &colour);
- void SetColour(int red, int green, int blue);
+ void SetColour(const unsigned char red, const unsigned char green, const unsigned char blue);
void SetCap(int capStyle);
void SetJoin(int joinStyle);
void SetStyle(int style);
void SetWidth(int width);
void SetDashes(int number_of_dashes, const wxDash *dash);
void SetStipple(const wxBitmap& stipple);
-
+
wxColour &GetColour() const;
int GetCap() const;
int GetJoin() const;
int GetDashCount() const;
wxDash* GetDash() const;
wxBitmap *GetStipple() const;
-
+
bool Ok() const;
// implementation:
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
-private:
+private:
DECLARE_DYNAMIC_CLASS(wxPen)
};
virtual ~wxBrush();
virtual void SetColour(const wxColour& col);
- virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
+ virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
virtual void SetStyle(int style);
virtual void SetStipple(const wxBitmap& stipple);
/////////////////////////////////////////////////////////////////////////////
-// Name: wx/pen.h
+// Name: wx/msw/pen.h
// Purpose: wxPen class
// Author: Julian Smart
// Modified by: Vadim Zeitlin: fixed operator=(), ==(), !=()
// Override in order to recreate the pen
void SetColour(const wxColour& col);
- void SetColour(unsigned char r, unsigned char g, unsigned char b);
+ void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
void SetWidth(int width);
void SetStyle(int style);
};
#endif // _WX_PEN_H_
-
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.h
+// Name: wx/os2/brush.h
// Purpose: wxBrush class
// Author: David Webster
// Modified by:
~wxBrushRefData();
protected:
- int m_nStyle;
- wxBitmap m_vStipple ;
- wxColour m_vColour;
- WXHBRUSH m_hBrush; // in OS/2 GPI this will be the PS the pen is associated with
- AREABUNDLE m_vBundle;
+ int m_nStyle;
+ wxBitmap m_vStipple ;
+ wxColour m_vColour;
+ WXHBRUSH m_hBrush; // in OS/2 GPI this will be the PS the pen is associated with
+ AREABUNDLE m_vBundle;
};
#define M_BRUSHDATA ((wxBrushRefData *)m_refData)
public:
wxBrush();
- wxBrush( const wxColour& rCol
- ,int nStyle = wxSOLID
- );
+ wxBrush(const wxColour& rCol, int nStyle = wxSOLID);
wxBrush(const wxBitmap& rStipple);
inline wxBrush(const wxBrush& rBrush) { Ref(rBrush); }
~wxBrush();
inline bool operator != (const wxBrush& rBrush) const { return m_refData != rBrush.m_refData; }
virtual void SetColour(const wxColour& rColour);
- virtual void SetColour( unsigned char cRed
- ,unsigned char cGreen
- ,unsigned char cBrush
- );
+ virtual void SetColour(const unsigned char cRed, const unsigned char cGreen, const unsigned char cBrush);
virtual void SetPS(HPS hPS);
virtual void SetStyle(int nStyle) ;
virtual void SetStipple(const wxBitmap& rStipple);
// Override in order to recreate the pen
//
void SetColour(const wxColour& rColour);
- void SetColour( unsigned char cRed
- ,unsigned char cGreen
- ,unsigned char cBlue
- );
+ void SetColour(const unsigned char cRed, const unsigned char cGreen, const unsigned char cBlue);
void SetWidth(int nWidth);
void SetStyle(int nStyle);
// Useful helper: create the brush resource
//
bool RealizeResource(void);
- bool FreeResource(bool bForce = FALSE);
+ bool FreeResource(bool bForce = false);
WXHANDLE GetResourceHandle(void);
bool IsFree(void) const;
void Unshare(void);
virtual ~wxBrush();
virtual void SetColour(const wxColour& col);
- virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
+ virtual void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
virtual void SetStyle(int style);
virtual void SetStipple(const wxBitmap& stipple);
// Override in order to recreate the pen
void SetColour(const wxColour& col);
- void SetColour(unsigned char r, unsigned char g, unsigned char b);
+ void SetColour(const unsigned char r, const unsigned char g, const unsigned char b);
void SetWidth(int width);
void SetStyle(int style);
// Internal
bool RealizeResource();
- bool FreeResource(bool force = FALSE);
+ bool FreeResource(bool force = false);
WXHANDLE GetResourceHandle() const;
bool IsFree() const;
void Unshare();
};
#endif // _WX_PEN_H_
-
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.h
+// Name: wx/x11/brush.h
// Purpose: wxBrush class
// Author: Julian Smart, Robert Roebling
// Modified by:
wxBitmap *GetStipple() const;
void SetColour( const wxColour& col );
- void SetColour( unsigned char r, unsigned char g, unsigned char b );
+ void SetColour( const unsigned char r, const unsigned char g, const unsigned char b );
void SetStyle( int style );
void SetStipple( const wxBitmap& stipple );
/////////////////////////////////////////////////////////////////////////////
-// Name: pen.h
+// Name: wx/x11/pen.h
// Purpose: wxPen class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PEN_H_
{
public:
wxPen() { }
-
+
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
wxPen( const wxBitmap &stipple, int width );
~wxPen();
-
+
wxPen( const wxPen& pen ) { Ref(pen); }
wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
-
+
bool Ok() const { return m_refData != NULL; }
-
+
bool operator == ( const wxPen& pen ) const;
bool operator != (const wxPen& pen) const { return !(*this == pen); }
void SetColour( const wxColour &colour );
- void SetColour( int red, int green, int blue );
+ void SetColour( const unsigned char red, const unsigned char green, const unsigned char blue );
void SetCap( int capStyle );
void SetJoin( int joinStyle );
void SetStyle( int style );
wxDash* GetDash() const;
wxBitmap* GetStipple() const;
-private:
+private:
// ref counting code
virtual wxObjectRefData *CreateRefData() const;
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
-
+
DECLARE_DYNAMIC_CLASS(wxPen)
};
// Created: 2003/07/03
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWidgets licence
+// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
M_BRUSHDATA->SetColour(col);
}
-void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
AllocExclusive();
M_BRUSHDATA->SetColour(wxColour(r,g,b));
return [NSColor clearColor];
return M_BRUSHDATA->GetNSColor();
}
-
// Created: 2003/08/02
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWidgets licence
+// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
M_PENDATA->SetColour(col);
}
-void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
AllocExclusive();
M_PENDATA->SetColour(wxColour(r, g, b));
wxColour& wxPen::GetColour() const
{
- return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour);
+ return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour);
}
int wxPen::GetWidth() const
{
- return (M_PENDATA ? M_PENDATA->m_width : 0);
+ return (M_PENDATA ? M_PENDATA->m_width : 0);
}
int wxPen::GetStyle() const
{
- return (M_PENDATA ? M_PENDATA->m_style : 0);
+ return (M_PENDATA ? M_PENDATA->m_style : 0);
}
int wxPen::GetJoin() const
{
- return (M_PENDATA ? M_PENDATA->m_join : 0);
+ return (M_PENDATA ? M_PENDATA->m_join : 0);
}
int wxPen::GetCap() const
{
- return (M_PENDATA ? M_PENDATA->m_cap : 0);
+ return (M_PENDATA ? M_PENDATA->m_cap : 0);
}
int wxPen::GetDashes(wxDash **ptr) const
wxBitmap *wxPen::GetStipple() const
{
- return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL);
+ return (M_PENDATA ? (& M_PENDATA->m_stipple) : (wxBitmap*) NULL);
}
WX_NSColor wxPen::GetNSColor()
*pattern = NULL;
return 0;
}
-
{
m_style = 0;
}
-
+
wxBrushRefData( const wxBrushRefData& data )
: wxObjectRefData()
{
m_stipple = data.m_stipple;
m_colour = data.m_colour;
}
-
+
bool operator == (const wxBrushRefData& data) const
{
return (m_style == data.m_style &&
m_stipple == data.m_stipple &&
m_colour == data.m_colour);
}
-
+
int m_style;
wxColour m_colour;
wxBitmap m_stipple;
bool wxBrush::operator == ( const wxBrush& brush ) const
{
- if (m_refData == brush.m_refData) return TRUE;
-
- if (!m_refData || !brush.m_refData) return FALSE;
-
+ if (m_refData == brush.m_refData) return true;
+
+ if (!m_refData || !brush.m_refData) return false;
+
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
}
void wxBrush::SetColour( const wxColour& col )
{
AllocExclusive();
-
+
M_BRUSHDATA->m_colour = col;
}
-void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
+void wxBrush::SetColour( const unsigned char r, const unsigned char g, const unsigned char b )
{
AllocExclusive();
-
+
M_BRUSHDATA->m_colour.Set( r, g, b );
}
void wxBrush::SetStyle( int style )
{
AllocExclusive();
-
+
M_BRUSHDATA->m_style = style;
}
void wxBrush::SetStipple( const wxBitmap& stipple )
{
AllocExclusive();
-
+
M_BRUSHDATA->m_stipple = stipple;
if (M_BRUSHDATA->m_stipple.GetMask())
{
M_BRUSHDATA->m_style = wxSTIPPLE;
}
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: pen.cpp
+// Name: src/gtk/pen.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
m_dash = (wxGTKDash*) NULL;
m_countDashes = 0;
}
-
+
wxPenRefData( const wxPenRefData& data )
: wxObjectRefData()
{
bool operator == (const wxPenRefData& data) const
{
if ( m_countDashes != data.m_countDashes )
- return FALSE;
+ return false;
if ( m_dash )
{
if ( !data.m_dash ||
memcmp(m_dash, data.m_dash, m_countDashes*sizeof(wxGTKDash)) )
{
- return FALSE;
+ return false;
}
}
else if ( data.m_dash )
{
- return FALSE;
+ return false;
}
m_capStyle == data.m_capStyle &&
m_colour == data.m_colour;
}
-
+
int m_width;
int m_style;
int m_joinStyle;
bool wxPen::operator == ( const wxPen& pen ) const
{
- if (m_refData == pen.m_refData) return TRUE;
-
- if (!m_refData || !pen.m_refData) return FALSE;
-
+ if (m_refData == pen.m_refData) return true;
+
+ if (!m_refData || !pen.m_refData) return false;
+
return ( *(wxPenRefData*)m_refData == *(wxPenRefData*)pen.m_refData );
}
void wxPen::SetColour( const wxColour &colour )
{
AllocExclusive();
-
+
M_PENDATA->m_colour = colour;
}
void wxPen::SetDashes( int number_of_dashes, const wxDash *dash )
{
AllocExclusive();
-
+
M_PENDATA->m_countDashes = number_of_dashes;
M_PENDATA->m_dash = (wxGTKDash *)dash;
}
-void wxPen::SetColour( int red, int green, int blue )
+void wxPen::SetColour( const unsigned char red, const unsigned char green, const unsigned char blue )
{
AllocExclusive();
-
+
M_PENDATA->m_colour.Set( red, green, blue );
}
void wxPen::SetCap( int capStyle )
{
AllocExclusive();
-
+
M_PENDATA->m_capStyle = capStyle;
}
void wxPen::SetJoin( int joinStyle )
{
AllocExclusive();
-
+
M_PENDATA->m_joinStyle = joinStyle;
}
void wxPen::SetStyle( int style )
{
AllocExclusive();
-
+
M_PENDATA->m_style = style;
}
void wxPen::SetWidth( int width )
{
AllocExclusive();
-
+
M_PENDATA->m_width = width;
}
return M_PENDATA->m_colour;
}
-
{
m_style = 0;
}
-
+
wxBrushRefData( const wxBrushRefData& data )
: wxObjectRefData()
{
m_stipple = data.m_stipple;
m_colour = data.m_colour;
}
-
+
bool operator == (const wxBrushRefData& data) const
{
return (m_style == data.m_style &&
m_stipple == data.m_stipple &&
m_colour == data.m_colour);
}
-
+
int m_style;
wxColour m_colour;
wxBitmap m_stipple;
bool wxBrush::operator == ( const wxBrush& brush ) const
{
- if (m_refData == brush.m_refData) return TRUE;
-
- if (!m_refData || !brush.m_refData) return FALSE;
-
+ if (m_refData == brush.m_refData) return true;
+
+ if (!m_refData || !brush.m_refData) return false;
+
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
}
void wxBrush::SetColour( const wxColour& col )
{
AllocExclusive();
-
+
M_BRUSHDATA->m_colour = col;
}
-void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
+void wxBrush::SetColour( const unsigned char r, const unsigned char g, const unsigned char b )
{
AllocExclusive();
-
+
M_BRUSHDATA->m_colour.Set( r, g, b );
}
void wxBrush::SetStyle( int style )
{
AllocExclusive();
-
+
M_BRUSHDATA->m_style = style;
}
void wxBrush::SetStipple( const wxBitmap& stipple )
{
AllocExclusive();
-
+
M_BRUSHDATA->m_stipple = stipple;
if (M_BRUSHDATA->m_stipple.GetMask())
{
M_BRUSHDATA->m_style = wxSTIPPLE;
}
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: pen.cpp
+// Name: src/gtk/pen.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
m_dash = (wxGTKDash*) NULL;
m_countDashes = 0;
}
-
+
wxPenRefData( const wxPenRefData& data )
: wxObjectRefData()
{
bool operator == (const wxPenRefData& data) const
{
if ( m_countDashes != data.m_countDashes )
- return FALSE;
+ return false;
if ( m_dash )
{
if ( !data.m_dash ||
memcmp(m_dash, data.m_dash, m_countDashes*sizeof(wxGTKDash)) )
{
- return FALSE;
+ return false;
}
}
else if ( data.m_dash )
{
- return FALSE;
+ return false;
}
m_capStyle == data.m_capStyle &&
m_colour == data.m_colour;
}
-
+
int m_width;
int m_style;
int m_joinStyle;
bool wxPen::operator == ( const wxPen& pen ) const
{
- if (m_refData == pen.m_refData) return TRUE;
-
- if (!m_refData || !pen.m_refData) return FALSE;
-
+ if (m_refData == pen.m_refData) return true;
+
+ if (!m_refData || !pen.m_refData) return false;
+
return ( *(wxPenRefData*)m_refData == *(wxPenRefData*)pen.m_refData );
}
void wxPen::SetColour( const wxColour &colour )
{
AllocExclusive();
-
+
M_PENDATA->m_colour = colour;
}
void wxPen::SetDashes( int number_of_dashes, const wxDash *dash )
{
AllocExclusive();
-
+
M_PENDATA->m_countDashes = number_of_dashes;
M_PENDATA->m_dash = (wxGTKDash *)dash;
}
-void wxPen::SetColour( int red, int green, int blue )
+void wxPen::SetColour( const unsigned char red, const unsigned char green, const unsigned char blue )
{
AllocExclusive();
-
+
M_PENDATA->m_colour.Set( red, green, blue );
}
void wxPen::SetCap( int capStyle )
{
AllocExclusive();
-
+
M_PENDATA->m_capStyle = capStyle;
}
void wxPen::SetJoin( int joinStyle )
{
AllocExclusive();
-
+
M_PENDATA->m_joinStyle = joinStyle;
}
void wxPen::SetStyle( int style )
{
AllocExclusive();
-
+
M_PENDATA->m_style = style;
}
void wxPen::SetWidth( int width )
{
AllocExclusive();
-
+
M_PENDATA->m_width = width;
}
return M_PENDATA->m_colour;
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.cpp
+// Name: src/mac/carbon/brush.cpp
// Purpose: wxBrush
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
int m_style;
wxBitmap m_stipple ;
wxColour m_colour;
-
+
ThemeBrush m_macThemeBrush ;
-
+
ThemeBackgroundKind m_macThemeBackground ;
Rect m_macThemeBackgroundExtent ;
};
M_BRUSHDATA->m_colour = *wxBLACK;
M_BRUSHDATA->m_stipple = stipple;
-
+
if (M_BRUSHDATA->m_stipple.GetMask())
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
else
RealizeResource();
}
-wxBrush::wxBrush(ThemeBrush macThemeBrush )
+wxBrush::wxBrush(ThemeBrush macThemeBrush )
{
m_refData = new wxBrushRefData;
RealizeResource();
}
-void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
Unshare();
RGBColor color ;
GetThemeBrushAsColor( macThemeBrush , 32, true, &color );
M_BRUSHDATA->m_colour.Set( color.red >> 8 , color.green >> 8 , color.blue >> 8 ) ;
-
+
RealizeResource();
}
bool wxBrush::RealizeResource()
{
- return TRUE;
+ return true;
}
-unsigned long wxBrush::MacGetThemeBackground( WXRECTPTR extent) const
+unsigned long wxBrush::MacGetThemeBackground( WXRECTPTR extent) const
{
- if ( M_BRUSHDATA && M_BRUSHDATA->m_macBrushKind == kwxMacBrushThemeBackground )
- {
- if ( extent )
- *(Rect*)extent = M_BRUSHDATA->m_macThemeBackgroundExtent ;
- return M_BRUSHDATA->m_macThemeBackground ;
- }
- else
- {
- return 0 ;
- }
+ if ( M_BRUSHDATA && M_BRUSHDATA->m_macBrushKind == kwxMacBrushThemeBackground )
+ {
+ if ( extent )
+ *(Rect*)extent = M_BRUSHDATA->m_macThemeBackgroundExtent ;
+ return M_BRUSHDATA->m_macThemeBackground ;
+ }
+ else
+ {
+ return 0 ;
+ }
}
-short wxBrush::MacGetTheme() const
-{
- return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack);
+short wxBrush::MacGetTheme() const
+{
+ return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack);
}
-wxColour& wxBrush::GetColour() const
+wxColour& wxBrush::GetColour() const
{
return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour);
}
-int wxBrush::GetStyle() const
-{
- return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0);
+int wxBrush::GetStyle() const
+{
+ return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0);
}
-wxBitmap *wxBrush::GetStipple() const
-{
- return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0);
+wxBitmap *wxBrush::GetStipple() const
+{
+ return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0);
}
-wxMacBrushKind wxBrush::MacGetBrushKind() const
-{
- return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour);
+wxMacBrushKind wxBrush::MacGetBrushKind() const
+{
+ return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour);
}
/////////////////////////////////////////////////////////////////////////////
-// Name: pen.cpp
+// Name: src/mac/carbon/pen.cpp
// Purpose: wxPen
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
wxPen::wxPen(const wxColour& col, int Width, int Style)
{
m_refData = new wxPenRefData;
-
+
M_PENDATA->m_colour = col;
M_PENDATA->m_width = Width;
M_PENDATA->m_style = Style;
M_PENDATA->m_cap = wxCAP_ROUND ;
M_PENDATA->m_nbDash = 0 ;
M_PENDATA->m_dash = 0 ;
-
+
RealizeResource();
}
wxPen::wxPen(const wxBitmap& stipple, int Width)
{
m_refData = new wxPenRefData;
-
+
M_PENDATA->m_stipple = stipple;
M_PENDATA->m_width = Width;
M_PENDATA->m_style = wxSTIPPLE;
M_PENDATA->m_cap = wxCAP_ROUND ;
M_PENDATA->m_nbDash = 0 ;
M_PENDATA->m_dash = 0 ;
-
+
RealizeResource();
}
void wxPen::SetColour(const wxColour& col)
{
Unshare();
-
+
M_PENDATA->m_colour = col;
-
+
RealizeResource();
}
-void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
Unshare();
-
+
M_PENDATA->m_colour.Set(r, g, b);
-
+
RealizeResource();
}
void wxPen::SetWidth(int Width)
{
Unshare();
-
+
M_PENDATA->m_width = Width;
-
+
RealizeResource();
}
void wxPen::SetStyle(int Style)
{
Unshare();
-
+
M_PENDATA->m_style = Style;
-
+
RealizeResource();
}
void wxPen::SetStipple(const wxBitmap& Stipple)
{
Unshare();
-
+
M_PENDATA->m_stipple = Stipple;
M_PENDATA->m_style = wxSTIPPLE;
-
+
RealizeResource();
}
void wxPen::SetDashes(int nb_dashes, const wxDash *Dash)
{
Unshare();
-
+
M_PENDATA->m_nbDash = nb_dashes;
M_PENDATA->m_dash = (wxDash *)Dash;
-
+
RealizeResource();
}
void wxPen::SetJoin(int Join)
{
Unshare();
-
+
M_PENDATA->m_join = Join;
-
+
RealizeResource();
}
void wxPen::SetCap(int Cap)
{
Unshare();
-
+
M_PENDATA->m_cap = Cap;
-
+
RealizeResource();
}
bool wxPen::RealizeResource()
{
// nothing to do here for mac
- return TRUE;
+ return true;
}
-
-
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.cpp
+// Name: src/mac/classic/brush.cpp
// Purpose: wxBrush
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/setup.h"
int m_style;
wxBitmap m_stipple ;
wxColour m_colour;
-
+
ThemeBrush m_macThemeBrush ;
-
+
ThemeBackgroundKind m_macThemeBackground ;
Rect m_macThemeBackgroundExtent ;
};
M_BRUSHDATA->m_colour = *wxBLACK;
M_BRUSHDATA->m_stipple = stipple;
-
+
if (M_BRUSHDATA->m_stipple.GetMask())
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
else
RealizeResource();
}
-wxBrush::wxBrush(ThemeBrush macThemeBrush )
+wxBrush::wxBrush(ThemeBrush macThemeBrush )
{
m_refData = new wxBrushRefData;
RealizeResource();
}
-void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
Unshare();
bool wxBrush::RealizeResource()
{
- return TRUE;
+ return true;
}
-unsigned long wxBrush::GetMacThemeBackground( WXRECTPTR extent) const
+unsigned long wxBrush::GetMacThemeBackground( WXRECTPTR extent) const
{
- if ( M_BRUSHDATA && M_BRUSHDATA->m_macBrushKind == kwxMacBrushThemeBackground )
- {
- if ( extent )
- *(Rect*)extent = M_BRUSHDATA->m_macThemeBackgroundExtent ;
- return M_BRUSHDATA->m_macThemeBackground ;
- }
- else
- {
- return 0 ;
- }
+ if ( M_BRUSHDATA && M_BRUSHDATA->m_macBrushKind == kwxMacBrushThemeBackground )
+ {
+ if ( extent )
+ *(Rect*)extent = M_BRUSHDATA->m_macThemeBackgroundExtent ;
+ return M_BRUSHDATA->m_macThemeBackground ;
+ }
+ else
+ {
+ return 0 ;
+ }
}
-short wxBrush::GetMacTheme() const
-{
- return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack);
+short wxBrush::GetMacTheme() const
+{
+ return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack);
}
-wxColour& wxBrush::GetColour() const
+wxColour& wxBrush::GetColour() const
{
return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour);
}
-int wxBrush::GetStyle() const
-{
- return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0);
+int wxBrush::GetStyle() const
+{
+ return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0);
}
-wxBitmap *wxBrush::GetStipple() const
-{
- return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0);
+wxBitmap *wxBrush::GetStipple() const
+{
+ return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0);
}
-wxMacBrushKind wxBrush::MacGetBrushKind() const
-{
- return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour);
+wxMacBrushKind wxBrush::MacGetBrushKind() const
+{
+ return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour);
}
/////////////////////////////////////////////////////////////////////////////
-// Name: pen.cpp
+// Name: src/mac/classic/pen.cpp
// Purpose: wxPen
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/setup.h"
wxPen::wxPen(const wxColour& col, int Width, int Style)
{
m_refData = new wxPenRefData;
-
+
M_PENDATA->m_colour = col;
M_PENDATA->m_width = Width;
M_PENDATA->m_style = Style;
M_PENDATA->m_cap = wxCAP_ROUND ;
M_PENDATA->m_nbDash = 0 ;
M_PENDATA->m_dash = 0 ;
-
+
RealizeResource();
}
wxPen::wxPen(const wxBitmap& stipple, int Width)
{
m_refData = new wxPenRefData;
-
+
M_PENDATA->m_stipple = stipple;
M_PENDATA->m_width = Width;
M_PENDATA->m_style = wxSTIPPLE;
M_PENDATA->m_cap = wxCAP_ROUND ;
M_PENDATA->m_nbDash = 0 ;
M_PENDATA->m_dash = 0 ;
-
+
RealizeResource();
}
void wxPen::SetColour(const wxColour& col)
{
Unshare();
-
+
M_PENDATA->m_colour = col;
-
+
RealizeResource();
}
-void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
Unshare();
-
+
M_PENDATA->m_colour.Set(r, g, b);
-
+
RealizeResource();
}
void wxPen::SetWidth(int Width)
{
Unshare();
-
+
M_PENDATA->m_width = Width;
-
+
RealizeResource();
}
void wxPen::SetStyle(int Style)
{
Unshare();
-
+
M_PENDATA->m_style = Style;
-
+
RealizeResource();
}
void wxPen::SetStipple(const wxBitmap& Stipple)
{
Unshare();
-
+
M_PENDATA->m_stipple = Stipple;
M_PENDATA->m_style = wxSTIPPLE;
-
+
RealizeResource();
}
void wxPen::SetDashes(int nb_dashes, const wxDash *Dash)
{
Unshare();
-
+
M_PENDATA->m_nbDash = nb_dashes;
M_PENDATA->m_dash = (wxDash *)Dash;
-
+
RealizeResource();
}
void wxPen::SetJoin(int Join)
{
Unshare();
-
+
M_PENDATA->m_join = Join;
-
+
RealizeResource();
}
void wxPen::SetCap(int Cap)
{
Unshare();
-
+
M_PENDATA->m_cap = Cap;
-
+
RealizeResource();
}
bool wxPen::RealizeResource()
{
// nothing to do here for mac
- return TRUE;
+ return true;
}
-
-
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.cpp
+// Name: src/mgl/brush.cpp
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
// This function converts wxBitmap into pixpattern24_t representation
// (used by wxBrush and wxPen)
-void wxBitmapToPixPattern(const wxBitmap& bitmap,
+void wxBitmapToPixPattern(const wxBitmap& bitmap,
pixpattern24_t *pix, pattern_t *mask)
{
wxMemoryDC mem;
MGLDevCtx *dc;
int x, y;
-
+
if ( pix != NULL )
{
mem.SelectObject(bitmap);
dc->beginPixel();
for (y = 0; y < 8; y++)
for (x = 0; x < 8; x++)
- dc->unpackColorFast(dc->getPixelFast(x, y),
+ dc->unpackColorFast(dc->getPixelFast(x, y),
pix->p[y][x][2],
- pix->p[y][x][1],
+ pix->p[y][x][1],
pix->p[y][x][0]);
dc->endPixel();
}
wxBrush::wxBrush(const wxBitmap &stippleBitmap)
{
wxCHECK_RET( stippleBitmap.Ok(), _T("invalid bitmap") );
- wxCHECK_RET( stippleBitmap.GetWidth() == 8 && stippleBitmap.GetHeight() == 8,
+ wxCHECK_RET( stippleBitmap.GetWidth() == 8 && stippleBitmap.GetHeight() == 8,
_T("stipple bitmap must be 8x8") );
m_refData = new wxBrushRefData();
M_BRUSHDATA->m_colour = *wxBLACK;
-
+
M_BRUSHDATA->m_stipple = stippleBitmap;
- wxBitmapToPixPattern(stippleBitmap, &(M_BRUSHDATA->m_pixPattern),
+ wxBitmapToPixPattern(stippleBitmap, &(M_BRUSHDATA->m_pixPattern),
&(M_BRUSHDATA->m_maskPattern));
if (M_BRUSHDATA->m_stipple.GetMask())
- M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
- else
- M_BRUSHDATA->m_style = wxSTIPPLE;
+ M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
+ else
+ M_BRUSHDATA->m_style = wxSTIPPLE;
}
wxBrush::wxBrush(const wxBrush &brush)
M_BRUSHDATA->m_colour = col;
}
-void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
AllocExclusive();
M_BRUSHDATA->m_colour.Set(r, g, b);
AllocExclusive();
wxCHECK_RET( stipple.Ok(), _T("invalid bitmap") );
- wxCHECK_RET( stipple.GetWidth() == 8 && stipple.GetHeight() == 8,
+ wxCHECK_RET( stipple.GetWidth() == 8 && stipple.GetHeight() == 8,
_T("stipple bitmap must be 8x8") );
M_BRUSHDATA->m_stipple = stipple;
{
return new wxBrushRefData(*(wxBrushRefData *)data);
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: pen.cpp
+// Name: src/mgl/pen.cpp
// Purpose:
// Author: Vaclav Slavik
// Id: $Id$
wxPen::wxPen(const wxBitmap& stipple, int width)
{
wxCHECK_RET( stipple.Ok(), _T("invalid bitmap") );
- wxCHECK_RET( stipple.GetWidth() == 8 && stipple.GetHeight() == 8,
+ wxCHECK_RET( stipple.GetWidth() == 8 && stipple.GetHeight() == 8,
_T("stipple bitmap must be 8x8") );
m_refData = new wxPenRefData();
M_PENDATA->m_dash = (wxDash *)dash; /* TODO */
}
-void wxPen::SetColour(int red, int green, int blue)
+void wxPen::SetColour(const unsigned char red, const unsigned char green, const unsigned char blue)
{
AllocExclusive();
M_PENDATA->m_colour.Set(red, green, blue);
void wxPen::SetStipple(const wxBitmap& stipple)
{
wxCHECK_RET( stipple.Ok(), _T("invalid bitmap") );
- wxCHECK_RET( stipple.GetWidth() == 8 && stipple.GetHeight() == 8,
+ wxCHECK_RET( stipple.GetWidth() == 8 && stipple.GetHeight() == 8,
_T("stipple bitmap must be 8x8") );
AllocExclusive();
M_PENDATA->m_width = width;
}
-int wxPen::GetDashes(wxDash **ptr) const
+int wxPen::GetDashes(wxDash **ptr) const
{
- *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
+ *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
return (M_PENDATA ? M_PENDATA->m_countDashes : 0);
}
-int wxPen::GetDashCount() const
-{
- return (M_PENDATA->m_countDashes);
+int wxPen::GetDashCount() const
+{
+ return (M_PENDATA->m_countDashes);
}
-wxDash* wxPen::GetDash() const
-{
- return (wxDash*)M_PENDATA->m_dash;
+wxDash* wxPen::GetDash() const
+{
+ return (wxDash*)M_PENDATA->m_dash;
}
int wxPen::GetCap() const
{
return new wxPenRefData(*(wxPenRefData *)data);
}
-
M_BRUSHDATA->SetColour(col);
}
-void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
AllocExclusive();
M_BRUSHDATA->SetStipple(stipple);
}
-
-
/////////////////////////////////////////////////////////////////////////////
-// Name: msw/pen.cpp
+// Name: src/msw/pen.cpp
// Purpose: wxPen
// Author: Julian Smart
// Modified by:
RealizeResource();
}
-void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
Unshare();
#endif
return PS_SOLID;
}
-
/////////////////////////////////////////////////////////////////////////////
-// Name: brush.cpp
+// Name: src/os2/brush.cpp
// Purpose: wxBrush
// Author: David Webster
// Modified by:
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str());
- return FALSE;
+ return false;
}
if (M_BRUSHDATA->m_nStyle==wxTRANSPARENT)
}
return bOk;
}
- return FALSE;
+ return false;
} // end of wxBrush::RealizeResource
WXHANDLE wxBrush::GetResourceHandle()
M_BRUSHDATA->m_hBrush = 0;
return true;
}
- else return FALSE;
+ else return false;
} // end of wxBrush::FreeResource
bool wxBrush::IsFree() const
}
} // end of wxBrush::Unshare
-void wxBrush::SetColour(
- const wxColour& rColour
-)
+void wxBrush::SetColour( const wxColour& rColour )
{
Unshare();
M_BRUSHDATA->m_vColour = rColour;
RealizeResource();
}
-void wxBrush::SetColour(
- unsigned char cRed
-, unsigned char cGreen
-, unsigned char cBlue
-)
+void wxBrush::SetColour(const unsigned char cRed, const unsigned char cGreen, const unsigned char cBlue)
{
Unshare();
- M_BRUSHDATA->m_vColour.Set( cRed
- ,cGreen
- ,cBlue
- );
+ M_BRUSHDATA->m_vColour.Set( cRed, cGreen, cBlue );
RealizeResource();
} // end of wxBrush::SetColour
-void wxBrush::SetStyle(
- int nStyle
-)
+void wxBrush::SetStyle(int nStyle)
{
Unshare();
M_BRUSHDATA->m_nStyle = nStyle;
/////////////////////////////////////////////////////////////////////////////
-// Name: pen.cpp
+// Name: src/os2/pen.cpp
// Purpose: wxPen
// Author: David Webster
// Modified by:
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table to RGB mode. Error: %s\n"), sError.c_str());
- return FALSE;
+ return false;
}
if (M_PENDATA->m_nStyle == wxTRANSPARENT)
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Can't set Gpi attributes for a LINEBUNDLE. Error: %s\n"), sError.c_str());
- return FALSE;
+ return false;
}
ULONG flAttrMask = 0L;
}
} // end of wxPen::Unshare
-void wxPen::SetColour(
- const wxColour& rColour
-)
+void wxPen::SetColour( const wxColour& rColour )
{
Unshare();
M_PENDATA->m_vColour = rColour;
RealizeResource();
} // end of wxPen::SetColour
-void wxPen::SetColour(
- unsigned char cRed
-, unsigned char cGreen
-, unsigned char cBlue
-)
+void wxPen::SetColour( const unsigned char cRed, const unsigned char cGreen, const unsigned char cBlue)
{
Unshare();
M_PENDATA->m_vColour.Set(cRed, cGreen, cBlue);
RealizeResource();
} // end of wxPen::SetColour
-void wxPen::SetPS(
- HPS hPS
-)
+void wxPen::SetPS( HPS hPS )
{
Unshare();
if (M_PENDATA->m_hPen)
bool wxBrush::operator==(const wxBrush& brush) const
{
- return FALSE;
+ return false;
}
wxObjectRefData *wxBrush::CreateRefData() const
{
}
-void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxBrush::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
}
void wxBrush::SetStipple(const wxBitmap& stipple)
{
}
-
-
{
}
-void wxPen::SetColour(unsigned char r, unsigned char g, unsigned char b)
+void wxPen::SetColour(const unsigned char r, const unsigned char g, const unsigned char b)
{
}
void wxPen::SetCap(int Cap)
{
}
-
M_BRUSHDATA->m_colour = col;
}
-void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
+void wxBrush::SetColour( const unsigned char r, const unsigned char g, const unsigned char b )
{
AllocExclusive();
M_PENDATA->m_dash = (wxX11Dash *)dash; // TODO
}
-void wxPen::SetColour( int red, int green, int blue )
+void wxPen::SetColour( const unsigned char red, const unsigned char green, const unsigned char blue )
{
AllocExclusive();