Back to index

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

#include <GfxState.h>

Collaboration diagram for GfxState:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GfxState (double hDPI, double vDPI, PDFRectangle *pageBox, int rotate, GBool upsideDown)
 ~GfxState ()
GfxStatecopy ()
double * getCTM ()
double getX1 ()
double getY1 ()
double getX2 ()
double getY2 ()
double getPageWidth ()
double getPageHeight ()
GfxColorgetFillColor ()
GfxColorgetStrokeColor ()
void getFillGray (double *gray)
void getStrokeGray (double *gray)
void getFillRGB (GfxRGB *rgb)
void getStrokeRGB (GfxRGB *rgb)
void getFillCMYK (GfxCMYK *cmyk)
void getStrokeCMYK (GfxCMYK *cmyk)
GfxColorSpacegetFillColorSpace ()
GfxColorSpacegetStrokeColorSpace ()
GfxPatterngetFillPattern ()
GfxPatterngetStrokePattern ()
double getFillOpacity ()
double getStrokeOpacity ()
double getLineWidth ()
void getLineDash (double **dash, int *length, double *start)
int getFlatness ()
int getLineJoin ()
int getLineCap ()
double getMiterLimit ()
GfxFontgetFont ()
double getFontSize ()
double * getTextMat ()
double getCharSpace ()
double getWordSpace ()
double getHorizScaling ()
double getLeading ()
double getRise ()
int getRender ()
GfxPathgetPath ()
void setPath (GfxPath *pathA)
double getCurX ()
double getCurY ()
void getClipBBox (double *xMin, double *yMin, double *xMax, double *yMax)
void getUserClipBBox (double *xMin, double *yMin, double *xMax, double *yMax)
double getLineX ()
double getLineY ()
GBool isCurPt ()
GBool isPath ()
void transform (double x1, double y1, double *x2, double *y2)
void transformDelta (double x1, double y1, double *x2, double *y2)
void textTransform (double x1, double y1, double *x2, double *y2)
void textTransformDelta (double x1, double y1, double *x2, double *y2)
double transformWidth (double w)
double getTransformedLineWidth ()
double getTransformedFontSize ()
void getFontTransMat (double *m11, double *m12, double *m21, double *m22)
void setCTM (double a, double b, double c, double d, double e, double f)
void concatCTM (double a, double b, double c, double d, double e, double f)
void setFillColorSpace (GfxColorSpace *colorSpace)
void setStrokeColorSpace (GfxColorSpace *colorSpace)
void setFillColor (GfxColor *color)
void setStrokeColor (GfxColor *color)
void setFillPattern (GfxPattern *pattern)
void setStrokePattern (GfxPattern *pattern)
void setFillOpacity (double opac)
void setStrokeOpacity (double opac)
void setLineWidth (double width)
void setLineDash (double *dash, int length, double start)
void setFlatness (int flatness1)
void setLineJoin (int lineJoin1)
void setLineCap (int lineCap1)
void setMiterLimit (double limit)
void setFont (GfxFont *fontA, double fontSizeA)
void setTextMat (double a, double b, double c, double d, double e, double f)
void setCharSpace (double space)
void setWordSpace (double space)
void setHorizScaling (double scale)
void setLeading (double leadingA)
void setRise (double riseA)
void setRender (int renderA)
void moveTo (double x, double y)
void lineTo (double x, double y)
void curveTo (double x1, double y1, double x2, double y2, double x3, double y3)
void closePath ()
void clearPath ()
void clip ()
void textSetPos (double tx, double ty)
void textMoveTo (double tx, double ty)
void textShift (double tx, double ty)
void shift (double dx, double dy)
GfxStatesave ()
GfxStaterestore ()
GBool hasSaves ()

Private Member Functions

 GfxState (GfxState *state)

Private Attributes

double ctm [6]
double px1
double py1
double px2
double py2
double pageWidth
double pageHeight
GfxColorSpacefillColorSpace
GfxColorSpacestrokeColorSpace
GfxColor fillColor
GfxColor strokeColor
GfxPatternfillPattern
GfxPatternstrokePattern
double fillOpacity
double strokeOpacity
double lineWidth
double * lineDash
int lineDashLength
double lineDashStart
int flatness
int lineJoin
int lineCap
double miterLimit
GfxFontfont
double fontSize
double textMat [6]
double charSpace
double wordSpace
double horizScaling
double leading
double rise
int render
GfxPathpath
double curX
double curY
double lineX
double lineY
double clipXMin
double clipYMin
double clipXMax
double clipYMax
GfxStatesaved

