This commit is contained in:
pavlov%pavlov.net 1999-02-21 17:40:00 +00:00
Родитель 32a829b5fa
Коммит 11111cc945
3 изменённых файлов: 17 добавлений и 20 удалений

Просмотреть файл

@ -33,8 +33,6 @@
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kDeviceContextIID, NS_IDEVICE_CONTEXT_IID);
typedef unsigned char BYTE;
nsDeviceContextGTK::nsDeviceContextGTK()
{
NS_INIT_REFCNT();
@ -66,9 +64,6 @@ NS_IMETHODIMP nsDeviceContextGTK::Init(nsNativeWidget aNativeWidget)
{
GdkVisual *vis;
for (PRInt32 cnt = 0; cnt < 256; cnt++)
mGammaTable[cnt] = cnt;
mWidget = aNativeWidget;
// this is used for something odd. who knows

Просмотреть файл

@ -75,11 +75,3 @@ private:
#endif /* nsDeviceContextGTK_h___ */

Просмотреть файл

@ -88,8 +88,16 @@ nsresult nsImageGTK::Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth,nsMask
ComputMetrics();
mImageBits = (PRUint8*) new PRUint8[mSizeImage];
if (aMaskRequirements == nsMaskRequirements_kNeeds1Bit)
{
switch(aMaskRequirements)
{
case nsMaskRequirements_kNoMask:
mAlphaBits = nsnull;
mAlphaWidth = 0;
mAlphaHeight = 0;
break;
case nsMaskRequirements_kNeeds1Bit:
mAlphaRowBytes = (aWidth + 7) / 8;
mAlphaDepth = 1;
@ -100,14 +108,16 @@ nsresult nsImageGTK::Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth,nsMask
mAlphaWidth = aWidth;
mAlphaHeight = aHeight;
mAlphaPixmap = gdk_pixmap_new(nsnull, mWidth, mHeight, 1);
break;
}
else
{
case nsMaskRequirements_kNeeds8Bit:
mAlphaBits = nsnull;
mAlphaWidth = 0;
mAlphaHeight = 0;
}
g_print("TODO: want an 8bit mask for an image..\n");
break;
}
return NS_OK;
}
@ -125,7 +135,7 @@ void nsImageGTK::ComputMetrics()
PRInt32 nsImageGTK::CalcBytesSpan(PRUint32 aWidth)
{
PRInt32 spanbytes;
PRInt32 spanbytes;
spanbytes = (aWidth * mDepth) >> 5;