зеркало из https://github.com/mozilla/pjs.git
Bug 234954 - remove unused nsIDeviceContext::ConvertPixel. r=pavlov sr=bryner
This commit is contained in:
Родитель
d509e35784
Коммит
5647f75629
|
@ -434,11 +434,6 @@ public:
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD GetPaletteInfo(nsPaletteInfo& aPaletteInfo) = 0;
|
NS_IMETHOD GetPaletteInfo(nsPaletteInfo& aPaletteInfo) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns Platform specific pixel value for an RGB value
|
|
||||||
*/
|
|
||||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel) = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the size of the displayable area of the output device
|
* Get the size of the displayable area of the output device
|
||||||
* in app units.
|
* in app units.
|
||||||
|
|
|
@ -267,19 +267,6 @@ NS_IMETHODIMP nsDeviceContextBeOS::GetSystemFont(nsSystemFontID aID, nsFont *aFo
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextBeOS::ConvertPixel(nscolor aColor,
|
|
||||||
PRUint32 & aPixel)
|
|
||||||
{
|
|
||||||
// koehler@mythrium.com:
|
|
||||||
// I think this fill the 32 bits pixel with the desired color
|
|
||||||
// It's possible that the nscolor is not representing that color
|
|
||||||
// if you just dump it inside a 32 bits value.
|
|
||||||
aPixel = aColor;
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextBeOS::CheckFontExistence(const nsString& aFontName)
|
NS_IMETHODIMP nsDeviceContextBeOS::CheckFontExistence(const nsString& aFontName)
|
||||||
{
|
{
|
||||||
return nsFontMetricsBeOS::FamilyExists(aFontName);
|
return nsFontMetricsBeOS::FamilyExists(aFontName);
|
||||||
|
|
|
@ -64,7 +64,6 @@ public:
|
||||||
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
||||||
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
|
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
|
||||||
|
|
||||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
|
||||||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||||
|
|
||||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||||
|
|
|
@ -443,15 +443,6 @@ NS_IMETHODIMP nsDeviceContextGTK::GetSystemFont(nsSystemFontID aID, nsFont *aFon
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextGTK::ConvertPixel(nscolor aColor,
|
|
||||||
PRUint32 & aPixel)
|
|
||||||
{
|
|
||||||
aPixel = ::gdk_rgb_xpixel_from_rgb (NS_TO_GDK_RGB(aColor));
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextGTK::CheckFontExistence(const nsString& aFontName)
|
NS_IMETHODIMP nsDeviceContextGTK::CheckFontExistence(const nsString& aFontName)
|
||||||
{
|
{
|
||||||
return NS_FontMetricsFamilyExists(this, aFontName);
|
return NS_FontMetricsFamilyExists(this, aFontName);
|
||||||
|
|
|
@ -69,7 +69,6 @@ public:
|
||||||
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
||||||
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
|
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
|
||||||
|
|
||||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
|
||||||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||||
|
|
||||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||||
|
|
|
@ -437,17 +437,6 @@ NS_IMETHODIMP nsDeviceContextMac::GetDepth(PRUint32& aDepth)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ---------------------------------------------------
|
|
||||||
* See documentation in nsIDeviceContext.h
|
|
||||||
* @update 12/9/98 dwc
|
|
||||||
*/
|
|
||||||
NS_IMETHODIMP nsDeviceContextMac :: ConvertPixel(nscolor aColor, PRUint32 & aPixel)
|
|
||||||
{
|
|
||||||
aPixel = aColor;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** ---------------------------------------------------
|
/** ---------------------------------------------------
|
||||||
* See documentation in nsIDeviceContext.h
|
* See documentation in nsIDeviceContext.h
|
||||||
* @update 12/9/98 dwc
|
* @update 12/9/98 dwc
|
||||||
|
|
|
@ -69,7 +69,6 @@ public:
|
||||||
|
|
||||||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||||
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
||||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
|
||||||
|
|
||||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||||
NS_IMETHOD GetRect(nsRect &aRect);
|
NS_IMETHOD GetRect(nsRect &aRect);
|
||||||
|
|
|
@ -623,12 +623,6 @@ int prefChanged(const char *aPref, void *aClosure)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextOS2 :: ConvertPixel(nscolor aColor, PRUint32 & aPixel)
|
|
||||||
{
|
|
||||||
aPixel = aColor;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextOS2 :: GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
NS_IMETHODIMP nsDeviceContextOS2 :: GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
||||||
{
|
{
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#ifdef NS_PRINT_PREVIEW
|
||||||
|
|
|
@ -65,8 +65,6 @@ public:
|
||||||
|
|
||||||
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
||||||
|
|
||||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
|
||||||
|
|
||||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||||
NS_IMETHOD GetRect(nsRect &aRect);
|
NS_IMETHOD GetRect(nsRect &aRect);
|
||||||
NS_IMETHOD GetClientRect(nsRect &aRect);
|
NS_IMETHOD GetClientRect(nsRect &aRect);
|
||||||
|
|
|
@ -98,13 +98,6 @@ public:
|
||||||
return nsnull == aSurface ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
|
return nsnull == aSurface ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
|
||||||
NS_IMETHODIMP ConvertPixel(nscolor aColor, PRUint32 & aPixel)
|
|
||||||
{
|
|
||||||
aPixel = NS_TO_PH_RGB(aColor);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||||
|
|
||||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||||
|
|
|
@ -504,18 +504,6 @@ NS_IMETHODIMP nsDeviceContextPS::EndPage(void)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ---------------------------------------------------
|
|
||||||
* See documentation in nsIDeviceContext.h
|
|
||||||
* @update 12/21/98 dwc
|
|
||||||
*/
|
|
||||||
NS_IMETHODIMP nsDeviceContextPS::ConvertPixel(nscolor aColor, PRUint32 & aPixel)
|
|
||||||
{
|
|
||||||
PR_LOG(nsDeviceContextPSLM, PR_LOG_DEBUG, ("nsDeviceContextPS::ConvertPixel()\n"));
|
|
||||||
|
|
||||||
aPixel = aColor;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
class nsFontCachePS : public nsFontCache
|
class nsFontCachePS : public nsFontCache
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -80,7 +80,6 @@ public:
|
||||||
|
|
||||||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||||
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
NS_IMETHOD GetDepth(PRUint32& aDepth);
|
||||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
|
||||||
|
|
||||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||||
NS_IMETHOD GetClientRect(nsRect &aRect);
|
NS_IMETHOD GetClientRect(nsRect &aRect);
|
||||||
|
|
|
@ -641,12 +641,6 @@ NS_IMETHODIMP nsDeviceContextWin::GetPaletteInfo(nsPaletteInfo& aPaletteInfo)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextWin :: ConvertPixel(nscolor aColor, PRUint32 & aPixel)
|
|
||||||
{
|
|
||||||
aPixel = aColor;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextWin :: GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
NS_IMETHODIMP nsDeviceContextWin :: GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
||||||
{
|
{
|
||||||
#ifdef NS_PRINT_PREVIEW
|
#ifdef NS_PRINT_PREVIEW
|
||||||
|
|
|
@ -75,8 +75,6 @@ public:
|
||||||
|
|
||||||
NS_IMETHOD GetPaletteInfo(nsPaletteInfo&);
|
NS_IMETHOD GetPaletteInfo(nsPaletteInfo&);
|
||||||
|
|
||||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
|
||||||
|
|
||||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||||
NS_IMETHOD GetRect(nsRect &aRect);
|
NS_IMETHOD GetRect(nsRect &aRect);
|
||||||
NS_IMETHOD GetClientRect(nsRect &aRect);
|
NS_IMETHOD GetClientRect(nsRect &aRect);
|
||||||
|
|
|
@ -365,16 +365,6 @@ NS_IMETHODIMP nsDeviceContextXlib::GetSystemFont(nsSystemFontID anID, nsFont *aF
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextXlib::ConvertPixel(nscolor aColor, PRUint32 & aPixel)
|
|
||||||
{
|
|
||||||
PR_LOG(DeviceContextXlibLM, PR_LOG_DEBUG, ("nsDeviceContextXlib::ConvertPixel()\n"));
|
|
||||||
aPixel = xxlib_rgb_xpixel_from_rgb(mXlibRgbHandle,
|
|
||||||
NS_RGB(NS_GET_B(aColor),
|
|
||||||
NS_GET_G(aColor),
|
|
||||||
NS_GET_R(aColor)));
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextXlib::CheckFontExistence(const nsString& aFontName)
|
NS_IMETHODIMP nsDeviceContextXlib::CheckFontExistence(const nsString& aFontName)
|
||||||
{
|
{
|
||||||
return nsFontMetricsXlib::FamilyExists(mFontMetricsContext, aFontName);
|
return nsFontMetricsXlib::FamilyExists(mFontMetricsContext, aFontName);
|
||||||
|
|
|
@ -65,7 +65,6 @@ public:
|
||||||
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
||||||
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
|
NS_IMETHOD GetSystemFont(nsSystemFontID anID, nsFont *aFont) const;
|
||||||
|
|
||||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
|
||||||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||||
|
|
||||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||||
|
|
|
@ -372,21 +372,6 @@ NS_IMETHODIMP nsDeviceContextXp::EndPage(void)
|
||||||
return mPrintContext->EndPage();
|
return mPrintContext->EndPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ---------------------------------------------------
|
|
||||||
* See documentation in nsIDeviceContext.h
|
|
||||||
* @update 12/21/98 dwc
|
|
||||||
*/
|
|
||||||
NS_IMETHODIMP nsDeviceContextXp :: ConvertPixel(nscolor aColor,
|
|
||||||
PRUint32 & aPixel)
|
|
||||||
{
|
|
||||||
PR_LOG(nsDeviceContextXpLM, PR_LOG_DEBUG, ("nsDeviceContextXp::ConvertPixel()\n"));
|
|
||||||
aPixel = xxlib_rgb_xpixel_from_rgb(GetXlibRgbHandle(),
|
|
||||||
NS_RGB(NS_GET_B(aColor),
|
|
||||||
NS_GET_G(aColor),
|
|
||||||
NS_GET_R(aColor)));
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDeviceContextXp::GetPrintContext(nsXPrintContext*& aContext)
|
nsDeviceContextXp::GetPrintContext(nsXPrintContext*& aContext)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,7 +78,6 @@ public:
|
||||||
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
NS_IMETHOD GetScrollBarDimensions(float &aWidth, float &aHeight) const;
|
||||||
|
|
||||||
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
NS_IMETHOD CheckFontExistence(const nsString& aFontName);
|
||||||
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32 & aPixel);
|
|
||||||
|
|
||||||
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
NS_IMETHOD GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight);
|
||||||
NS_IMETHOD GetRect(nsRect &aRect);
|
NS_IMETHOD GetRect(nsRect &aRect);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче