View | Details | Raw Unified | Return to bug 141242
Collapse All | Expand All

(-)xpdf/splash/Splash.cc (-15 / +17 lines)
Lines 426-431 void Splash::strokeNarrow(SplashXPath *x Link Here
426
  int nClipRes[3];
426
  int nClipRes[3];
427
  int i;
427
  int i;
428
428
429
  nClipRes[0] = nClipRes[1] = nClipRes[2] = 0;
430
429
  for (i = 0, seg = xPath->segs; i < xPath->length; ++i, ++seg) {
431
  for (i = 0, seg = xPath->segs; i < xPath->length; ++i, ++seg) {
430
432
431
    x0 = splashFloor(seg->x0);
433
    x0 = splashFloor(seg->x0);
Lines 842-859 SplashError Splash::fillWithPattern(Spla Link Here
842
    // draw the spans
844
    // draw the spans
843
    for (y = yMinI; y <= yMaxI; ++y) {
845
    for (y = yMinI; y <= yMaxI; ++y) {
844
      while (scanner->getNextSpan(y, &x0, &x1)) {
846
      while (scanner->getNextSpan(y, &x0, &x1)) {
847
        // limit the x range
848
	if (x0 < state->clip->getXMin()) {
849
	  x0 = state->clip->getXMin();
850
	}
851
	if (x1 > state->clip->getXMax()) {
852
	  x1 = state->clip->getXMax();
853
	}
845
	if (clipRes == splashClipAllInside) {
854
	if (clipRes == splashClipAllInside) {
846
	  drawSpan(x0, x1, y, pattern, alpha, gTrue);
855
	  drawSpan(x0, x1, y, pattern, alpha, gTrue);
847
	} else {
856
	} else {
848
	  // limit the x range
849
	  if (x0 < state->clip->getXMin()) {
850
	    x0 = state->clip->getXMin();
851
	  }
852
	  if (x1 > state->clip->getXMax()) {
853
	    x1 = state->clip->getXMax();
854
	  }
855
	  clipRes2 = state->clip->testSpan(x0, x1, y);
857
	  clipRes2 = state->clip->testSpan(x0, x1, y);
856
	  drawSpan(x0, x1, y, pattern, alpha, clipRes2 == splashClipAllInside);
858
          drawSpan(x0, x1, y, pattern, alpha, clipRes2 == splashClipAllInside);
857
	}
859
	}
858
      }
860
      }
859
    }
861
    }
Lines 896-911 SplashError Splash::xorFill(SplashPath * Link Here
896
    // draw the spans
898
    // draw the spans
897
    for (y = yMinI; y <= yMaxI; ++y) {
899
    for (y = yMinI; y <= yMaxI; ++y) {
898
      while (scanner->getNextSpan(y, &x0, &x1)) {
900
      while (scanner->getNextSpan(y, &x0, &x1)) {
901
	// limit the x range
902
	if (x0 < state->clip->getXMin()) {
903
	  x0 = state->clip->getXMin();
904
	}
905
	if (x1 > state->clip->getXMax()) {
906
	  x1 = state->clip->getXMax();
907
	}
899
	if (clipRes == splashClipAllInside) {
908
	if (clipRes == splashClipAllInside) {
900
	  xorSpan(x0, x1, y, state->fillPattern, gTrue);
909
	  xorSpan(x0, x1, y, state->fillPattern, gTrue);
901
	} else {
910
	} else {
902
	  // limit the x range
903
	  if (x0 < state->clip->getXMin()) {
904
	    x0 = state->clip->getXMin();
905
	  }
906
	  if (x1 > state->clip->getXMax()) {
907
	    x1 = state->clip->getXMax();
908
	  }
909
	  clipRes2 = state->clip->testSpan(x0, x1, y);
911
	  clipRes2 = state->clip->testSpan(x0, x1, y);
910
	  xorSpan(x0, x1, y, state->fillPattern,
912
	  xorSpan(x0, x1, y, state->fillPattern,
911
		  clipRes2 == splashClipAllInside);
913
		  clipRes2 == splashClipAllInside);

Return to bug 141242