mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add nsPresContext::AppUnitsToGfxUnits(const nsRect&)
b=430450 r+sr=roc
This commit is contained in:
parent
d2915d5735
commit
3fc8bd0f47
@ -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()); }
|
||||
|
Loading…
Reference in New Issue
Block a user