Detailed Description

Definition at line 852 of file GfxState.h.


Constructor & Destructor Documentation

GfxState::GfxState ( double  hDPI,
double  vDPI,
PDFRectangle pageBox,
int  rotate,
GBool  upsideDown 
)

Definition at line 2378 of file GfxState.cc.

                                               {
  double kx, ky;

  px1 = pageBox->x1;
  py1 = pageBox->y1;
  px2 = pageBox->x2;
  py2 = pageBox->y2;
  kx = hDPI / 72.0;
  ky = vDPI / 72.0;
  if (rotate == 90) {
    ctm[0] = 0;
    ctm[1] = upsideDown ? ky : -ky;
    ctm[2] = kx;
    ctm[3] = 0;
    ctm[4] = -kx * py1;
    ctm[5] = ky * (upsideDown ? -px1 : px2);
    pageWidth = kx * (py2 - py1);
    pageHeight = ky * (px2 - px1);
  } else if (rotate == 180) {
    ctm[0] = -kx;
    ctm[1] = 0;
    ctm[2] = 0;
    ctm[3] = upsideDown ? ky : -ky;
    ctm[4] = kx * px2;
    ctm[5] = ky * (upsideDown ? -py1 : py2);
    pageWidth = kx * (px2 - px1);
    pageHeight = ky * (py2 - py1);
  } else if (rotate == 270) {
    ctm[0] = 0;
    ctm[1] = upsideDown ? -ky : ky;
    ctm[2] = -kx;
    ctm[3] = 0;
    ctm[4] = kx * py2;
    ctm[5] = ky * (upsideDown ? px2 : -px1);
    pageWidth = kx * (py2 - py1);
    pageHeight = ky * (px2 - px1);
  } else {
    ctm[0] = kx;
    ctm[1] = 0;
    ctm[2] = 0;
    ctm[3] = upsideDown ? -ky : ky;
    ctm[4] = -kx * px1;
    ctm[5] = ky * (upsideDown ? py2 : -py1);
    pageWidth = kx * (px2 - px1);
    pageHeight = ky * (py2 - py1);
  }

  fillColorSpace = new GfxDeviceGrayColorSpace();
  strokeColorSpace = new GfxDeviceGrayColorSpace();
  fillColor.c[0] = 0;
  strokeColor.c[0] = 0;
  fillPattern = NULL;
  strokePattern = NULL;
  fillOpacity = 1;
  strokeOpacity = 1;

  lineWidth = 1;
  lineDash = NULL;
  lineDashLength = 0;
  lineDashStart = 0;
  flatness = 1;
  lineJoin = 0;
  lineCap = 0;
  miterLimit = 10;

  font = NULL;
  fontSize = 0;
  textMat[0] = 1; textMat[1] = 0;
  textMat[2] = 0; textMat[3] = 1;
  textMat[4] = 0; textMat[5] = 0;
  charSpace = 0;
  wordSpace = 0;
  horizScaling = 1;
  leading = 0;
  rise = 0;
  render = 0;

  path = new GfxPath();
  curX = curY = 0;
  lineX = lineY = 0;

  clipXMin = 0;
  clipYMin = 0;
  clipXMax = pageWidth;
  clipYMax = pageHeight;

  saved = NULL;
}

Here is the caller graph for this function:

Definition at line 2468 of file GfxState.cc.

                    {
  if (fillColorSpace) {
    delete fillColorSpace;
  }
  if (strokeColorSpace) {
    delete strokeColorSpace;
  }
  if (fillPattern) {
    delete fillPattern;
  }
  if (strokePattern) {
    delete strokePattern;
  }
  gfree(lineDash);
  if (path) {
    // this gets set to NULL by restore()
    delete path;
  }
  if (saved) {
    delete saved;
  }
}

Here is the call graph for this function:

GfxState::GfxState ( GfxState state) [private]

