[GFX] GetBoundingMetrics() added in nsIRenderingContext and associated changes elsewhere (patform-specific) to support its implementation. Fixes for existing bugs discovered while doing the implementation. Details for ps: Empty hooks to make the code compile while awaiting implementation.

This commit is contained in:
rbs%maths.uq.edu.au 1999-11-11 04:12:33 +00:00
parent 3bf7cba7c6
commit 54da332bc0
2 changed files with 43 additions and 1 deletions

View File

@ -1233,6 +1233,33 @@ nsRect tr;
return NS_OK;
}
#ifdef MOZ_MATHML
/**
* Returns metrics (in app units) of an 8-bit character string
*/
NS_IMETHODIMP
nsRenderingContextPS::GetBoundingMetrics(const char* aString,
PRUint32 aLength,
nsBoundingMetrics& aBoundingMetrics)
{
// Fill me up
return NS_OK;
}
/**
* Returns metrics (in app units) of a Unicode character string
*/
NS_IMETHODIMP
nsRenderingContextPS::GetBoundingMetrics(const PRUnichar* aString,
PRUint32 aLength,
nsBoundingMetrics& aBoundingMetrics,
PRInt32* aFontID = nsnull)
{
// Fill me up
return NS_OK;
}
#endif /* MOZ_MATHML */
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 12/21/98 dwc

View File

@ -164,7 +164,6 @@ public:
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);
// Postscript utilities
/** ---------------------------------------------------
* Set the current postscript font
@ -181,6 +180,22 @@ public:
nscoord aX, nscoord aY, PRInt32 aFontID,
const nscoord* aSpacing, PRBool aIsUnicode);
#ifdef MOZ_MATHML
/**
* Returns metrics (in app units) of an 8-bit character string
*/
NS_IMETHOD GetBoundingMetrics(const char* aString,
PRUint32 aLength,
nsBoundingMetrics& aBoundingMetrics);
/**
* Returns metrics (in app units) of a Unicode character string
*/
NS_IMETHOD GetBoundingMetrics(const PRUnichar* aString,
PRUint32 aLength,
nsBoundingMetrics& aBoundingMetrics,
PRInt32* aFontID = nsnull);
#endif /* MOZ_MATHML */
private:
nsresult CommonInit(void);