Back to index

lightning-sunbird  0.9+nobinonly
Private Member Functions | Private Attributes | Friends
nsSVGCoordCtxHolder Class Reference

#include <nsSVGCoordCtxProvider.h>

Inheritance diagram for nsSVGCoordCtxHolder:
Inheritance graph
[legend]
Collaboration diagram for nsSVGCoordCtxHolder:
Collaboration graph
[legend]

List of all members.

Private Member Functions

 nsSVGCoordCtxHolder ()
 ~nsSVGCoordCtxHolder ()
NS_DECL_ISUPPORTS NS_IMETHOD WillModifySVGObservable (nsISVGValue *observable, nsISVGValue::modificationType aModType)
NS_IMETHOD DidModifySVGObservable (nsISVGValue *observable, nsISVGValue::modificationType aModType)
void SetContextRect (nsIDOMSVGRect *ctxRect)
void SetMMPerPx (float mmPerPxX, float mmPerPxY)
void Update ()
already_AddRefed< nsSVGCoordCtxGetContextX ()
already_AddRefed< nsSVGCoordCtxGetContextY ()
already_AddRefed< nsSVGCoordCtxGetContextUnspecified ()

Private Attributes

nsCOMPtr< nsIDOMSVGRectmCtxRect
nsRefPtr< nsSVGCoordCtxmCtxX
nsRefPtr< nsSVGCoordCtxmCtxY
nsRefPtr< nsSVGCoordCtxmCtxUnspec

Friends

class nsSVGCoordCtxProvider

Detailed Description

Definition at line 57 of file nsSVGCoordCtxProvider.h.


Constructor & Destructor Documentation


Member Function Documentation

Implements nsISVGValueObserver.

Definition at line 82 of file nsSVGCoordCtxProvider.cpp.

{
  Update();
  return NS_OK;
}

Here is the call graph for this function:

Definition at line 139 of file nsSVGCoordCtxProvider.cpp.

{
  nsSVGCoordCtx *rv = mCtxUnspec.get();
  NS_IF_ADDREF(rv);
  return rv;
}

Here is the call graph for this function:

Definition at line 123 of file nsSVGCoordCtxProvider.cpp.

{
  nsSVGCoordCtx *rv = mCtxX.get();
  NS_IF_ADDREF(rv);
  return rv;
}

Here is the call graph for this function:

Definition at line 131 of file nsSVGCoordCtxProvider.cpp.

{
  nsSVGCoordCtx *rv = mCtxY.get();
  NS_IF_ADDREF(rv);
  return rv;
}

Here is the call graph for this function:

Definition at line 92 of file nsSVGCoordCtxProvider.cpp.

Here is the call graph for this function:

void nsSVGCoordCtxHolder::SetMMPerPx ( float  mmPerPxX,
float  mmPerPxY 
) [private]

Definition at line 104 of file nsSVGCoordCtxProvider.cpp.

{
  mCtxX->mmPerPx = mmPerPxX;
  mCtxY->mmPerPx = mmPerPxY;
  mCtxUnspec->mmPerPx = (float)sqrt((mmPerPxX*mmPerPxX + mmPerPxY*mmPerPxY)/2.0);
}

Definition at line 112 of file nsSVGCoordCtxProvider.cpp.

{
  float w,h;
  mCtxRect->GetWidth(&w);
  mCtxRect->GetHeight(&h);
  mCtxX->mLength->SetValue(w);
  mCtxY->mLength->SetValue(h);
  mCtxUnspec->mLength->SetValue((float)sqrt((w*w+h*h)/2.0));
}

Here is the caller graph for this function:

Implements nsISVGValueObserver.

Definition at line 75 of file nsSVGCoordCtxProvider.cpp.

{
  return NS_OK;
}

Friends And Related Function Documentation

friend class nsSVGCoordCtxProvider [friend]

Definition at line 61 of file nsSVGCoordCtxProvider.h.


Member Data Documentation

Definition at line 83 of file nsSVGCoordCtxProvider.h.

Definition at line 86 of file nsSVGCoordCtxProvider.h.

Definition at line 84 of file nsSVGCoordCtxProvider.h.

Definition at line 85 of file nsSVGCoordCtxProvider.h.


The documentation for this class was generated from the following files: