Remove trailing spaces

This commit is contained in:
Maarten Bent
2018-11-25 20:22:25 +01:00
parent ae1fa08188
commit 86c49283f5
11 changed files with 77 additions and 77 deletions

View File

@@ -1107,20 +1107,20 @@ void wxGCDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
if ( (angle == 0.0) && m_font.IsOk() )
{
DoDrawText(text, x, y);
// Bounding box already updated by DoDrawText(), no need to do it again.
return;
}
// Get extent of whole text.
wxCoord w, h, heightLine;
GetOwner()->GetMultiLineTextExtent(text, &w, &h, &heightLine);
// Compute the shift for the origin of the next line.
const double rad = wxDegToRad(angle);
const double dx = heightLine * sin(rad);
const double dy = heightLine * cos(rad);
// Draw all text line by line
const wxArrayString lines = wxSplit(text, '\n', '\0');
for ( size_t lineNum = 0; lineNum < lines.size(); lineNum++ )
@@ -1132,15 +1132,15 @@ void wxGCDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
else
m_graphicContext->DrawText( lines[lineNum], x + wxRound(lineNum*dx), y + wxRound(lineNum*dy), wxDegToRad(angle ), m_graphicContext->CreateBrush(m_textBackgroundColour) );
}
// call the bounding box by adding all four vertices of the rectangle
// containing the text to it (simpler and probably not slower than
// determining which of them is really topmost/leftmost/...)
// "upper left" and "upper right"
CalcBoundingBox(x, y);
CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad)));
// "bottom left" and "bottom right"
x += (wxCoord)(h*sin(rad));
y += (wxCoord)(h*cos(rad));
@@ -1254,7 +1254,7 @@ wxCoord wxGCDCImpl::GetCharHeight(void) const
void wxGCDCImpl::Clear(void)
{
wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::Clear - invalid DC") );
if ( m_backgroundBrush.IsOk() )
{
m_graphicContext->SetBrush( m_backgroundBrush );