Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsSVGMarkerFrame.h File Reference
#include "nsSVGDefsFrame.h"
#include "nsIDOMSVGLength.h"
#include "nsIDOMSVGAngle.h"
#include "nsIDOMSVGRect.h"
#include "nsIDOMSVGAnimatedEnum.h"
#include "nsISVGMarkable.h"
#include "nsLayoutAtoms.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  nsSVGMarkerFrame


#define M_PI   3.14159265358979323846
#define NS_SVGMARKERFRAME_CID   {0x899a645c, 0xf817, 0x4a1a, {0xaa, 0x3d, 0xa9, 0x1a, 0xbf, 0xa2, 0xb2, 0x0a}}


nsresult NS_GetSVGMarkerFrame (nsSVGMarkerFrame **aResult, nsIURI *aURI, nsIContent *aContent)

Define Documentation

#define M_PI   3.14159265358979323846

Definition at line 49 of file nsSVGMarkerFrame.h.

#define NS_SVGMARKERFRAME_CID   {0x899a645c, 0xf817, 0x4a1a, {0xaa, 0x3d, 0xa9, 0x1a, 0xbf, 0xa2, 0xb2, 0x0a}}

Definition at line 54 of file nsSVGMarkerFrame.h.

Function Documentation

nsresult NS_GetSVGMarkerFrame ( nsSVGMarkerFrame **  aResult,
nsIContent aContent 

Definition at line 104 of file nsSVGMarkerFrame.cpp.

  *aResult = nsnull;

  // Get the PresShell
  nsIDocument *myDoc = aContent->GetCurrentDoc();
  if (!myDoc) {
    NS_WARNING("No document for this content!");
    return NS_ERROR_FAILURE;
  nsIPresShell *aPresShell = myDoc->GetShellAt(0);

  // Get the URI Spec
  nsCAutoString uriSpec;

  // Find the referenced frame
  nsIFrame *marker;
  if (!NS_SUCCEEDED(nsSVGUtils::GetReferencedFrame(&marker, 
                                                   uriSpec, aContent, aPresShell)))
    return NS_ERROR_FAILURE;

  nsIAtom* frameType = marker->GetType();
  if (frameType != nsLayoutAtoms::svgMarkerFrame)
    return NS_ERROR_FAILURE;

  *aResult = (nsSVGMarkerFrame *)marker;
  return NS_OK;

Here is the call graph for this function:

Here is the caller graph for this function: