/** * Delegates to the enclosed <code>GeneralPath</code>. */ public void reset() { path.reset(); numSeg = 0; numVals = 0; values = null; types = null; }
@Override public void strokePath() throws IOException { graphics.setComposite(getGraphicsState().getStrokingJavaComposite()); graphics.setPaint(getStrokingPaint()); graphics.setStroke(getStroke()); setClip(); //TODO bbox of shading pattern should be used here? (see fillPath) if (isContentRendered()) { graphics.draw(linePath); } linePath.reset(); }
@Override public void endPath() { if (clipWindingRule != -1) { currentPath.setWindingRule(clipWindingRule); getGraphicsState().intersectClippingPath(currentPath); clipWindingRule = -1; } currentPath.reset(); }
@Override public void endPath() { if (clipWindingRule != -1) { linePath.setWindingRule(clipWindingRule); getGraphicsState().intersectClippingPath(linePath); // PDFBOX-3836: lastClip needs to be reset, because after intersection it is still the same // object, thus setClip() would believe that it is cached. lastClip = null; clipWindingRule = -1; } linePath.reset(); }
linePath.reset();
/** * Delegates to the enclosed <code>GeneralPath</code>. */ public void reset() { path.reset(); numSeg = 0; numVals = 0; values = null; types = null; }
/** * Delegates to the enclosed <code>GeneralPath</code>. */ public synchronized void reset() { path.reset(); numSeg = 0; numVals = 0; values = null; types = null; }
/** * Delegates to the enclosed <code>GeneralPath</code>. */ public synchronized void reset() { path.reset(); numSeg = 0; numVals = 0; values = null; types = null; }
/** * Sets the location of the start of the path that represents * the <code>Edge</code>. * @param x The horizontal location. * @param y The vertical location. */ public void setPathOrigin(int x, int y) { path.reset(); path.moveTo(x, y); }
/** * Returns a right-pointing triangle of the given dimensions. */ public Shape triangle_right(float x, float y, float height) { m_path.reset(); m_path.moveTo(x,y+height); m_path.lineTo(x+height, y+height/2); m_path.lineTo(x, y); m_path.closePath(); return m_path; }
public Shape getShape(float xMin, float yMin, float xMax, float yMax) { path.reset(); path.moveTo((xMin + xMax) / 2.0f, yMin); path.lineTo(xMax, yMax); path.lineTo(xMin, yMax); path.closePath(); return path; } }
/** * Returns a up-pointing triangle of the given dimensions. */ public Shape triangle_up(float x, float y, float height) { m_path.reset(); m_path.moveTo(x,y+height); m_path.lineTo(x+height/2, y); m_path.lineTo(x+height, (y+height)); m_path.closePath(); return m_path; }
/** * Returns a left-pointing triangle of the given dimensions. */ public Shape triangle_left(float x, float y, float height) { m_path.reset(); m_path.moveTo(x+height, y); m_path.lineTo(x+height, y+height); m_path.lineTo(x, y+height/2); m_path.closePath(); return m_path; }
/** * Returns a diamond shape of the given dimensions. */ public Shape diamond(float x, float y, float height) { m_path.reset(); m_path.moveTo(x,(y+0.5f*height)); m_path.lineTo((x+0.5f*height),y); m_path.lineTo((x+height),(y+0.5f*height)); m_path.lineTo((x+0.5f*height),(y+height)); m_path.closePath(); return m_path; }
public Shape getShape(float xMin, float yMin, float xMax, float yMax) { path.reset(); path.moveTo(xMin, yMin); path.lineTo(((2.0f * xMax) + xMin) / 3.0f, yMin); path.lineTo(xMax, yMax); path.lineTo(((2.0f * xMin) + xMax) / 3.0f, yMax); path.closePath(); return path; } }
public Shape getShape(float xMin, float yMin, float xMax, float yMax) { path.reset(); path.moveTo((xMin + xMax) / 2.0f, yMin); path.lineTo(xMax, (yMin + yMax) / 2.0f); path.lineTo((xMin + xMax) / 2.0f, yMax); path.lineTo(xMin, (yMin + yMax) / 2.0f); path.closePath(); return path; } }
@Override public void strokePath() throws IOException { graphics.setComposite(getGraphicsState().getStrokingJavaComposite()); graphics.setPaint(getStrokingPaint()); graphics.setStroke(getStroke()); setClip(); //TODO bbox of shading pattern should be used here? (see fillPath) graphics.draw(linePath); linePath.reset(); }
@Override public void processSegment(CubicCurve2D segment, double startT, double endT) { if(0.0==startT) { this.segsChain.reset(); this.segsChain.moveTo(segment.getX1(), segment.getY1()); this.numSegs=0; } this.segsChain.lineTo(segment.getX2(), segment.getY2()); this.numSegs++; }
@Override public void processSegment(QuadCurve2D segment, double startT, double endT) { if(0.0==startT) { this.segsChain.reset(); this.segsChain.moveTo(segment.getX1(), segment.getY1()); this.numSegs=0; } this.segsChain.lineTo(segment.getX2(), segment.getY2()); this.numSegs++; }