Class RTF::ImageNode
In: lib/rtf/node.rb
Parent: Node

This class represents an image within a RTF document. Currently only the PNG, JPEG and Windows Bitmap formats are supported. Efforts are made to identify the file type but these are not guaranteed to work.

Methods

new   to_rtf  

Constants

PNG = :pngblip   A definition for an image type constant.
JPEG = :jpegblip   A definition for an image type constant.
BITMAP = :dibitmap0   A definition for an image type constant.
LITTLE_ENDIAN = :little   A definition for an architecture endian constant.
BIG_ENDIAN = :big   A definition for an architecture endian constant.

Attributes

bottom_crop  [R]  Attribute accessor.
bottom_crop  [W]  Attribute mutator.
height  [R]  Attribute accessor.
left_crop  [R]  Attribute accessor.
left_crop  [W]  Attribute mutator.
right_crop  [R]  Attribute accessor.
right_crop  [W]  Attribute mutator.
top_crop  [R]  Attribute accessor.
top_crop  [W]  Attribute mutator.
width  [R]  Attribute accessor.
x_scaling  [W]  Attribute mutator.
x_scaling  [R]  Attribute accessor.
y_scaling  [R]  Attribute accessor.
y_scaling  [W]  Attribute mutator.

Public Class methods

This is the constructor for the ImageNode class.

Parameters

parent:A reference to the node that owns the new image node.
source:A reference to the image source. This must be a String or a File.
id:The unique identifier for the image node.

Exceptions

RTFError:Generated whenever the image specified is not recognised as a supported image type, something other than a String or File or IO is passed as the source parameter or if the specified source does not exist or cannot be accessed.

Public Instance methods

This method generates the RTF for an ImageNode object.

[Validate]