Package com.inductiveautomation.rm.out
Class RMRTFWriter
java.lang.Object
com.inductiveautomation.rm.out.RMRTFWriter
Write RTF for a document.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Convert the shape into an image stream and embedd that into the rtf.void
appendRTF
(RMShape aShape, PrintStream ps) void
appendTable
(RMShapeTable table, PrintStream ps) Append table.void
appendText
(RMXString s, PrintStream ps) byte[]
getBytes
(RMDocument aDoc) Returns RTF bytes for given document.int
int
Looks up a font in the font table and adds it if it's not there.int
byte[]
getRTFForShapes
(RMDocument aDoc) Returns RTF for document Shapes.RTFBorderStyle
(boolean show, int width) Returns the rtf control string for borders.int
twip
(double x) Convert an rm coord to rtf 'twips'.void
Output all the fonts as an RTF fonttable.void
writeFont
(PrintStream aPS, RMFontFile aFontFile) Writes an entry in the font table for a particular font.void
Output all the fonts as an RTF FontTable.
-
Constructor Details
-
RMRTFWriter
public RMRTFWriter()
-
-
Method Details
-
getBytes
Returns RTF bytes for given document. -
getFontIndex
Looks up a font in the font table and adds it if it's not there. Returns the name that represents the font in the rtf ("f0", "f1", etc.) -
writeFontTable
Output all the fonts as an RTF FontTable. Fonts are all referenced by name, never embedded. -
writeFont
Writes an entry in the font table for a particular font. -
getRTFFontFamily
-
getRTFFontCharset
-
writeColorTable
Output all the fonts as an RTF fonttable. Fonts are all referenced by name, never embedded. -
getColorIndex
-
twip
public int twip(double x) Convert an rm coord to rtf 'twips'. A twip is a 20th of a point. -
getRTFForShapes
Returns RTF for document Shapes. -
appendRTF
-
appendTable
Append table. Tables are intermediary objects used for positioning content. Thus, tables themselves shouldn't do any drawing -
appendText
-
RTFBorderStyle
Returns the rtf control string for borders. Currently only does on or off. RTF has a zillion other possibilities. -
appendImageBytesForShape
Convert the shape into an image stream and embedd that into the rtf.
-