Class RtfColor
- Namespace
- iTextSharp.text.rtf.style
- Assembly
- iTextSharp.LGPLv2.Core.dll
The RtfColor stores one rtf color value for a rtf document @version \(Version:\) @author Mark Hall (Mark.Hall@mail.room3b.eu)
public class RtfColor : RtfElement, IRtfExtendedElement, IRtfBasicElement, IRtfElementInterface
- Inheritance
-
RtfColor
- Implements
- Inherited Members
Constructors
RtfColor(RtfDocument, int, int, int)
Constructs a RtfColor based on the red/green/blue values
public RtfColor(RtfDocument doc, int red, int green, int blue)
Parameters
doc
RtfDocumentThe RtfDocument this RtfColor belongs to
red
intThe red value to use
green
intThe green value to use
blue
intThe blue value to use
RtfColor(RtfDocument, int, int, int, int)
Constructor only for use when initializing the RtfColorList
protected RtfColor(RtfDocument doc, int red, int green, int blue, int colorNumber)
Parameters
doc
RtfDocumentThe RtfDocument this RtfColor belongs to
red
intThe red value to use
green
intThe green value to use
blue
intThe blue value to use
colorNumber
intThe number of the colour in the colour list
RtfColor(RtfDocument, BaseColor)
Constructs a RtfColor based on the Color
public RtfColor(RtfDocument doc, BaseColor col)
Parameters
doc
RtfDocumentThe RtfDocument this RtfColor belongs to
col
BaseColorThe Color to base this RtfColor on
RtfColor(RtfDocument, RtfColor)
Constructs a RtfColor as a clone of an existing RtfColor
public RtfColor(RtfDocument doc, RtfColor col)
Parameters
doc
RtfDocumentThe RtfDocument this RtfColor belongs to
col
RtfColorThe RtfColor to use as a base
Methods
Equals(object)
Tests if this RtfColor is equal to another RtfColor. false otherwise.
public override bool Equals(object obj)
Parameters
obj
objectanother RtfColor
Returns
- bool
True if red, green and blue values of the two colours match,
GetBlue()
Get the blue value of this RtfColor
public int GetBlue()
Returns
- int
The blue value
GetColorNumber()
Gets the number of this RtfColor in the list of colours
public int GetColorNumber()
Returns
- int
Returns the colorNumber.
GetGreen()
Get the green value of this RtfColor
public int GetGreen()
Returns
- int
The green value
GetHashCode()
Returns the hash code of this RtfColor. The hash code is an integer with the lowest three bytes containing the values of red, green and blue.
public override int GetHashCode()
Returns
- int
The hash code of this RtfColor
GetRed()
Get the red value of this RtfColor
public int GetRed()
Returns
- int
The red value
SetRtfDocument(RtfDocument)
Sets the RtfDocument this RtfColor belongs to
public override void SetRtfDocument(RtfDocument doc)
Parameters
doc
RtfDocumentThe RtfDocument to use
WriteBegin(Stream)
Writes the beginning of this RtfColor
public void WriteBegin(Stream result)
Parameters
result
Stream
WriteContent(Stream)
unused
public override void WriteContent(Stream outp)
Parameters
outp
Stream
WriteDefinition(Stream)
Write the definition part of this RtfColor.
public virtual void WriteDefinition(Stream outp)
Parameters
outp
Stream
WriteEnd(Stream)
Unused
public static void WriteEnd(Stream result)
Parameters
result
Stream