public class ColorsWriter extends TextWriter
Encapsulates methods to write color info into PDF stream.
IsCoreFontUsed, isFontNotFoundExceptionThrown, IsUnderlineWritten, LastRequestedFontWasNonTruetypeItalicButWasSubtitutedWithTrueTypeNonItalic, MustUseFontMapFile, textRotatingAngle
clipObjects, ClippingArea, HasUnicodeInBookmark, IsUnicodeWithWordSpacing, JavaScripts, XmpMetadata, XmpMetadataID
LastObjIdOfEveryPage
Modifier and Type | Method and Description |
---|---|
void |
addPatternInResource(Pdf doc,
PatternColorSpace pattern) |
void |
adjustPatternMatrix(PatternColorSpace pattern,
float xOffset,
float yOffset,
float xScale,
float yScale,
float angleGrad,
float xSkewAngle,
float ySkewAngle) |
void |
beginTilingPattern(int patternIndex)
Starts a new pattern definition.
|
void |
endTilingPattern()
Ends a pattern definition and put info into stream..
|
void |
setColor(String type,
String colorSpace,
float[] colorArray,
boolean forPattern)
Sets the current colorspace and color.
|
void |
writeShadingGradientPattern(int patternIndex) |
doReverse, doReverse, findOrLoadFont, findOrLoadRelevantFont, getFontDescender, getFontStreams, getLeading, getLengthOfBiggestWordLoadFontIfNecessary, getStringWidth, getTextRise, getTtFontFileName, isFontWarning, isFontWarning, isNeedInitRes, isNeedInitRes, isOverline, isOverline, isStrikeout, isStrikeout, isUnderline, isUnderline, loadSuitableCustomFontIfAbsentYet, loadSuitableFontIfNotYetAndGetStringWidth, reverseStringAndReturnEmptyStringIfNull, setCharSpacing, setCurrentFont, setCustomFonts, setDefaultFontName, setFont, setFontStreams, setFontStretch, setFontWeight, setHorizScaling, setLeading, setOverlineOffset, setSegmentDefaultFontName, setTextRenderingMode, setTextRise, setUnderlineOffset, setWordSpacing, showBoxedText, showOnPosition
adjustBuffer, adjustBuffer1, beginContentsSection, beginDict, beginObj, beginPage, beginPath, beginStream, close, closePath, compress, endContentSection, endDict, endObj, endPage, endPath, endStream, endText, getBuffer, isIdentityMatrix, lineTo, moveTo, newXobject, open, open, putToStream, putToStream, restoreState, restoreToState, saveState, setClippingArea, setDash, setFileName, setLineCap, setLineWidth, stroke, writeEnquotedSting
allocID, checkScope, getCommon, getCompatibility, getCompressionLevel, getConformance, getCurrentMCID, getDocInfo, getDocObject, getDocResource, getEncryptionInfo, getHyperTextInfo, getLinearized, getPageInfo, getPageLayoutInfo, getState, isBuffered, isBuffered, setCompressionLevel, setConformance, setCurrentMCID, setCurrentStructElement, setLinearized
public void setColor(String type, String colorSpace, float[] colorArray, boolean forPattern)
Sets the current colorspace and color.
type
- A string which specifies what the color is set for. It can be
'stroke', 'fill', or 'both'.colorSpace
- A string which specifies the colorspace. It can be
'gray', 'rgb', 'cmyk', 'spot', or 'pattern'.colorArray
- A float array that contains color data. public void beginTilingPattern(int patternIndex)
Starts a new pattern definition.
patternData
- A float array which contains the data of the pattern.
This array have four members:width,height,horizontal step and vertical
step. width and height indicate the the dimensions of the pattern��s
bounding box in points. horizontal step and vertical step indicate the
offsets when repeatedly placing the pattern to stroke or fill some
objects.paintType
- The print type value. It can be 1 or 2. If the value is
1, the pattern must contain its own color specification which will be
applied when the pattern is used;if the value is 2,the pattern must not
contain any color specification and the current color will be used
instead.public void endTilingPattern()
Ends a pattern definition and put info into stream..
public void writeShadingGradientPattern(int patternIndex)
public void addPatternInResource(Pdf doc, PatternColorSpace pattern)
public void adjustPatternMatrix(PatternColorSpace pattern, float xOffset, float yOffset, float xScale, float yScale, float angleGrad, float xSkewAngle, float ySkewAngle)
Copyright © 2016 Aspose. All Rights Reserved.