Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsSVGGDIPlusRegion.h File Reference
#include <windows.h>
#include <unknwn.h>
#include <Gdiplus.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

nsresult NS_NewSVGGDIPlusRectRegion (nsISVGRendererRegion **result, float x, float y, float width, float height)
nsresult NS_NewSVGGDIPlusPathRegion (nsISVGRendererRegion **result, const GraphicsPath *path)
nsresult NS_NewSVGGDIPlusClonedRegion (nsISVGRendererRegion **result, const Region *region, nsPresContext *presContext)

Function Documentation

nsresult NS_NewSVGGDIPlusClonedRegion ( nsISVGRendererRegion **  result,
const Region *  region,
nsPresContext presContext 
)

Definition at line 187 of file nsSVGGDIPlusRegion.cpp.

{
#ifdef NS_SVG_GDIPLUS_RENDERER_USE_RECT_REGIONS
  HWND win;
  HDC devicehandle;
  {
    nsIDeviceContext* devicecontext = presContext->DeviceContext();
    // this better be what we think it is:
    win = (HWND)((nsDeviceContextWin *)devicecontext)->mWidget;
    devicehandle = ::GetDC(win);
  }

  {
    // wrap this in a block so that the Graphics-object goes out of
    // scope before we release the HDC.
    
    Graphics graphics(devicehandle);
    
    *result = new nsSVGGDIPlusRegion(region, &graphics);  
  }
  
  ::ReleaseDC(win, devicehandle);
#else
    *result = new nsSVGGDIPlusRegion(region);
#endif
  
  if (!*result) return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(*result);
  return NS_OK;  
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult NS_NewSVGGDIPlusPathRegion ( nsISVGRendererRegion **  result,
const GraphicsPath *  path 
)

Definition at line 177 of file nsSVGGDIPlusRegion.cpp.

{
  *result = new nsSVGGDIPlusRegion(path);
  if (!*result) return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(*result);
  return NS_OK;  
}

Here is the call graph for this function:

nsresult NS_NewSVGGDIPlusRectRegion ( nsISVGRendererRegion **  result,
float  x,
float  y,
float  width,
float  height 
)

Definition at line 165 of file nsSVGGDIPlusRegion.cpp.

{
  *result = new nsSVGGDIPlusRegion(RectF(x, y, width, height));
  if (!*result) return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(*result);
  return NS_OK;
}

Here is the call graph for this function: