ImageGear .NET - Updated
ImGearARTRichText Class
Members  Example 




ImageGear24.Art Assembly > ImageGear.ART Namespace : ImGearARTRichText Class
Represents ART Rich Text mark.
Object Model
ImGearARTRichText ClassImGearARTBorder ClassImGearRectangle StructureImGearARTRichTextControl ClassIImGearRGBQuad InterfaceImGearRectangle Structure
Syntax
'Declaration
 
Public Class ImGearARTRichText 
   Inherits ImGearARTMark
'Usage
 
Dim instance As ImGearARTRichText
public class ImGearARTRichText : ImGearARTMark 
public __gc class ImGearARTRichText : public ImGearARTMark 
public ref class ImGearARTRichText : public ImGearARTMark 
Example
// Setup color for the rich text border.
ImGearRGBQuad igRGBQuadBorder = new ImGearRGBQuad(0, 255, 255);
// Setup a border with a width of 3 and a solid pattern.
ImGearARTBorder igARTBorder = new ImGearARTBorder(
    igRGBQuadBorder, 3, ImGearARTPenStyle.SOLID
);
// Setup rectangle for the rich text mark's location.
ImGearRectangle igRectangle = new ImGearRectangle(10, 10, 300, 40);
// Setup fill color for the rich text mark.
ImGearRGBQuad igRGBQuad = new ImGearRGBQuad(210, 210, 210);
// Set initial rich text string
string richText = "{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033{\\fonttbl{\\f0\\fnil\\fcharset0 Arial;}}\r\n";
richText += "\\viewkind4\\uc1\\pard\\fs23 ImGearARTRichText test\\par\r\n}\r\n";
// Create rich text mark with 70% opacity
ImGearARTRichText igARTRichText = new ImGearARTRichText(
    igRectangle, richText, igRGBQuad, igARTBorder, (int)(0.70 * 255)
);
// Add the annotation to the ARTPage.
igARTPage.AddMark(igARTRichText, ImGearARTCoordinatesType.IMAGE_COORD);
' Setup color for the rich text border.
Dim igRGBQuadBorder As New ImGearRGBQuad(0, 255, 255)
' Setup a border with a width of 3 and a solid pattern.
Dim igARTBorder As New ImGearARTBorder(igRGBQuadBorder, 3, ImGearARTPenStyle.SOLID)
' Setup rectangle for the rich text mark's location.
Dim igRectangle As New ImGearRectangle(10, 10, 300, 40)
' Setup fill color for the rich text mark.
Dim igRGBQuad As New ImGearRGBQuad(210, 210, 210)
' Set initial rich text string
Dim richText As String = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}"
richText += Chr(13) & "" & Chr(10) & "\viewkind4\uc1\pard\fs23 ImGearARTRichText test\par"
richText += Chr(13) & "" & Chr(10) & "}" & Chr(13) & "" & Chr(10) & ""
' Create rich text mark with 70% opacity
Dim igARTRichText As New ImGearARTRichText( _
 igRectangle, richText, igRGBQuad, igARTBorder, CInt(0.7 * 255))
' Add the annotation to the ARTPage.
igARTPage.AddMark(igARTRichText, ImGearARTCoordinatesType.IMAGE_COORD)
Inheritance Hierarchy

System.Object
   ImageGear.ART.ImGearARTSelection
      ImageGear.ART.ImGearARTMark
         ImageGear.ART.ImGearARTRichText

See Also

Reference

ImGearARTRichText Members
ImageGear.ART Namespace