C# Class TemplNET.TemplMatchPicture

Represents a picture, located by matching a placeholder string in the scope of this picture's Description field
Inheritance: TemplMatchText
显示文件 Open project: CPonty/templ-dot-net Class Usage Examples

Public Properties

Property Type Description
Picture Novacode.Picture
Width int

Public Methods

Method Description
Find ( TemplRegex rxp, IEnumerable paragraphs ) : IEnumerable
Find ( TemplRegex rxp, Paragraph p ) : IEnumerable
RemovePlaceholder ( ) : void

Removes the matched Picture from the document.

SetDescription ( string text ) : TemplMatchPicture

Sets the string in the Picture's Description property.

ToText ( string text ) : TemplMatchPicture

Inserts text at the *beginning* of the Picture's Paragraph. Picture is removed.

Private Methods

Method Description
Find ( TemplRegex rxp, Paragraph p, Picture pic ) : IEnumerable
InsertPicture ( TemplGraphic graphic, int width ) : void

Inserts a picture of a specific pixel width. Aspect ratio is maintained. Matched Picture is removed.

Method Details

Find() public static method

public static Find ( TemplRegex rxp, IEnumerable paragraphs ) : IEnumerable
rxp TemplRegex
paragraphs IEnumerable
return IEnumerable

Find() public static method

public static Find ( TemplRegex rxp, Paragraph p ) : IEnumerable
rxp TemplRegex
p Novacode.Paragraph
return IEnumerable

RemovePlaceholder() public method

Removes the matched Picture from the document.
public RemovePlaceholder ( ) : void
return void

SetDescription() public method

Sets the string in the Picture's Description property.
public SetDescription ( string text ) : TemplMatchPicture
text string
return TemplMatchPicture

ToText() public method

Inserts text at the *beginning* of the Picture's Paragraph. Picture is removed.
public ToText ( string text ) : TemplMatchPicture
text string
return TemplMatchPicture

Property Details

Picture public_oe property

public Picture,Novacode Picture
return Novacode.Picture

Width public_oe property

public int Width
return int