Added a new interface for the tiling of backgrounds. r=rods

This commit is contained in:
dcone%netscape.com 2000-03-20 15:53:17 +00:00
parent 2c6b0d5579
commit 63dae09a9e
21 changed files with 175 additions and 0 deletions

View File

@ -582,6 +582,22 @@ public:
*/
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect)=0;
/**
* Copy an image to the RenderingContext in a tiled manner
* @param aImage image to copy
* @param aX0 starting x
* @param aY0 starting y
* @param aX1 ending x
* @param aY1 ending y
* @param aWidth tile width
* @param aHeight tile height
*/
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight) = 0;
/**
* Copy offscreen pixelmap to this RenderingContext.
* @param aSrcSurf drawing surface to copy bits from

View File

@ -1247,6 +1247,18 @@ NS_IMETHODIMP nsRenderingContextBeOS::DrawImage(nsIImage *aImage, const nsRect&
dr.x,dr.y,dr.width,dr.height);
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextBeOS::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
// #pragma mark checkme
NS_IMETHODIMP
nsRenderingContextBeOS::CopyOffScreenBits(nsDrawingSurface aSrcSurf,

View File

@ -149,6 +149,8 @@ public:
nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);

View File

@ -1482,6 +1482,22 @@ NS_IMETHODIMP nsRenderingContextGTK::DrawImage(nsIImage *aImage,
dr.width, dr.height);
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextGTK::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
NS_IMETHODIMP
nsRenderingContextGTK::CopyOffScreenBits(nsDrawingSurface aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY,

View File

@ -155,6 +155,8 @@ public:
nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);

View File

@ -1399,6 +1399,20 @@ NS_IMETHODIMP nsRenderingContextMac::DrawImage(nsIImage *aImage, const nsRect& a
return aImage->Draw(*this, mCurrentSurface, tr.x, tr.y, tr.width, tr.height);
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextMac::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextMac::RetrieveCurrentNativeGraphicData(PRUint32 * ngd)
{
return NS_OK;

View File

@ -125,6 +125,8 @@ public:
NS_IMETHOD DrawImage(nsIImage *aImage, nscoord aX, nscoord aY, nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
NS_IMETHOD RetrieveCurrentNativeGraphicData(PRUint32 * ngd);

View File

@ -1433,6 +1433,19 @@ NS_IMETHODIMP nsRenderingContextMotif :: DrawImage(nsIImage *aImage, const nsRec
return aImage->Draw(*this,mRenderingSurface,tr.x,tr.y,tr.width,tr.height);
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextMotif::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
NS_IMETHODIMP
nsRenderingContextMotif :: CopyOffScreenBits(nsDrawingSurface aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY,

View File

@ -161,6 +161,8 @@ public:
nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);

View File

@ -1313,6 +1313,19 @@ nsresult nsRenderingContextOS2::DrawImage( nsIImage *aImage, const nsRect& aRect
return aImage->Draw( *this, mSurface, tr.x, tr.y, tr.width, tr.height);
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextOS2::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
nsresult nsRenderingContextOS2::CopyOffScreenBits(
nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags)

View File

@ -157,6 +157,8 @@ class nsRenderingContextOS2 : public nsIRenderingContext
nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawImage( nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage( nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits( nsDrawingSurface aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY,

View File

@ -1796,6 +1796,21 @@ NS_IMETHODIMP nsRenderingContextPh::DrawImage(nsIImage *aImage,
return res;
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextPh::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextPh :: CopyOffScreenBits(nsDrawingSurface aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds,

View File

@ -151,6 +151,8 @@ public:
nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);

View File

@ -1241,6 +1241,20 @@ nsRect tr;
return NS_OK;
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextPS::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
#ifdef MOZ_MATHML
/**
* Returns metrics (in app units) of an 8-bit character string

View File

@ -159,6 +159,8 @@ public:
nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);

View File

@ -1413,6 +1413,19 @@ NS_IMETHODIMP nsRenderingContextQT::DrawImage(nsIImage *aImage,
dr.height);
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextQT::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
NS_IMETHODIMP
nsRenderingContextQT::CopyOffScreenBits(nsDrawingSurface aSrcSurf,
PRInt32 aSrcX,

View File

@ -202,6 +202,8 @@ public:
NS_IMETHOD DrawImage(nsIImage *aImage,
const nsRect& aSRect,
const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf,
PRInt32 aSrcX,

View File

@ -2333,6 +2333,21 @@ NS_IMETHODIMP nsRenderingContextWin :: DrawImage(nsIImage *aImage, const nsRect&
return aImage->Draw(*this, mSurface, tr.x, tr.y, tr.width, tr.height);
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextWin::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
NS_IMETHODIMP nsRenderingContextWin :: CopyOffScreenBits(nsDrawingSurface aSrcSurf,
PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds,

View File

@ -150,6 +150,10 @@ public:
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);
//~~~

View File

@ -1368,6 +1368,18 @@ nsRenderingContextXlib::DrawImage(nsIImage *aImage, const nsRect& aSRect, const
return NS_OK;
}
/** ---------------------------------------------------
* See documentation in nsIRenderingContext.h
* @update 3/16/00 dwc
*/
NS_IMETHODIMP
nsRenderingContextXlib::DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight)
{
return NS_OK;
}
NS_IMETHODIMP
nsRenderingContextXlib::CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags)

View File

@ -152,6 +152,8 @@ class nsRenderingContextXlib : public nsIRenderingContext
nscoord aWidth, nscoord aHeight);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aRect);
NS_IMETHOD DrawImage(nsIImage *aImage, const nsRect& aSRect, const nsRect& aDRect);
NS_IMETHOD DrawTile(nsIImage *aImage,nscoord aX0,nscoord aY0,nscoord aX1,nscoord aY1,
nscoord aWidth,nscoord aHeight);
NS_IMETHOD CopyOffScreenBits(nsDrawingSurface aSrcSurf, PRInt32 aSrcX, PRInt32 aSrcY,
const nsRect &aDestBounds, PRUint32 aCopyFlags);