VectSharp 2.6.1
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.Markdown.MarkdownContext Class Reference

Represents the current status of the Markdown rendering process. More...

Public Member Functions

MarkdownContext Clone ()
 Create an independent copy of the current MarkdownContext. More...
 
double GetMaxX (double y, double pageMaxX)
 Get the maximum x value for text drawn at the specified y position. More...
 
double GetMaxX (double y0, double y1, double pageMaxX)
 Get the maximum x value for text that will extend from y0 to y1 . More...
 
double GetMinX (double y)
 Get the minimum x value at which text can start at the specified y position. More...
 
double GetMinX (double y0, double y1)
 Get the minimum x value for text that will extend from y0 to y1 . More...
 
void StartNewPage (Page newPag)
 Start a new page in the document. More...
 

Properties

Font Font [get, set]
 The current font. More...
 
Point Cursor [get, set]
 The current position of the cursor. More...
 
Colour Colour [get, set]
 The current text colour. More...
 
bool Underline [get, set]
 Whether text is currently underlined. More...
 
bool StrikeThrough [get, set]
 Whether text is currently struck out. More...
 
Point Translation [get, set]
 Translation for the current text block. More...
 
Point BottomRight [get, set]
 The coordinates of the bottom right corner of the last rendered text element. More...
 
Point MarginBottomRight [get, set]
 The current margin on the bottom right. More...
 
int ListDepth [get, set]
 The current list depth (for bullet lists and numbered lists). More...
 
List<(double MaxX, double MinY, double MaxY)> ForbiddenAreasRight [get, set]
 A list of areas on which text cannot be drawn (because they contain a right-aligned image). Each element of this list specifies a maximum x value (first element) and a y range (second and third element). Within the specified y range, text cannot extend beyond the maximum x value. More...
 
List<(double MinX, double MinY, double MaxY)> ForbiddenAreasLeft [get, set]
 A list of areas on which text cannot be drawn (because they contain a left-aligned image). Each element of this list specifies a minimum x value (first element) and a y range (second and third element). Within the specified y range, text starts at the minimum x value. More...
 
Page CurrentPage [get, set]
 The Page on which the document is being rendered. More...
 
string Tag = null [get, set]
 The current tag. More...
 
Dictionary< string, string > LinkDestinations = new Dictionary<string, string>() [get, set]
 A dictionary used to associate graphic action tags to hyperlinks. More...
 
Dictionary< string, string > InternalAnchors = new Dictionary<string, string>() [get, set]
 A dictionary used to associate internal html anchors (e.g., "#something") to graphics action tags. More...
 
List<(int level, string heading, string tag)> Headings = new List<(int level, string heading, string tag)>() [get]
 The list of headings defined in the document. More...
 
Line CurrentLine [get, set]
 The current line being drawn. More...
 

Detailed Description

Represents the current status of the Markdown rendering process.

Definition at line 26 of file MarkdownContext.cs.

Member Function Documentation

◆ Clone()

MarkdownContext VectSharp.Markdown.MarkdownContext.Clone ( )

Create an independent copy of the current MarkdownContext.

Returns
The copied context.

Definition at line 166 of file MarkdownContext.cs.

◆ GetMaxX() [1/2]

double VectSharp.Markdown.MarkdownContext.GetMaxX ( double  y,
double  pageMaxX 
)

Get the maximum x value for text drawn at the specified y position.

Parameters
yThe vertical position at which text should be drawn.
pageMaxXThe overall maximum x value for the page, after taking margins into account.
Returns
The maximum x value for text drawn at the specified y position.

Definition at line 195 of file MarkdownContext.cs.

◆ GetMaxX() [2/2]

double VectSharp.Markdown.MarkdownContext.GetMaxX ( double  y0,
double  y1,
double  pageMaxX 
)

Get the maximum x value for text that will extend from y0 to y1 .

Parameters
y0The vertical position of the start of the text block.
y1The vertical position of the end of the text block.
pageMaxXThe overall maximum x value for the page, after taking margins into account.
Returns
The maximum x value for text that will extend from y0 to y1 .

Definition at line 219 of file MarkdownContext.cs.

◆ GetMinX() [1/2]

double VectSharp.Markdown.MarkdownContext.GetMinX ( double  y)

Get the minimum x value at which text can start at the specified y position.

Parameters
yThe vertical position at which text should be drawn.
Returns
The minimum x value at which text can start at the specified y position.

Definition at line 242 of file MarkdownContext.cs.

◆ GetMinX() [2/2]

