зеркало из https://github.com/mozilla/pjs.git
Removed some old debugging messages and redid some font initialization which
seems to work a tad better, though it has plenty room to be improved.
This commit is contained in:
Родитель
5b9342f291
Коммит
b6da782354
|
@ -59,7 +59,6 @@ NS_IMPL_ISUPPORTS(nsImageGTK, kIImageIID);
|
|||
|
||||
nsresult nsImageGTK :: Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth,nsMaskRequirements aMaskRequirements)
|
||||
{
|
||||
fprintf(stderr, "nsImageGTK::Init called\n");
|
||||
if (nsnull != mImageBits)
|
||||
delete[] (PRUint8*)mImageBits;
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ NS_IMPL_RELEASE(nsRenderingContextGTK)
|
|||
NS_IMETHODIMP nsRenderingContextGTK::Init(nsIDeviceContext* aContext,
|
||||
nsIWidget *aWindow)
|
||||
{
|
||||
fprintf(stderr, "nsRenderingContextGTK::Init called\n");
|
||||
mContext = aContext;
|
||||
NS_IF_ADDREF(mContext);
|
||||
|
||||
|
@ -400,12 +399,20 @@ NS_IMETHODIMP nsRenderingContextGTK::GetColor(nscolor &aColor) const
|
|||
|
||||
NS_IMETHODIMP nsRenderingContextGTK::SetFont(const nsFont& aFont)
|
||||
{
|
||||
nsIFontMetrics *fontMetrics;
|
||||
mContext->GetMetricsFor(aFont, fontMetrics);
|
||||
NS_IMETHODIMP result = SetFont(fontMetrics);
|
||||
NS_IF_RELEASE(fontMetrics);
|
||||
NS_IF_RELEASE(mFontMetrics);
|
||||
mContext->GetMetricsFor(aFont, mFontMetrics);
|
||||
if (mFontMetrics)
|
||||
{
|
||||
nsFontHandle fontHandle;
|
||||
mFontMetrics->GetFontHandle(fontHandle);
|
||||
mCurrentFont = (GdkFont *)fontHandle;
|
||||
|
||||
return result;
|
||||
gdk_gc_set_font(mRenderingSurface->gc,
|
||||
mCurrentFont);
|
||||
return NS_OK;
|
||||
}
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsRenderingContextGTK::SetFont(nsIFontMetrics *aFontMetrics)
|
||||
|
|
Загрузка…
Ссылка в новой задаче