#include <gfxUtils.h>
Static Public Member Functions | |
| static void | PremultiplyImageSurface (gfxImageSurface *aSourceSurface, gfxImageSurface *aDestSurface=0L) |
| static void | UnpremultiplyImageSurface (gfxImageSurface *aSurface, gfxImageSurface *aDestSurface=0L) |
| static void | DrawPixelSnapped (gfxContext *aContext, gfxDrawable *aDrawable, const gfxMatrix &aUserSpaceToImageSpace, const gfxRect &aSubimage, const gfxRect &aSourceRect, const gfxRect &aImageRect, const gfxRect &aFill, const gfxImageSurface::gfxImageFormat aFormat, const gfxPattern::GraphicsFilter &aFilter) |
| Draw something drawable while working around limitations like bad support for EXTEND_PAD, lack of source-clipping, or cairo / pixman bugs with extreme user-space-to-image-space transforms. | |
| static void | ClipToRegion (gfxContext *aContext, const nsIntRegion &aRegion) |
| Clip aContext to the region aRegion. | |
| static void | ClipToRegionSnapped (gfxContext *aContext, const nsIntRegion &aRegion) |
| Clip aContext to the region aRegion, snapping the rectangles. | |
| static void | PathFromRegion (gfxContext *aContext, const nsIntRegion &aRegion) |
| Create a path consisting of rectangles in |aRegion|. | |
| static void | PathFromRegionSnapped (gfxContext *aContext, const nsIntRegion &aRegion) |
| Create a path consisting of rectangles in |aRegion|, snapping the rectangles. | |
| static int | ImageFormatToDepth (gfxASurface::gfxImageFormat aFormat) |
| static PRBool | GfxRectToIntRect (const gfxRect &aIn, nsIntRect *aOut) |
| If aIn can be represented exactly using an nsIntRect (i.e. | |
| static void gfxUtils::ClipToRegion | ( | gfxContext * | aContext, | |
| const nsIntRegion & | aRegion | |||
| ) | [static] |
Clip aContext to the region aRegion.
| static void gfxUtils::ClipToRegionSnapped | ( | gfxContext * | aContext, | |
| const nsIntRegion & | aRegion | |||
| ) | [static] |
Clip aContext to the region aRegion, snapping the rectangles.
| static void gfxUtils::DrawPixelSnapped | ( | gfxContext * | aContext, | |
| gfxDrawable * | aDrawable, | |||
| const gfxMatrix & | aUserSpaceToImageSpace, | |||
| const gfxRect & | aSubimage, | |||
| const gfxRect & | aSourceRect, | |||
| const gfxRect & | aImageRect, | |||
| const gfxRect & | aFill, | |||
| const gfxImageSurface::gfxImageFormat | aFormat, | |||
| const gfxPattern::GraphicsFilter & | aFilter | |||
| ) | [static] |
Draw something drawable while working around limitations like bad support for EXTEND_PAD, lack of source-clipping, or cairo / pixman bugs with extreme user-space-to-image-space transforms.
The input parameters here usually come from the output of our image snapping algorithm in nsLayoutUtils.cpp. This method is split from nsLayoutUtils::DrawPixelSnapped to allow for adjusting the parameters. For example, certain images with transparent margins only have a drawable subimage. For those images, imgFrame::Draw will tweak the rects and transforms that it gets from the pixel snapping algorithm before passing them on to this method.
If aIn can be represented exactly using an nsIntRect (i.e.
integer-aligned edges and coordinates in the PRInt32 range) then we set aOut to that rectangle, otherwise return failure.
| static int gfxUtils::ImageFormatToDepth | ( | gfxASurface::gfxImageFormat | aFormat | ) | [static] |
| static void gfxUtils::PathFromRegion | ( | gfxContext * | aContext, | |
| const nsIntRegion & | aRegion | |||
| ) | [static] |
Create a path consisting of rectangles in |aRegion|.
| static void gfxUtils::PathFromRegionSnapped | ( | gfxContext * | aContext, | |
| const nsIntRegion & | aRegion | |||
| ) | [static] |
Create a path consisting of rectangles in |aRegion|, snapping the rectangles.
| static void gfxUtils::PremultiplyImageSurface | ( | gfxImageSurface * | aSourceSurface, | |
| gfxImageSurface * | aDestSurface = 0L | |||
| ) | [static] |
| static void gfxUtils::UnpremultiplyImageSurface | ( | gfxImageSurface * | aSurface, | |
| gfxImageSurface * | aDestSurface = 0L | |||
| ) | [static] |
1.7.1