Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsSVGLength.cpp File Reference
#include "nsSVGLength.h"
#include "nsIDOMSVGMatrix.h"
#include "nsSVGAtoms.h"
#include "nsSVGValue.h"
#include "nsTextFormatter.h"
#include "prdtoa.h"
#include "nsCRT.h"
#include "nsSVGCoordCtx.h"
#include "nsIDOMSVGNumber.h"
#include "nsISVGValueUtils.h"
#include "nsWeakReference.h"
#include "nsContentUtils.h"

Go to the source code of this file.

Classes

class  nsSVGLength

Functions

nsresult NS_NewSVGLength (nsISVGLength **result, float value, PRUint16 unit)
nsresult NS_NewSVGLength (nsISVGLength **result, const nsAString &value)

Function Documentation

nsresult NS_NewSVGLength ( nsISVGLength **  result,
float  value,
PRUint16  unit 
)

Definition at line 114 of file nsSVGLength.cpp.

{
  *result = new nsSVGLength(value, unit);
  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_NewSVGLength ( nsISVGLength **  result,
const nsAString &  value 
)

Definition at line 126 of file nsSVGLength.cpp.

{
  *result = nsnull;
  nsSVGLength *pl = new nsSVGLength();
  if (!pl)
    return NS_ERROR_OUT_OF_MEMORY;
  NS_ADDREF(pl);
  nsresult rv = pl->SetValueAsString(value);
  if (NS_FAILED(rv)) {
    NS_RELEASE(pl);
    return rv;
  }
  *result = pl;
  return NS_OK;
}  

Here is the call graph for this function: