This commit is contained in:
roc+@cs.cmu.edu 2008-02-17 18:20:21 -08:00
Родитель 9376910807
Коммит fee553443e
1 изменённых файлов: 3 добавлений и 22 удалений

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

@ -66,32 +66,26 @@ public:
mAlphaChannel == aOther.mAlphaChannel; mAlphaChannel == aOther.mAlphaChannel;
} }
ColorSpace mColorSpace; ColorSpace mColorSpace;
AlphaChannel mAlphaChannel; PRPackedBool mAlphaChannel;
}; };
float GetPrimitiveLength(nsSVGLength2 *aLength) const; float GetPrimitiveLength(nsSVGLength2 *aLength);
void GetFilterSubregion(nsIContent *aFilter, void GetFilterSubregion(nsIContent *aFilter,
nsRect defaultRegion, nsRect defaultRegion,
nsRect *result); nsRect *result);
// Allocates an image surface that covers mSurfaceRect (it uses
// device offsets so that its origin is positioned at mSurfaceRect.TopLeft()
// when using cairo to draw into the surface). The surface is cleared
// to transprent black.
already_AddRefed<gfxImageSurface> GetImage(); already_AddRefed<gfxImageSurface> GetImage();
void LookupImage(const nsAString &aName, void LookupImage(const nsAString &aName,
gfxImageSurface **aImage, gfxImageSurface **aImage,
nsRect *aRegion, nsRect *aRegion,
const ColorModel &aColorModel); const ColorModel &aColorModel);
nsRect LookupImageRegion(const nsAString &aName);
ColorModel LookupImageColorModel(const nsAString &aName); ColorModel LookupImageColorModel(const nsAString &aName);
void DefineImage(const nsAString &aName, void DefineImage(const nsAString &aName,
gfxImageSurface *aImage, gfxImageSurface *aImage,
const nsRect &aRegion, const nsRect &aRegion,
const ColorModel &aColorModel); const ColorModel &aColorModel);
void GetFilterBox(float *x, float *y, float *width, float *height) const { void GetFilterBox(float *x, float *y, float *width, float *height) {
*x = mFilterX; *x = mFilterX;
*y = mFilterY; *y = mFilterY;
*width = mFilterWidth; *width = mFilterWidth;
@ -110,21 +104,10 @@ public:
mFilterX(aFilterX), mFilterY(aFilterY), mFilterX(aFilterX), mFilterY(aFilterY),
mFilterWidth(aFilterWidth), mFilterHeight(aFilterHeight), mFilterWidth(aFilterWidth), mFilterHeight(aFilterHeight),
mFilterResX(aFilterResX), mFilterResY(aFilterResY), mFilterResX(aFilterResX), mFilterResY(aFilterResY),
mSurfaceRect(0, 0, aFilterResX, aFilterResY),
mPrimitiveUnits(aPrimitiveUnits) { mPrimitiveUnits(aPrimitiveUnits) {
mImageDictionary.Init(); mImageDictionary.Init();
} }
void SetSurfaceRect(const nsRect& aRect) { mSurfaceRect = aRect; }
const nsRect& GetSurfaceRect() const { return mSurfaceRect; }
PRInt32 GetSurfaceWidth() const { return mSurfaceRect.width; }
PRInt32 GetSurfaceHeight() const { return mSurfaceRect.height; }
PRInt32 GetSurfaceStride() const { return mSurfaceStride; }
PRUint32 GetFilterResX() const { return mFilterResX; }
PRUint32 GetFilterResY() const { return mFilterResY; }
private: private:
class ImageEntry { class ImageEntry {
public: public:
@ -146,8 +129,6 @@ private:
float mFilterX, mFilterY, mFilterWidth, mFilterHeight; float mFilterX, mFilterY, mFilterWidth, mFilterHeight;
PRUint32 mFilterResX, mFilterResY; PRUint32 mFilterResX, mFilterResY;
nsRect mSurfaceRect;
PRInt32 mSurfaceStride;
PRUint16 mPrimitiveUnits; PRUint16 mPrimitiveUnits;
}; };