Kaydet (Commit) 4478145e authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Add comments to some questionable code

Change-Id: I06121b065f360ecfeddb25c9e1487f4849e453a2
üst ca9ceb20
...@@ -452,6 +452,13 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const ...@@ -452,6 +452,13 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
} }
} }
#if 1
// I am not sure at all if this code actually is needed; putting
// it in #if 0 didn't seem to cause any immediately visible bad
// effect. Aybody know? But I guess, better safe than sorry, so
// let's keep it in for now. This ATSUI-using code is destined for
// the bin anyway...
// request an update of the changed window area // request an update of the changed window area
if( rAquaGraphics.IsWindowGraphics() ) if( rAquaGraphics.IsWindowGraphics() )
{ {
...@@ -462,6 +469,12 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const ...@@ -462,6 +469,12 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
{ {
// FIXME: transformation from baseline to top left // FIXME: transformation from baseline to top left
// with the simple approach below we invalidate too much // with the simple approach below we invalidate too much
// Indeed, this simply triples the rectangle's height,
// enlarging it on top and bottom with its old height!? Is
// that really necessary? (Sure, it can't harm, but it
// seems silly. But OTOH, see comment above.)
short d = drawRect.bottom - drawRect.top; short d = drawRect.bottom - drawRect.top;
drawRect.top -= d; drawRect.top -= d;
drawRect.bottom += d; drawRect.bottom += d;
...@@ -472,7 +485,7 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const ...@@ -472,7 +485,7 @@ void ATSLayout::DrawText( SalGraphics& rGraphics ) const
rAquaGraphics.RefreshRect( aRect ); rAquaGraphics.RefreshRect( aRect );
} }
} }
#endif
// restore the original graphic context transformations // restore the original graphic context transformations
CGContextRestoreGState( rAquaGraphics.mrContext ); CGContextRestoreGState( rAquaGraphics.mrContext );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment