Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsSVGPathFrame.cpp File Reference
#include <math.h>
#include "nsSVGPathGeometryFrame.h"
#include "nsIDOMSVGAnimatedPathData.h"
#include "nsIDOMSVGPathSegList.h"
#include "nsIDOMSVGPathSeg.h"
#include "nsIDOMSVGMatrix.h"
#include "nsISVGRendererPathBuilder.h"
#include "nsISVGMarkable.h"
#include "nsSVGMarkerFrame.h"
#include "nsISupports.h"
#include "nsLayoutAtoms.h"
#include "nsISVGPathFlatten.h"

Go to the source code of this file.


class  nsSVGPathFrame


nsresult NS_NewSVGPathFrame (nsIPresShell *aPresShell, nsIContent *aContent, nsIFrame **aNewFrame)
static float calcAngle (float ux, float uy, float vx, float vy)

Function Documentation

static float calcAngle ( float  ux,
float  uy,
float  vx,
float  vy 
) [static]

Definition at line 522 of file nsSVGPathFrame.cpp.

  float ta = atan2(uy, ux);
  float tb = atan2(vy, vx);
  if (tb >= ta)
    return tb-ta;
  return 2*M_PI - (ta-tb);

Here is the caller graph for this function:

nsresult NS_NewSVGPathFrame ( nsIPresShell aPresShell,
nsIContent aContent,
nsIFrame **  aNewFrame 

Definition at line 112 of file nsSVGPathFrame.cpp.

  *aNewFrame = nsnull;
  nsCOMPtr<nsIDOMSVGAnimatedPathData> anim_data = do_QueryInterface(aContent);
  if (!anim_data) {
#ifdef DEBUG
    printf("warning: trying to construct an SVGPathFrame for a content element that doesn't support the right interfaces\n");
    return NS_ERROR_FAILURE;
  nsSVGPathFrame* it = new (aPresShell) nsSVGPathFrame;
  if (nsnull == it)

  *aNewFrame = it;
  return NS_OK;

Here is the call graph for this function: