another GradientFillLinear fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
82c591d771
commit
1dab6da91b
@ -733,12 +733,14 @@ void wxDCBase::DoGradientFillLinear(const wxRect& rect,
|
||||
else
|
||||
nB = nB1 + (nB2-nB1)*(w-x)/w;
|
||||
|
||||
SetPen(wxPen(wxColour(nR, nG, nB), 1, wxSOLID));
|
||||
wxColour colour(nR,nG,nB);
|
||||
SetPen(wxPen(colour, 1, wxSOLID));
|
||||
SetBrush(wxBrush(colour));
|
||||
if(nDirection == wxEAST)
|
||||
DrawRectangle(rect.GetLeft()+x, rect.GetTop(),
|
||||
DrawRectangle(rect.GetRight()-x-xDelta, rect.GetTop(),
|
||||
xDelta, rect.GetHeight());
|
||||
else //nDirection == wxWEST
|
||||
DrawRectangle(rect.GetRight()-x-xDelta, rect.GetTop(),
|
||||
DrawRectangle(rect.GetLeft()+x, rect.GetTop(),
|
||||
xDelta, rect.GetHeight());
|
||||
}
|
||||
}
|
||||
@ -768,7 +770,9 @@ void wxDCBase::DoGradientFillLinear(const wxRect& rect,
|
||||
else
|
||||
nB = nB1 + (nB2-nB1)*(w-y)/w;
|
||||
|
||||
SetPen(wxPen(wxColour(nR, nG, nB), 1, wxSOLID));
|
||||
wxColour colour(nR,nG,nB);
|
||||
SetPen(wxPen(colour, 1, wxSOLID));
|
||||
SetBrush(wxBrush(colour));
|
||||
if(nDirection == wxNORTH)
|
||||
DrawRectangle(rect.GetLeft(), rect.GetTop()+y,
|
||||
rect.GetWidth(), yDelta);
|
||||
|
Loading…
Reference in New Issue
Block a user