double VectSharp.Markdown.MarkdownContext.GetMinX ( double  y0,
double  y1 
)

Get the minimum x value for text that will extend from y0 to y1 .

Parameters
y0The vertical position of the start of the text block.
y1The vertical position of the end of the text block.
Returns
The minimum x value for text that will extend from y0 to y1 .

Definition at line 265 of file MarkdownContext.cs.

◆ StartNewPage()

void VectSharp.Markdown.MarkdownContext.StartNewPage ( Page  newPag)

Start a new page in the document.

Parameters
newPagThe new page on which the rest of the document should be drawn.

Definition at line 287 of file MarkdownContext.cs.

Property Documentation

◆ BottomRight

Point VectSharp.Markdown.MarkdownContext.BottomRight
getset

The coordinates of the bottom right corner of the last rendered text element.

Definition at line 97 of file MarkdownContext.cs.

◆ Colour

Colour VectSharp.Markdown.MarkdownContext.Colour
getset

The current text colour.

Definition at line 59 of file MarkdownContext.cs.

◆ CurrentLine

Line VectSharp.Markdown.MarkdownContext.CurrentLine
getset

The current line being drawn.

Definition at line 151 of file MarkdownContext.cs.

◆ CurrentPage

Page VectSharp.Markdown.MarkdownContext.CurrentPage
getset

The Page on which the document is being rendered.

Definition at line 126 of file MarkdownContext.cs.

◆ Cursor

Point VectSharp.Markdown.MarkdownContext.Cursor
getset

The current position of the cursor.

Definition at line 38 of file MarkdownContext.cs.

◆ Font

Font VectSharp.Markdown.MarkdownContext.Font
getset

The current font.

Definition at line 31 of file MarkdownContext.cs.

◆ ForbiddenAreasLeft

List<(double MinX, double MinY, double MaxY)> VectSharp.Markdown.MarkdownContext.ForbiddenAreasLeft
getset

A list of areas on which text cannot be drawn (because they contain a left-aligned image). Each element of this list specifies a minimum x value (first element) and a y range (second and third element). Within the specified y range, text starts at the minimum x value.

Definition at line 121 of file MarkdownContext.cs.

◆ ForbiddenAreasRight

List<(double MaxX, double MinY, double MaxY)> VectSharp.Markdown.MarkdownContext.ForbiddenAreasRight
getset

A list of areas on which text cannot be drawn (because they contain a right-aligned image). Each element of this list specifies a maximum x value (first element) and a y range (second and third element). Within the specified y range, text cannot extend beyond the maximum x value.

Definition at line 114 of file MarkdownContext.cs.

◆ Headings

List<(int level, string heading, string tag)> VectSharp.Markdown.MarkdownContext.Headings = new List<(int level, string heading, string tag)>()
get

The list of headings defined in the document.

Definition at line 146 of file MarkdownContext.cs.

◆ InternalAnchors

Dictionary<string, string> VectSharp.Markdown.MarkdownContext.InternalAnchors = new Dictionary<string, string>()
getset

A dictionary used to associate internal html anchors (e.g., "#something") to graphics action tags.

Definition at line 141 of file MarkdownContext.cs.

◆ LinkDestinations

Dictionary<string, string> VectSharp.Markdown.MarkdownContext.LinkDestinations = new Dictionary<string, string>()
getset

A dictionary used to associate graphic action tags to hyperlinks.

Definition at line 136 of file MarkdownContext.cs.

◆ ListDepth

int VectSharp.Markdown.MarkdownContext.ListDepth
getset

The current list depth (for bullet lists and numbered lists).

Definition at line 107 of file MarkdownContext.cs.

◆ MarginBottomRight

Point VectSharp.Markdown.MarkdownContext.MarginBottomRight
getset

The current margin on the bottom right.

Definition at line 102 of file MarkdownContext.cs.

◆ StrikeThrough

bool VectSharp.Markdown.MarkdownContext.StrikeThrough
getset

Whether text is currently struck out.

Definition at line 69 of file MarkdownContext.cs.

◆ Tag

string VectSharp.Markdown.MarkdownContext.Tag = null
getset

The current tag.

Definition at line 131 of file MarkdownContext.cs.

◆ Translation

Point VectSharp.Markdown.MarkdownContext.Translation
getset

Translation for the current text block.

Definition at line 76 of file MarkdownContext.cs.

◆ Underline

bool VectSharp.Markdown.MarkdownContext.Underline
getset

Whether text is currently underlined.

Definition at line 64 of file MarkdownContext.cs.


The documentation for this class was generated from the following file: