Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsSVGUtils.cpp File Reference
#include "nsSVGLength.h"
#include "nsIDOMDocument.h"
#include "nsIDOMSVGElement.h"
#include "nsIDOMSVGSVGElement.h"
#include "nsStyleCoord.h"
#include "nsPresContext.h"
#include "nsSVGCoordCtxProvider.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsIFrame.h"
#include "nsLayoutAtoms.h"
#include "nsIURI.h"
#include "nsStyleStruct.h"
#include "nsIPresShell.h"
#include "nsSVGUtils.h"
#include "nsISVGGeometrySource.h"
#include "nsNetUtil.h"
#include "nsContentDLF.h"
#include "nsContentUtils.h"
#include "nsISVGRenderer.h"
#include "nsIDOMSVGRect.h"
#include "nsFrameList.h"
#include "nsISVGChildFrame.h"
#include "nsIDOMSVGMatrix.h"
#include "cairo.h"

Go to the source code of this file.

Functions

 SVGPrefChanged (const char *aPref, void *aClosure)
static cairo_surface_t * GetCairoComputationalSurface ()
static cairo_matrix_t ConvertSVGMatrixToCairo (nsIDOMSVGMatrix *aMatrix)

Variables

static PRBool gSVGEnabled
static PRBool gSVGRendererAvailable = PR_FALSE
static const char SVG_PREF_STR [] = "svg.enabled"

Function Documentation

static cairo_matrix_t ConvertSVGMatrixToCairo ( nsIDOMSVGMatrix aMatrix) [static]

Definition at line 369 of file nsSVGUtils.cpp.

{
  float A, B, C, D, E, F;
  aMatrix->GetA(&A);
  aMatrix->GetB(&B);
  aMatrix->GetC(&C);
  aMatrix->GetD(&D);
  aMatrix->GetE(&E);
  aMatrix->GetF(&F);
  cairo_matrix_t m = { A, B, C, D, E, F };
  return m;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static cairo_surface_t* GetCairoComputationalSurface ( ) [static]

Definition at line 357 of file nsSVGUtils.cpp.

{
  static cairo_surface_t *sCairoComputationalSurface = nsnull;

  if (!sCairoComputationalSurface)
    sCairoComputationalSurface =
      cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 1, 1);

  return sCairoComputationalSurface;
}

Here is the caller graph for this function:

SVGPrefChanged ( const char *  aPref,
void aClosure 
)

Definition at line 72 of file nsSVGUtils.cpp.

{
  PRBool prefVal = nsContentUtils::GetBoolPref(SVG_PREF_STR);
  if (prefVal == gSVGEnabled)
    return 0;

  gSVGEnabled = prefVal;
  if (gSVGRendererAvailable) {
    if (gSVGEnabled)
      nsContentDLF::RegisterSVG();
    else
      nsContentDLF::UnregisterSVG();
  }

  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

PRBool gSVGEnabled [static]

Definition at line 67 of file nsSVGUtils.cpp.

Definition at line 68 of file nsSVGUtils.cpp.

const char SVG_PREF_STR[] = "svg.enabled" [static]

Definition at line 69 of file nsSVGUtils.cpp.