wxCoord wxImplDC::LogicalToDeviceX(wxCoord x) const
{
- return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX + m_deviceOriginX + m_deviceLocalOriginX;
+ return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX + m_deviceOriginX * m_signY + m_deviceLocalOriginX;
}
wxCoord wxImplDC::LogicalToDeviceY(wxCoord y) const
{
- return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY + m_deviceOriginY + m_deviceLocalOriginY;
+ return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY + m_deviceOriginY * m_signY + m_deviceLocalOriginY;
}
wxCoord wxImplDC::LogicalToDeviceXRel(wxCoord x) const
void wxImplDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
{
// only wxPostScripDC has m_signX = -1, we override SetAxisOrientation there
+ // wxWidgets 2.9: no longer override it
m_signX = (xLeftRight ? 1 : -1);
m_signY = (yBottomUp ? -1 : 1);
ComputeScaleAndOrigin();
SetPen(wxPen(colour, 1, wxSOLID));
SetBrush(wxBrush(colour));
if(nDirection == wxEAST)
- DoDrawRectangle(rect.GetRight()-x-xDelta, rect.GetTop(),
+ DoDrawRectangle(rect.GetRight()-x-xDelta+1, rect.GetTop(),
xDelta, rect.GetHeight());
else //nDirection == wxWEST
DoDrawRectangle(rect.GetLeft()+x, rect.GetTop(),
DoDrawRectangle(rect.GetLeft(), rect.GetTop()+y,
rect.GetWidth(), yDelta);
else //nDirection == wxSOUTH
- DoDrawRectangle(rect.GetLeft(), rect.GetBottom()-y-yDelta,
+ DoDrawRectangle(rect.GetLeft(), rect.GetBottom()-y-yDelta+1,
rect.GetWidth(), yDelta);
}
}
void wxDCBase::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
{
// only wxPostScripDC has m_signX = -1, we override SetAxisOrientation there
+ // wxWidgets 2.9: no longer override it
m_signX = (xLeftRight ? 1 : -1);
m_signY = (yBottomUp ? -1 : 1);
ComputeScaleAndOrigin();
wxString curLine;
for ( wxString::const_iterator pc = text.begin(); ; ++pc )
{
- if ( *pc == _T('\n') || pc == text.end() )
+ if ( pc == text.end() || *pc == _T('\n') )
{
int xRealStart = x; // init it here to avoid compielr warnings
SetPen(wxPen(colour, 1, wxSOLID));
SetBrush(wxBrush(colour));
if(nDirection == wxEAST)
- DrawRectangle(rect.GetRight()-x-xDelta, rect.GetTop(),
+ DrawRectangle(rect.GetRight()-x-xDelta+1, rect.GetTop(),
xDelta, rect.GetHeight());
else //nDirection == wxWEST
DrawRectangle(rect.GetLeft()+x, rect.GetTop(),
DrawRectangle(rect.GetLeft(), rect.GetTop()+y,
rect.GetWidth(), yDelta);
else //nDirection == wxSOUTH
- DrawRectangle(rect.GetLeft(), rect.GetBottom()-y-yDelta,
+ DrawRectangle(rect.GetLeft(), rect.GetBottom()-y-yDelta+1,
rect.GetWidth(), yDelta);
}
}