mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Revised API
This commit is contained in:
parent
eec208e30b
commit
081ea6d3e8
@ -54,6 +54,13 @@ public:
|
||||
*/
|
||||
NS_IMETHOD Init(const nsFont& aFont, nsIDeviceContext *aContext) = 0;
|
||||
|
||||
/**
|
||||
* Destroy this font metrics. This breaks the association between
|
||||
* the font metrics and the device context (which means that calls
|
||||
* to GetWidth following this call will fail).
|
||||
*/
|
||||
NS_IMETHOD Destroy() = 0;
|
||||
|
||||
/**
|
||||
* Returns the width (in app units) of an 8-bit character
|
||||
*/
|
||||
@ -72,17 +79,19 @@ public:
|
||||
/**
|
||||
* Returns the width (in app units) of an 8-bit character string
|
||||
*/
|
||||
NS_IMETHOD GetWidth(const char *aString, nscoord &aWidth) = 0;
|
||||
NS_IMETHOD GetWidth(const char* aString, nscoord& aWidth) = 0;
|
||||
|
||||
/**
|
||||
* Returns the width (in app units) of an 8-bit character string
|
||||
*/
|
||||
NS_IMETHOD GetWidth(const char* aString, PRUint32 aLength,
|
||||
nscoord& aWidth) = 0;
|
||||
|
||||
/**
|
||||
* Returns the width (in app units) of a Unicode character string
|
||||
*/
|
||||
NS_IMETHOD GetWidth(const PRUnichar *aString, PRUint32 aLength, nscoord &aWidth) = 0;
|
||||
|
||||
/**
|
||||
* Returns the width (in app units) of an 8-bit character
|
||||
*/
|
||||
NS_IMETHOD GetWidth(nsIDeviceContext *aContext, const nsString& aString, nscoord &aWidth) = 0;
|
||||
NS_IMETHOD GetWidth(const PRUnichar *aString, PRUint32 aLength,
|
||||
nscoord &aWidth) = 0;
|
||||
|
||||
/**
|
||||
* Returns the height (in app units) of the font. This is ascent plus descent
|
||||
@ -113,11 +122,6 @@ public:
|
||||
*/
|
||||
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance) = 0;
|
||||
|
||||
/**
|
||||
* Get the widths (in app units) of the first 256 characters of the font
|
||||
*/
|
||||
NS_IMETHOD GetWidths(const nscoord *&aWidths) = 0;
|
||||
|
||||
/**
|
||||
* Returns the font associated with these metrics
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user