Definition at line 2492 of file GfxState.cc.

                                  {
  memcpy(this, state, sizeof(GfxState));
  if (fillColorSpace) {
    fillColorSpace = state->fillColorSpace->copy();
  }
  if (strokeColorSpace) {
    strokeColorSpace = state->strokeColorSpace->copy();
  }
  if (fillPattern) {
    fillPattern = state->fillPattern->copy();
  }
  if (strokePattern) {
    strokePattern = state->strokePattern->copy();
  }
  if (lineDashLength > 0) {
    lineDash = (double *)gmalloc(lineDashLength * sizeof(double));
    memcpy(lineDash, state->lineDash, lineDashLength * sizeof(double));
  }
  saved = NULL;
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 2687 of file GfxState.cc.

                         {
  delete path;
  path = new GfxPath();
}

Here is the caller graph for this function:

Definition at line 2692 of file GfxState.cc.

                    {
  double xMin, yMin, xMax, yMax, x, y;
  GfxSubpath *subpath;
  int i, j;

  xMin = xMax = yMin = yMax = 0; // make gcc happy
  for (i = 0; i < path->getNumSubpaths(); ++i) {
    subpath = path->getSubpath(i);
    for (j = 0; j < subpath->getNumPoints(); ++j) {
      transform(subpath->getX(j), subpath->getY(j), &x, &y);
      if (i == 0 && j == 0) {
       xMin = xMax = x;
       yMin = yMax = y;
      } else {
       if (x < xMin) {
         xMin = x;
       } else if (x > xMax) {
         xMax = x;
       }
       if (y < yMin) {
         yMin = y;
       } else if (y > yMax) {
         yMax = y;
       }
      }
    }
  }
  if (xMin > clipXMin) {
    clipXMin = xMin;
  }
  if (yMin > clipYMin) {
    clipYMin = yMin;
  }
  if (xMax < clipXMax) {
    clipXMax = xMax;
  }
  if (yMax < clipYMax) {
    clipYMax = yMax;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GfxState::closePath ( ) [inline]

Definition at line 990 of file GfxState.h.

    { path->close(); curX = path->getLastX(); curY = path->getLastY(); }

Here is the caller graph for this function:

void GfxState::concatCTM ( double  a,
double  b,
double  c,
double  d,
double  e,
double  f 
)

Definition at line 2626 of file GfxState.cc.

                                                    {
  double a1 = ctm[0];
  double b1 = ctm[1];
  double c1 = ctm[2];
  double d1 = ctm[3];
  int i;

  ctm[0] = a * a1 + b * c1;
  ctm[1] = a * b1 + b * d1;
  ctm[2] = c * a1 + d * c1;
  ctm[3] = c * b1 + d * d1;
  ctm[4] = e * a1 + f * c1 + ctm[4];
  ctm[5] = e * b1 + f * d1 + ctm[5];

  // avoid FP exceptions on badly messed up PDF files
  for (i = 0; i < 6; ++i) {
    if (ctm[i] > 1e10) {
      ctm[i] = 1e10;
    } else if (ctm[i] < -1e10) {
      ctm[i] = -1e10;
    }
  }
}

Here is the caller graph for this function:

GfxState* GfxState::copy ( ) [inline]

Definition at line 865 of file GfxState.h.

{ return new GfxState(this); }

Here is the call graph for this function:

Here is the caller graph for this function:

void GfxState::curveTo ( double  x1,
double  y1,
double  x2,
double  y2,
double  x3,
double  y3 
) [inline]

Definition at line 987 of file GfxState.h.

    { path->curveTo(x1, y1, x2, y2, curX = x3, curY = y3); }

Here is the caller graph for this function:

double GfxState::getCharSpace ( ) [inline]

Definition at line 905 of file GfxState.h.

{ return charSpace; }

Here is the caller graph for this function:

void GfxState::getClipBBox ( double *  xMin,
double *  yMin,
double *  xMax,
double *  yMax 
) [inline]

Definition at line 915 of file GfxState.h.

    { *xMin = clipXMin; *yMin = clipYMin; *xMax = clipXMax; *yMax = clipYMax; }

Here is the caller graph for this function:

double* GfxState::getCTM ( ) [inline]

Definition at line 868 of file GfxState.h.

{ return ctm; }

Here is the caller graph for this function:

double GfxState::getCurX ( ) [inline]

Definition at line 913 of file GfxState.h.

{ return curX; }

Here is the caller graph for this function:

double GfxState::getCurY ( ) [inline]

Definition at line 914 of file GfxState.h.

{ return curY; }

Here is the caller graph for this function:

void GfxState::getFillCMYK ( GfxCMYK cmyk) [inline]

Definition at line 885 of file GfxState.h.

Here is the call graph for this function:

Definition at line 875 of file GfxState.h.

{ return &fillColor; }

Here is the caller graph for this function:

Definition at line 889 of file GfxState.h.

{ return fillColorSpace; }

Here is the caller graph for this function:

void GfxState::getFillGray ( double *  gray) [inline]

Definition at line 877 of file GfxState.h.

Here is the call graph for this function:

double GfxState::getFillOpacity ( ) [inline]

Definition at line 893 of file GfxState.h.

{ return fillOpacity; }

Definition at line 891 of file GfxState.h.

{ return fillPattern; }

Here is the caller graph for this function:

void GfxState::getFillRGB ( GfxRGB rgb) [inline]

Definition at line 881 of file GfxState.h.

Here is the call graph for this function:

int GfxState::getFlatness ( ) [inline]

Definition at line 898 of file GfxState.h.

{ return flatness; }
GfxFont* GfxState::getFont ( ) [inline]

Definition at line 902 of file GfxState.h.

{ return font; }

Here is the caller graph for this function:

double GfxState::getFontSize ( ) [inline]

Definition at line 903 of file GfxState.h.

{ return fontSize; }

Here is the caller graph for this function:

void GfxState::getFontTransMat ( double *  m11,
double *  m12,
double *  m21,
double *  m22 
)

Definition at line 2597 of file GfxState.cc.

                                                      {
  *m11 = (textMat[0] * ctm[0] + textMat[1] * ctm[2]) * fontSize;
  *m12 = (textMat[0] * ctm[1] + textMat[1] * ctm[3]) * fontSize;
  *m21 = (textMat[2] * ctm[0] + textMat[3] * ctm[2]) * fontSize;
  *m22 = (textMat[2] * ctm[1] + textMat[3] * ctm[3]) * fontSize;
}
double GfxState::getHorizScaling ( ) [inline]

Definition at line 907 of file GfxState.h.

{ return horizScaling; }

Here is the caller graph for this function:

double GfxState::getLeading ( ) [inline]

Definition at line 908 of file GfxState.h.

{ return leading; }

Here is the caller graph for this function:

int GfxState::getLineCap ( ) [inline]

Definition at line 900 of file GfxState.h.

{ return lineCap; }
void GfxState::getLineDash ( double **  dash,
int length,
double *  start 
) [inline]

Definition at line 896 of file GfxState.h.

int GfxState::getLineJoin ( ) [inline]

Definition at line 899 of file GfxState.h.

{ return lineJoin; }
double GfxState::getLineWidth ( ) [inline]

Definition at line 895 of file GfxState.h.

{ return lineWidth; }
double GfxState::getLineX ( ) [inline]

Definition at line 918 of file GfxState.h.

{ return lineX; }

Here is the caller graph for this function:

double GfxState::getLineY ( ) [inline]

Definition at line 919 of file GfxState.h.

{ return lineY; }

Here is the caller graph for this function:

double GfxState::getMiterLimit ( ) [inline]

Definition at line 901 of file GfxState.h.

{ return miterLimit; }
double GfxState::getPageHeight ( ) [inline]

Definition at line 874 of file GfxState.h.

{ return pageHeight; }
double GfxState::getPageWidth ( ) [inline]

Definition at line 873 of file GfxState.h.

{ return pageWidth; }
GfxPath* GfxState::getPath ( ) [inline]

Definition at line 911 of file GfxState.h.

{ return path; }

Here is the caller graph for this function:

int GfxState::getRender ( ) [inline]

Definition at line 910 of file GfxState.h.

{ return render; }
double GfxState::getRise ( ) [inline]

Definition at line 909 of file GfxState.h.

{ return rise; }

Here is the caller graph for this function:

void GfxState::getStrokeCMYK ( GfxCMYK cmyk) [inline]

Definition at line 887 of file GfxState.h.

Here is the call graph for this function:

Definition at line 876 of file GfxState.h.

{ return &strokeColor; }

Definition at line 890 of file GfxState.h.

{ return strokeColorSpace; }

Here is the caller graph for this function:

void GfxState::getStrokeGray ( double *  gray) [inline]

Definition at line 879 of file GfxState.h.

Here is the call graph for this function:

double GfxState::getStrokeOpacity ( ) [inline]

Definition at line 894 of file GfxState.h.

{ return strokeOpacity; }

Definition at line 892 of file GfxState.h.

{ return strokePattern; }
void GfxState::getStrokeRGB ( GfxRGB rgb) [inline]

Definition at line 883 of file GfxState.h.

Here is the call graph for this function:

double* GfxState::getTextMat ( ) [inline]

Definition at line 904 of file GfxState.h.

{ return textMat; }

Here is the caller graph for this function:

Definition at line 2587 of file GfxState.cc.

                                        {
  double x1, y1, x2, y2;

  x1 = textMat[2] * fontSize;
  y1 = textMat[3] * fontSize;
  x2 = ctm[0] * x1 + ctm[2] * y1;
  y2 = ctm[1] * x1 + ctm[3] * y1;
  return sqrt(x2 * x2 + y2 * y2);
}
double GfxState::getTransformedLineWidth ( ) [inline]

Definition at line 939 of file GfxState.h.

    { return transformWidth(lineWidth); }

Here is the call graph for this function:

void GfxState::getUserClipBBox ( double *  xMin,
double *  yMin,
double *  xMax,
double *  yMax 
)

Definition at line 2518 of file GfxState.cc.

                                                        {
  double ictm[6];
  double xMin1, yMin1, xMax1, yMax1, det, tx, ty;

  // invert the CTM
  det = 1 / (ctm[0] * ctm[3] - ctm[1] * ctm[2]);
  ictm[0] = ctm[3] * det;
  ictm[1] = -ctm[1] * det;
  ictm[2] = -ctm[2] * det;
  ictm[3] = ctm[0] * det;
  ictm[4] = (ctm[2] * ctm[5] - ctm[3] * ctm[4]) * det;
  ictm[5] = (ctm[1] * ctm[4] - ctm[0] * ctm[5]) * det;

  // transform all four corners of the clip bbox; find the min and max
  // x and y values
  xMin1 = xMax1 = clipXMin * ictm[0] + clipYMin * ictm[2] + ictm[4];
  yMin1 = yMax1 = clipXMin * ictm[1] + clipYMin * ictm[3] + ictm[5];
  tx = clipXMin * ictm[0] + clipYMax * ictm[2] + ictm[4];
  ty = clipXMin * ictm[1] + clipYMax * ictm[3] + ictm[5];
  if (tx < xMin1) {
    xMin1 = tx;
  } else if (tx > xMax1) {
    xMax1 = tx;
  }
  if (ty < yMin1) {
    yMin1 = ty;
  } else if (ty > yMax1) {
    yMax1 = ty;
  }
  tx = clipXMax * ictm[0] + clipYMin * ictm[2] + ictm[4];
  ty = clipXMax * ictm[1] + clipYMin * ictm[3] + ictm[5];
  if (tx < xMin1) {
    xMin1 = tx;
  } else if (tx > xMax1) {
    xMax1 = tx;
  }
  if (ty < yMin1) {
    yMin1 = ty;
  } else if (ty > yMax1) {
    yMax1 = ty;
  }
  tx = clipXMax * ictm[0] + clipYMax * ictm[2] + ictm[4];
  ty = clipXMax * ictm[1] + clipYMax * ictm[3] + ictm[5];
  if (tx < xMin1) {
    xMin1 = tx;
  } else if (tx > xMax1) {
    xMax1 = tx;
  }
  if (ty < yMin1) {
    yMin1 = ty;
  } else if (ty > yMax1) {
    yMax1 = ty;
  }

  *xMin = xMin1;
  *yMin = yMin1;
  *xMax = xMax1;
  *yMax = yMax1;
}

Here is the caller graph for this function:

double GfxState::getWordSpace ( ) [inline]

Definition at line 906 of file GfxState.h.

{ return wordSpace; }

Here is the caller graph for this function:

double GfxState::getX1 ( ) [inline]

Definition at line 869 of file GfxState.h.

{ return px1; }
double GfxState::getX2 ( ) [inline]

Definition at line 871 of file GfxState.h.

{ return px2; }
double GfxState::getY1 ( ) [inline]

Definition at line 870 of file GfxState.h.

{ return py1; }
double GfxState::getY2 ( ) [inline]

Definition at line 872 of file GfxState.h.

{ return py2; }
GBool GfxState::hasSaves ( ) [inline]

Definition at line 1007 of file GfxState.h.

{ return saved != NULL; }

Here is the caller graph for this function:

GBool GfxState::isCurPt ( ) [inline]

Definition at line 922 of file GfxState.h.

{ return path->isCurPt(); }

Here is the caller graph for this function:

GBool GfxState::isPath ( ) [inline]

Definition at line 923 of file GfxState.h.

{ return path->isPath(); }

Here is the caller graph for this function:

void GfxState::lineTo ( double  x,
double  y 
) [inline]

Definition at line 985 of file GfxState.h.

    { path->lineTo(curX = x, curY = y); }

Here is the caller graph for this function:

void GfxState::moveTo ( double  x,
double  y 
) [inline]

Definition at line 983 of file GfxState.h.

    { path->moveTo(curX = x, curY = y); }

Here is the caller graph for this function:

Definition at line 2754 of file GfxState.cc.

                            {
  GfxState *oldState;

  if (saved) {
    oldState = saved;

    // these attributes aren't saved/restored by the q/Q operators
    oldState->path = path;
    oldState->curX = curX;
    oldState->curY = curY;
    oldState->lineX = lineX;
    oldState->lineY = lineY;

    path = NULL;
    saved = NULL;
    delete this;

  } else {
    oldState = this;
  }

  return oldState;
}

Here is the caller graph for this function:

Definition at line 2746 of file GfxState.cc.

                         {
  GfxState *newState;

  newState = copy();
  newState->saved = this;
  return newState;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GfxState::setCharSpace ( double  space) [inline]

Definition at line 969 of file GfxState.h.

    { charSpace = space; }

Here is the caller graph for this function:

void GfxState::setCTM ( double  a,
double  b,
double  c,
double  d,
double  e,
double  f 
)

Definition at line 2605 of file GfxState.cc.

                                                  {
  int i;

  ctm[0] = a;
  ctm[1] = b;
  ctm[2] = c;
  ctm[3] = d;
  ctm[4] = e;
  ctm[5] = f;

  // avoid FP exceptions on badly messed up PDF files
  for (i = 0; i < 6; ++i) {
    if (ctm[i] > 1e10) {
      ctm[i] = 1e10;
    } else if (ctm[i] < -1e10) {
      ctm[i] = -1e10;
    }
  }
}

Here is the caller graph for this function:

void GfxState::setFillColor ( GfxColor color) [inline]

Definition at line 951 of file GfxState.h.

{ fillColor = *color; }

Here is the caller graph for this function:

Definition at line 2651 of file GfxState.cc.

                                                          {
  if (fillColorSpace) {
    delete fillColorSpace;
  }
  fillColorSpace = colorSpace;
}

Here is the caller graph for this function:

void GfxState::setFillOpacity ( double  opac) [inline]

Definition at line 955 of file GfxState.h.

{ fillOpacity = opac; }

Here is the caller graph for this function:

Definition at line 2665 of file GfxState.cc.

                                                 {
  if (fillPattern) {
    delete fillPattern;
  }
  fillPattern = pattern;
}

Here is the caller graph for this function:

void GfxState::setFlatness ( int  flatness1) [inline]

Definition at line 959 of file GfxState.h.

{ flatness = flatness1; }

Here is the caller graph for this function:

void GfxState::setFont ( GfxFont fontA,
double  fontSizeA 
) [inline]

Definition at line 963 of file GfxState.h.

    { font = fontA; fontSize = fontSizeA; }

Here is the caller graph for this function:

void GfxState::setHorizScaling ( double  scale) [inline]

Definition at line 973 of file GfxState.h.

    { horizScaling = 0.01 * scale; }

Here is the caller graph for this function:

void GfxState::setLeading ( double  leadingA) [inline]

Definition at line 975 of file GfxState.h.

    { leading = leadingA; }

Here is the caller graph for this function:

void GfxState::setLineCap ( int  lineCap1) [inline]

Definition at line 961 of file GfxState.h.

{ lineCap = lineCap1; }

Here is the caller graph for this function:

void GfxState::setLineDash ( double *  dash,
int  length,
double  start 
)

Definition at line 2679 of file GfxState.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void GfxState::setLineJoin ( int  lineJoin1) [inline]

Definition at line 960 of file GfxState.h.

{ lineJoin = lineJoin1; }

Here is the caller graph for this function:

void GfxState::setLineWidth ( double  width) [inline]

Definition at line 957 of file GfxState.h.

Here is the caller graph for this function:

void GfxState::setMiterLimit ( double  limit) [inline]

Definition at line 962 of file GfxState.h.

Here is the caller graph for this function:

Definition at line 2513 of file GfxState.cc.

                                     {
  delete path;
  path = pathA;
}

Here is the caller graph for this function:

void GfxState::setRender ( int  renderA) [inline]

Definition at line 979 of file GfxState.h.

    { render = renderA; }

Here is the caller graph for this function:

void GfxState::setRise ( double  riseA) [inline]

Definition at line 977 of file GfxState.h.

    { rise = riseA; }

Here is the caller graph for this function:

void GfxState::setStrokeColor ( GfxColor color) [inline]

Definition at line 952 of file GfxState.h.

Here is the caller graph for this function:

Definition at line 2658 of file GfxState.cc.

                                                            {
  if (strokeColorSpace) {
    delete strokeColorSpace;
  }
  strokeColorSpace = colorSpace;
}

Here is the caller graph for this function:

void GfxState::setStrokeOpacity ( double  opac) [inline]

Definition at line 956 of file GfxState.h.

{ strokeOpacity = opac; }

Here is the caller graph for this function:

Definition at line 2672 of file GfxState.cc.

                                                   {
  if (strokePattern) {
    delete strokePattern;
  }
  strokePattern = pattern;
}

Here is the caller graph for this function:

void GfxState::setTextMat ( double  a,
double  b,
double  c,
double  d,
double  e,
double  f 
) [inline]

Definition at line 965 of file GfxState.h.

    { textMat[0] = a; textMat[1] = b; textMat[2] = c;
      textMat[3] = d; textMat[4] = e; textMat[5] = f; }

Here is the caller graph for this function:

void GfxState::setWordSpace ( double  space) [inline]

Definition at line 971 of file GfxState.h.

    { wordSpace = space; }

Here is the caller graph for this function:

void GfxState::shift ( double  dx,
double  dy 
)

Definition at line 2741 of file GfxState.cc.

                                         {
  curX += dx;
  curY += dy;
}

Here is the caller graph for this function:

void GfxState::textMoveTo ( double  tx,
double  ty 
) [inline]

Definition at line 999 of file GfxState.h.

    { lineX = tx; lineY = ty; textTransform(tx, ty, &curX, &curY); }

Here is the call graph for this function:

Here is the caller graph for this function:

void GfxState::textSetPos ( double  tx,
double  ty 
) [inline]

Definition at line 998 of file GfxState.h.

{ lineX = tx; lineY = ty; }

Here is the caller graph for this function:

void GfxState::textShift ( double  tx,
double  ty 
)

Definition at line 2733 of file GfxState.cc.

                                             {
  double dx, dy;

  textTransformDelta(tx, ty, &dx, &dy);
  curX += dx;
  curY += dy;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void GfxState::textTransform ( double  x1,
double  y1,
double *  x2,
double *  y2 
) [inline]

Definition at line 932 of file GfxState.h.

    { *x2 = textMat[0] * x1 + textMat[2] * y1 + textMat[4];
      *y2 = textMat[1] * x1 + textMat[3] * y1 + textMat[5]; }

Here is the caller graph for this function:

void GfxState::textTransformDelta ( double  x1,
double  y1,
double *  x2,
double *  y2 
) [inline]

Definition at line 935 of file GfxState.h.

    { *x2 = textMat[0] * x1 + textMat[2] * y1;
      *y2 = textMat[1] * x1 + textMat[3] * y1; }

Here is the caller graph for this function:

void GfxState::transform ( double  x1,
double  y1,
double *  x2,
double *  y2 
) [inline]

Definition at line 926 of file GfxState.h.

    { *x2 = ctm[0] * x1 + ctm[2] * y1 + ctm[4];
      *y2 = ctm[1] * x1 + ctm[3] * y1 + ctm[5]; }

Here is the caller graph for this function:

void GfxState::transformDelta ( double  x1,
double  y1,
double *  x2,
double *  y2 
) [inline]

Definition at line 929 of file GfxState.h.

    { *x2 = ctm[0] * x1 + ctm[2] * y1;
      *y2 = ctm[1] * x1 + ctm[3] * y1; }
double GfxState::transformWidth ( double  w)

Definition at line 2579 of file GfxState.cc.

                                        {
  double x, y;

  x = ctm[0] + ctm[2];
  y = ctm[1] + ctm[3];
  return w * sqrt(0.5 * (x * x + y * y));
}

Here is the caller graph for this function:


Member Data Documentation

double GfxState::charSpace [private]

Definition at line 1036 of file GfxState.h.

double GfxState::clipXMax [private]

Definition at line 1047 of file GfxState.h.

double GfxState::clipXMin [private]

Definition at line 1047 of file GfxState.h.

double GfxState::clipYMax [private]

Definition at line 1047 of file GfxState.h.

double GfxState::clipYMin [private]

Definition at line 1047 of file GfxState.h.

double GfxState::ctm[6] [private]

Definition at line 1011 of file GfxState.h.

double GfxState::curX [private]

Definition at line 1044 of file GfxState.h.

double GfxState::curY [private]

Definition at line 1044 of file GfxState.h.

Definition at line 1017 of file GfxState.h.

Definition at line 1015 of file GfxState.h.

double GfxState::fillOpacity [private]

Definition at line 1021 of file GfxState.h.

Definition at line 1019 of file GfxState.h.

Definition at line 1028 of file GfxState.h.

GfxFont* GfxState::font [private]

Definition at line 1033 of file GfxState.h.

double GfxState::fontSize [private]

Definition at line 1034 of file GfxState.h.

double GfxState::horizScaling [private]

Definition at line 1038 of file GfxState.h.

double GfxState::leading [private]

Definition at line 1039 of file GfxState.h.

Definition at line 1030 of file GfxState.h.

double* GfxState::lineDash [private]

Definition at line 1025 of file GfxState.h.

Definition at line 1026 of file GfxState.h.

double GfxState::lineDashStart [private]

Definition at line 1027 of file GfxState.h.

Definition at line 1029 of file GfxState.h.

double GfxState::lineWidth [private]

Definition at line 1024 of file GfxState.h.

double GfxState::lineX [private]

Definition at line 1045 of file GfxState.h.

double GfxState::lineY [private]

Definition at line 1045 of file GfxState.h.

double GfxState::miterLimit [private]

Definition at line 1031 of file GfxState.h.

double GfxState::pageHeight [private]

Definition at line 1013 of file GfxState.h.

double GfxState::pageWidth [private]

Definition at line 1013 of file GfxState.h.

GfxPath* GfxState::path [private]

Definition at line 1043 of file GfxState.h.

double GfxState::px1 [private]

Definition at line 1012 of file GfxState.h.

double GfxState::px2 [private]

Definition at line 1012 of file GfxState.h.

double GfxState::py1 [private]

Definition at line 1012 of file GfxState.h.

double GfxState::py2 [private]

Definition at line 1012 of file GfxState.h.

int GfxState::render [private]

Definition at line 1041 of file GfxState.h.

double GfxState::rise [private]

Definition at line 1040 of file GfxState.h.

Definition at line 1050 of file GfxState.h.

Definition at line 1018 of file GfxState.h.

Definition at line 1016 of file GfxState.h.

double GfxState::strokeOpacity [private]

Definition at line 1022 of file GfxState.h.

Definition at line 1020 of file GfxState.h.

double GfxState::textMat[6] [private]

Definition at line 1035 of file GfxState.h.

double GfxState::wordSpace [private]

Definition at line 1037 of file GfxState.h.


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