From: Robin Dunn Date: Sat, 28 Oct 2006 02:28:38 +0000 (+0000) Subject: Ensure that the pen and bush are properly initialized X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7f8bd9fc5ff34562a7e5c411d95cef99582f7aab?ds=inline Ensure that the pen and bush are properly initialized git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 8e6be335cb..7fd6920026 100755 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -380,7 +380,8 @@ wxCairoPenData::wxCairoPenData( wxGraphicsRenderer* renderer, const wxPen &pen ) : wxGraphicsObjectRefData(renderer) { Init(); - m_width = pen.GetWidth(); + m_pen = pen; + m_width = m_pen.GetWidth(); if (m_width <= 0.0) m_width = 0.1; @@ -558,14 +559,17 @@ void wxCairoPenData::Apply( wxGraphicsContext* context ) // wxCairoBrushData implementation //----------------------------------------------------------------------------- -wxCairoBrushData::wxCairoBrushData( wxGraphicsRenderer* renderer ) : wxGraphicsObjectRefData( renderer ) +wxCairoBrushData::wxCairoBrushData( wxGraphicsRenderer* renderer ) + : wxGraphicsObjectRefData( renderer ) { Init(); } wxCairoBrushData::wxCairoBrushData( wxGraphicsRenderer* renderer, const wxBrush &brush ) -: wxGraphicsObjectRefData(renderer) + : wxGraphicsObjectRefData(renderer) { + Init(); + m_red = brush.GetColour().Red()/255.0; m_green = brush.GetColour().Green()/255.0; m_blue = brush.GetColour().Blue()/255.0;