Back to index

tetex-bin  3.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
GfxShadingPattern Class Reference

#include <GfxState.h>

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

List of all members.

Public Member Functions

virtual ~GfxShadingPattern ()
virtual GfxPatterncopy ()
GfxShadinggetShading ()
double * getMatrix ()
int getType ()

Static Public Member Functions

static GfxShadingPatternparse (Object *patObj)

Private Member Functions

 GfxShadingPattern (GfxShading *shadingA, double *matrixA)

Private Attributes

GfxShadingshading
double matrix [6]

Detailed Description

Definition at line 527 of file GfxState.h.


Constructor & Destructor Documentation

Definition at line 1382 of file GfxState.cc.

                                      {
  delete shading;
}
GfxShadingPattern::GfxShadingPattern ( GfxShading shadingA,
double *  matrixA 
) [private]

Definition at line 1371 of file GfxState.cc.

                                                                         :
  GfxPattern(2)
{
  int i;

  shading = shadingA;
  for (i = 0; i < 6; ++i) {
    matrix[i] = matrixA[i];
  }
}

Here is the caller graph for this function:


Member Function Documentation

Implements GfxPattern.

Definition at line 1386 of file GfxState.cc.

                                    {
  return new GfxShadingPattern(shading->copy(), matrix);
}

Here is the call graph for this function:

double* GfxShadingPattern::getMatrix ( ) [inline]

Definition at line 536 of file GfxState.h.

{ return matrix; }

Here is the caller graph for this function:

Definition at line 535 of file GfxState.h.

{ return shading; }

Here is the caller graph for this function:

int GfxPattern::getType ( ) [inline, inherited]

Definition at line 478 of file GfxState.h.

{ return type; }

Here is the caller graph for this function:

Reimplemented from GfxPattern.

Definition at line 1335 of file GfxState.cc.

                                                          {
  Dict *dict;
  GfxShading *shadingA;
  double matrixA[6];
  Object obj1, obj2;
  int i;

  if (!patObj->isDict()) {
    return NULL;
  }
  dict = patObj->getDict();

  dict->lookup("Shading", &obj1);
  shadingA = GfxShading::parse(&obj1);
  obj1.free();
  if (!shadingA) {
    return NULL;
  }

  matrixA[0] = 1; matrixA[1] = 0;
  matrixA[2] = 0; matrixA[3] = 1;
  matrixA[4] = 0; matrixA[5] = 0;
  if (dict->lookup("Matrix", &obj1)->isArray() &&
      obj1.arrayGetLength() == 6) {
    for (i = 0; i < 6; ++i) {
      if (obj1.arrayGet(i, &obj2)->isNum()) {
       matrixA[i] = obj2.getNum();
      }
      obj2.free();
    }
  }
  obj1.free();

  return new GfxShadingPattern(shadingA, matrixA);
}

Here is the call graph for this function:


Member Data Documentation

double GfxShadingPattern::matrix[6] [private]

Definition at line 543 of file GfxState.h.

Definition at line 542 of file GfxState.h.


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