expands the width and height independently from each other in GetDrawingSurface

This commit is contained in:
pierre%netscape.com 1999-04-20 04:03:25 +00:00
Родитель 3d1e56630e
Коммит d19eff3089
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -2171,13 +2171,17 @@ nsDrawingSurface nsViewManager :: GetDrawingSurface(nsIRenderingContext &aContex
if ((nsnull == mDrawingSurface) ||
(mDSBounds.width < aBounds.width) || (mDSBounds.height < aBounds.height))
{
if (aBounds.width < mDSBounds.width)
aBounds.width = mDSBounds.width;
if (aBounds.height < mDSBounds.height)
aBounds.height = mDSBounds.height;
if (nsnull != mDrawingSurface)
{
//destroy existing DS
aContext.DestroyDrawingSurface(mDrawingSurface);
mDrawingSurface = nsnull;
}
aContext.CreateDrawingSurface(&aBounds, 0, mDrawingSurface);
mDSBounds = aBounds;
}