зеркало из https://github.com/mozilla/pjs.git
Add nsPresContext::AppUnitsToGfxUnits(const nsRect&)
b=430450 r+sr=roc
This commit is contained in:
Родитель
42e784064b
Коммит
7eb29eb768
|
@ -62,8 +62,8 @@
|
|||
#include "nsInterfaceHashtable.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsChangeHint.h"
|
||||
// XXX we need only gfxTypes.h, but we cannot include it directly.
|
||||
#include "gfxPoint.h"
|
||||
// This also pulls in gfxTypes.h, which we cannot include directly.
|
||||
#include "gfxRect.h"
|
||||
class nsImageLoader;
|
||||
#ifdef IBMBIDI
|
||||
class nsBidiPresUtils;
|
||||
|
@ -520,6 +520,12 @@ public:
|
|||
gfxFloat AppUnitsToGfxUnits(nscoord aAppUnits) const
|
||||
{ return mDeviceContext->AppUnitsToGfxUnits(aAppUnits); }
|
||||
|
||||
gfxRect AppUnitsToGfxUnits(const nsRect& aAppRect) const
|
||||
{ return gfxRect(AppUnitsToGfxUnits(aAppRect.x),
|
||||
AppUnitsToGfxUnits(aAppRect.y),
|
||||
AppUnitsToGfxUnits(aAppRect.width),
|
||||
AppUnitsToGfxUnits(aAppRect.height)); }
|
||||
|
||||
nscoord TwipsToAppUnits(PRInt32 aTwips) const
|
||||
{ return NSToCoordRound(NS_TWIPS_TO_INCHES(aTwips) *
|
||||
mDeviceContext->AppUnitsPerInch()); }
|
||||
|
|
Загрузка…
Ссылка в новой задаче