This is available as
fillAndStrokeEvenOdd
but not in RC3, only in the SNAPSHOT and the upcoming release.
Tilman
/**
* Fills the path using the nonzero winding number rule.
*
* @throws IOException If the content stream could not be written
* @throws IllegalStateException If the method was called within a
text block.
*/
public void fill() throws IOException
{
if (inTextMode)
{
throw new IllegalStateException("Error: fill is not allowed
within a text block.");
}
writeOperator("f");
}
/**
* Fills the path using the even-odd winding rule.
*
* @throws IOException If the content stream could not be written
* @throws IllegalStateException If the method was called within a
text block.
*/
public void fillEvenOdd() throws IOException
{
if (inTextMode)
{
throw new IllegalStateException("Error: fillEvenOdd is not
allowed within a text block.");
}
writeOperator("f*");
}
/**
* Fill and then stroke the path, using the nonzero winding number
rule to determine the region
* to fill. This shall produce the same result as constructing two
identical path objects,
* painting the first with {@link #fill() } and the second with
{@link #stroke() }.
*
* @throws IOException If the content stream could not be written
* @throws IllegalStateException If the method was called within a
text block.
*/
public void fillAndStroke() throws IOException
{
if (inTextMode)
{
throw new IllegalStateException("Error: fillAndStroke is
not allowed within a text block.");
}
writeOperator("B");
}
/**
* Fill and then stroke the path, using the even-odd rule to
determine the region to
* fill. This shall produce the same result as constructing two
identical path objects, painting
* the first with {@link #fillEvenOdd() } and the second with
{@link #stroke() }.
*
* @throws IOException If the content stream could not be written
* @throws IllegalStateException If the method was called within a
text block.
*/
public void fillAndStrokeEvenOdd() throws IOException
{
if (inTextMode)
{
throw new IllegalStateException("Error:
fillAndStrokeEvenOdd is not allowed within a text block.");
}
writeOperator("B*");
}
/**
* Close, fill, and then stroke the path, using the nonzero winding
number rule to determine the
* region to fill. This shall have the same effect as the sequence
{@link #closePath() }
* and then {@link #fillAndStroke() }.
*
* @throws IOException If the content stream could not be written
* @throws IllegalStateException If the method was called within a
text block.
*/
public void closeAndFillAndStroke() throws IOException
{
if (inTextMode)
{
throw new IllegalStateException("Error:
closeAndFillAndStroke is not allowed within a text block.");
}
writeOperator("b");
}
/**
* Close, fill, and then stroke the path, using the even-odd rule
to determine the region to
* fill. This shall have the same effect as the sequence {@link
#closePath() }
* and then {@link #fillAndStrokeEvenOdd() }.
*
* @throws IOException If the content stream could not be written
* @throws IllegalStateException If the method was called within a
text block.
*/
public void closeAndFillAndStrokeEvenOdd() throws IOException
{
if (inTextMode)
{
throw new IllegalStateException("Error:
closeAndFillAndStrokeEvenOdd is not allowed within a text block.");
}
writeOperator("b*");
}
Am 13.03.2016 um 21:45 schrieb Jan Tosovsky:
Dear All,
I am trying to fill and stroke my Bezier path object in one step, but I
cannot find any standard way in pdfBox 2.0 API. So far I only found
utilizing a deprecated method appendRawCommands("\nB*\n")
http://stackoverflow.com/questions/32064316/pdfbox-unable-to-draw-bezier-cur
ve
What is proper replacement, if any?
Thanks, Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]