Back to index

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

#include <GfxState.h>

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

List of all members.

Public Member Functions

virtual ~GfxTilingPattern ()
virtual GfxPatterncopy ()
int getPaintType ()
int getTilingType ()
double * getBBox ()
double getXStep ()
double getYStep ()
DictgetResDict ()
double * getMatrix ()
ObjectgetContentStream ()
int getType ()

Static Public Member Functions

static GfxTilingPatternparse (Object *patObj)

Private Member Functions

 GfxTilingPattern (int paintTypeA, int tilingTypeA, double *bboxA, double xStepA, double yStepA, Object *resDictA, double *matrixA, Object *contentStreamA)

Private Attributes

int paintType
int tilingType
double bbox [4]
double xStep
double yStep
Object resDict
double matrix [6]
Object contentStream

Detailed Description

Definition at line 489 of file GfxState.h.


Constructor & Destructor Documentation

Definition at line 1321 of file GfxState.cc.

Here is the call graph for this function:

GfxTilingPattern::GfxTilingPattern ( int  paintTypeA,
int  tilingTypeA,
double *  bboxA,
double  xStepA,
double  yStepA,
Object resDictA,
double *  matrixA,
Object contentStreamA 
) [private]

Definition at line 1299 of file GfxState.cc.

                                                      :
  GfxPattern(1)
{
  int i;

  paintType = paintTypeA;
  tilingType = tilingTypeA;
  for (i = 0; i < 4; ++i) {
    bbox[i] = bboxA[i];
  }
  xStep = xStepA;
  yStep = yStepA;
  resDictA->copy(&resDict);
  for (i = 0; i < 6; ++i) {
    matrix[i] = matrixA[i];
  }
  contentStreamA->copy(&contentStream);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

Implements GfxPattern.

Definition at line 1326 of file GfxState.cc.

Here is the call graph for this function:

double* GfxTilingPattern::getBBox ( ) [inline]

Definition at line 499 of file GfxState.h.

{ return bbox; }

Here is the caller graph for this function:

Definition at line 505 of file GfxState.h.

{ return &contentStream; }

Here is the caller graph for this function:

double* GfxTilingPattern::getMatrix ( ) [inline]

Definition at line 504 of file GfxState.h.

{ return matrix; }

Here is the caller graph for this function:

Definition at line 497 of file GfxState.h.

{ return paintType; }

Here is the caller graph for this function:

Definition at line 502 of file GfxState.h.

    { return resDict.isDict() ? resDict.getDict() : (Dict *)NULL; }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 498 of file GfxState.h.

{ return tilingType; }
int GfxPattern::getType ( ) [inline, inherited]

Definition at line 478 of file GfxState.h.

{ return type; }

Here is the caller graph for this function:

double GfxTilingPattern::getXStep ( ) [inline]

Definition at line 500 of file GfxState.h.

{ return xStep; }

Here is the caller graph for this function:

double GfxTilingPattern::getYStep ( ) [inline]

Definition at line 501 of file GfxState.h.

{ return yStep; }

Here is the caller graph for this function:

Reimplemented from GfxPattern.

Definition at line 1217 of file GfxState.cc.

                                                        {
  GfxTilingPattern *pat;
  Dict *dict;
  int paintTypeA, tilingTypeA;
  double bboxA[4], matrixA[6];
  double xStepA, yStepA;
  Object resDictA;
  Object obj1, obj2;
  int i;

  if (!patObj->isStream()) {
    return NULL;
  }
  dict = patObj->streamGetDict();

  if (dict->lookup("PaintType", &obj1)->isInt()) {
    paintTypeA = obj1.getInt();
  } else {
    paintTypeA = 1;
    error(-1, "Invalid or missing PaintType in pattern");
  }
  obj1.free();
  if (dict->lookup("TilingType", &obj1)->isInt()) {
    tilingTypeA = obj1.getInt();
  } else {
    tilingTypeA = 1;
    error(-1, "Invalid or missing TilingType in pattern");
  }
  obj1.free();
  bboxA[0] = bboxA[1] = 0;
  bboxA[2] = bboxA[3] = 1;
  if (dict->lookup("BBox", &obj1)->isArray() &&
      obj1.arrayGetLength() == 4) {
    for (i = 0; i < 4; ++i) {
      if (obj1.arrayGet(i, &obj2)->isNum()) {
       bboxA[i] = obj2.getNum();
      }
      obj2.free();
    }
  } else {
    error(-1, "Invalid or missing BBox in pattern");
  }
  obj1.free();
  if (dict->lookup("XStep", &obj1)->isNum()) {
    xStepA = obj1.getNum();
  } else {
    xStepA = 1;
    error(-1, "Invalid or missing XStep in pattern");
  }
  obj1.free();
  if (dict->lookup("YStep", &obj1)->isNum()) {
    yStepA = obj1.getNum();
  } else {
    yStepA = 1;
    error(-1, "Invalid or missing YStep in pattern");
  }
  obj1.free();
  if (!dict->lookup("Resources", &resDictA)->isDict()) {
    resDictA.free();
    resDictA.initNull();
    error(-1, "Invalid or missing Resources in pattern");
  }
  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();

  pat = new GfxTilingPattern(paintTypeA, tilingTypeA, bboxA, xStepA, yStepA,
                          &resDictA, matrixA, patObj);
  resDictA.free();
  return pat;
}

Here is the call graph for this function:


Member Data Documentation

double GfxTilingPattern::bbox[4] [private]

Definition at line 516 of file GfxState.h.

Definition at line 520 of file GfxState.h.

double GfxTilingPattern::matrix[6] [private]

Definition at line 519 of file GfxState.h.

Definition at line 514 of file GfxState.h.

Definition at line 518 of file GfxState.h.

Definition at line 515 of file GfxState.h.

double GfxTilingPattern::xStep [private]

Definition at line 517 of file GfxState.h.

double GfxTilingPattern::yStep [private]

Definition at line 517 of file GfxState.h.


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