Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsSVGRect.cpp File Reference
#include "nsSVGRect.h"
#include "prdtoa.h"
#include "nsSVGValue.h"
#include "nsISVGValueUtils.h"
#include "nsTextFormatter.h"
#include "nsCRT.h"
#include "nsWeakReference.h"
#include "nsIDOMSVGLength.h"
#include "nsContentUtils.h"
#include "nsDOMError.h"

Go to the source code of this file.

Classes

class  nsSVGRect
class  nsSVGReadonlyRect
class  nsSVGViewBox

Functions

nsresult NS_NewSVGRect (nsIDOMSVGRect **result, float x, float y, float width, float height)
nsresult NS_NewSVGReadonlyRect (nsIDOMSVGRect **result, float x, float y, float width, float height)
nsresult NS_NewSVGViewBox (nsIDOMSVGRect **result, nsIDOMSVGLength *viewportWidth, nsIDOMSVGLength *viewportHeight)

Function Documentation

nsresult NS_NewSVGReadonlyRect ( nsIDOMSVGRect **  result,
float  x,
float  y,
float  width,
float  height 
)

Definition at line 393 of file nsSVGRect.cpp.

{
  *result = new nsSVGReadonlyRect(x, y, width, height);
  if (!*result) return NS_ERROR_OUT_OF_MEMORY;
  NS_ADDREF(*result);
  return NS_OK;
}

Here is the call graph for this function:

nsresult NS_NewSVGRect ( nsIDOMSVGRect **  result,
float  x,
float  y,
float  width,
float  height 
)

Definition at line 383 of file nsSVGRect.cpp.

{
  *result = new nsSVGRect(x, y, width, height);
  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_NewSVGViewBox ( nsIDOMSVGRect **  result,
nsIDOMSVGLength viewportWidth,
nsIDOMSVGLength viewportHeight 
)

Definition at line 403 of file nsSVGRect.cpp.

{
  if (!viewportHeight || !viewportWidth) {
    NS_ERROR("need viewport height/width for viewbox");
    return NS_ERROR_FAILURE;
  }
  
  *result = new nsSVGViewBox(viewportWidth, viewportHeight);
  if (!*result) return NS_ERROR_OUT_OF_MEMORY;

  return NS_OK;  
}

Here is the caller graph for this function: