Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsSVGLength.h File Reference
#include "nsISVGLength.h"
#include "nsAString.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

nsresult NS_NewSVGLength (nsISVGLength **result, float value=0.0f, PRUint16 unit=nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER)
nsresult NS_NewSVGLength (nsISVGLength **result, const nsAString &value)

Function Documentation

nsresult NS_NewSVGLength ( nsISVGLength **  result,
float  value = 0.0f,
PRUint16  unit = nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER 
)

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: