~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/extension/internal/pdfinput/pdf-parser.cpp

  • Committer: Diederik van Lierop
  • Date: 2009-12-24 20:10:43 UTC
  • Revision ID: diederik_van_lierop_mail_at-sign_diedenrezi_dot_nl-20091224201043-txzqbq2uvs8334ei
refactoring the snapping code (laying the groundwork for my next commit which reduces snap jitter)

Show diffs side-by-side

added added

removed removed

Lines of Context:
809
809
          blendingColorSpace = NULL;
810
810
          isolated = knockout = gFalse;
811
811
          if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
812
 
            blendingColorSpace = GfxColorSpace::parse(&obj5);
 
812
            blendingColorSpace = GfxColorSpace::parse(&obj5,(Gfx*)this);
813
813
          }
814
814
          obj5.free();
815
815
          if (obj4.dictLookup(const_cast<char*>("I"), &obj5)->isBool()) {
1009
1009
  state->setFillPattern(NULL);
1010
1010
  res->lookupColorSpace(args[0].getName(), &obj);
1011
1011
  if (obj.isNull()) {
1012
 
    colorSpace = GfxColorSpace::parse(&args[0]);
 
1012
    colorSpace = GfxColorSpace::parse(&args[0],(Gfx*)this);
1013
1013
  } else {
1014
 
    colorSpace = GfxColorSpace::parse(&obj);
 
1014
    colorSpace = GfxColorSpace::parse(&obj,(Gfx*)this);
1015
1015
  }
1016
1016
  obj.free();
1017
1017
  if (colorSpace) {
1032
1032
  state->setStrokePattern(NULL);
1033
1033
  res->lookupColorSpace(args[0].getName(), &obj);
1034
1034
  if (obj.isNull()) {
1035
 
    colorSpace = GfxColorSpace::parse(&args[0]);
 
1035
    colorSpace = GfxColorSpace::parse(&args[0],(Gfx*)this);
1036
1036
  } else {
1037
 
    colorSpace = GfxColorSpace::parse(&obj);
 
1037
    colorSpace = GfxColorSpace::parse(&obj,(Gfx*)this);
1038
1038
  }
1039
1039
  obj.free();
1040
1040
  if (colorSpace) {
1101
1101
      builder->updateStyle(state);
1102
1102
    }
1103
1103
    if (args[numArgs-1].isName() &&
1104
 
        (pattern = res->lookupPattern(args[numArgs-1].getName()))) {
 
1104
        (pattern = res->lookupPattern(args[numArgs-1].getName(),(Gfx*)this))) {
1105
1105
      state->setFillPattern(pattern);
1106
1106
      builder->updateStyle(state);
1107
1107
    }
1145
1145
      builder->updateStyle(state);
1146
1146
    }
1147
1147
    if (args[numArgs-1].isName() &&
1148
 
        (pattern = res->lookupPattern(args[numArgs-1].getName()))) {
 
1148
        (pattern = res->lookupPattern(args[numArgs-1].getName(),(Gfx*)this))) {
1149
1149
      state->setStrokePattern(pattern);
1150
1150
      builder->updateStyle(state);
1151
1151
    }
1543
1543
  double *matrix = NULL;
1544
1544
  GBool savedState = gFalse;
1545
1545
 
1546
 
  if (!(shading = res->lookupShading(args[0].getName()))) {
 
1546
  if (!(shading = res->lookupShading(args[0].getName(),(Gfx*)this))) {
1547
1547
    return;
1548
1548
  }
1549
1549
 
2507
2507
      }
2508
2508
    }
2509
2509
    if (!obj1.isNull()) {
2510
 
      colorSpace = GfxColorSpace::parse(&obj1);
 
2510
      colorSpace = GfxColorSpace::parse(&obj1,(Gfx*)this);
2511
2511
    } else if (csMode == streamCSDeviceGray) {
2512
2512
      colorSpace = new GfxDeviceGrayColorSpace();
2513
2513
    } else if (csMode == streamCSDeviceRGB) {
2592
2592
          obj2.free();
2593
2593
        }
2594
2594
      }
2595
 
      maskColorSpace = GfxColorSpace::parse(&obj1);
 
2595
      maskColorSpace = GfxColorSpace::parse(&obj1,(Gfx*)this);
2596
2596
      obj1.free();
2597
2597
      if (!maskColorSpace || maskColorSpace->getMode() != csDeviceGray) {
2598
2598
        goto err1;
2767
2767
    if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) {
2768
2768
      transpGroup = gTrue;
2769
2769
      if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
2770
 
        blendingColorSpace = GfxColorSpace::parse(&obj3);
 
2770
        blendingColorSpace = GfxColorSpace::parse(&obj3,(Gfx*)this);
2771
2771
      }
2772
2772
      obj3.free();
2773
2773
      if (obj1.dictLookup(const_cast<char*>("I"), &obj3)->isBool()) {