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

Renders Markdown documents into VectSharp graphics objects. More...

Public Types

enum  VerticalAlignment
 Defines the options for the vertical alignment of table cells. More...
 

Public Member Functions

Page RenderSinglePage (string markdownSource, double width, out Dictionary< string, string > linkDestinations)
 Parses the supplied markdownSource using all the supported extensions and renders the resulting document. Page breaks are disabled, and the document is rendered as a single page with the specified width . The page will be cropped at the appropriate height to contain the entire document. More...
 
Page RenderSinglePage (MarkdownDocument markdownDocument, double width, out Dictionary< string, string > linkDestinations)
 Renders the supplied markdownDocument . Page breaks are disabled, and the document is rendered as a single page with the specified width . The page will be cropped at the appropriate height to contain the entire document. More...
 
Document Render (string markdownSource, out Dictionary< string, string > linkDestinations)
 Parses the supplied markdownSource using all the supported extensions and renders the resulting document. The Document produced consists of one or more pages of the size specified in the PageSize of the current instance. More...
 
Document Render (MarkdownDocument mardownDocument, out Dictionary< string, string > linkDestinations)
 Renders the supplied mardownDocument . The Document produced consists of one or more pages of the size specified in the PageSize of the current instance. More...
 

Properties

double BaseFontSize = 9.71424 [get, set]
 The base font size to use when rendering the document. This will be the size of regular elements, and the size of header elements will be expressed as a multiple of this. More...
 
double MathFontScalingFactor = 0.85 [get, set]
 Scaling factor for the font size to use when rendering math. More...
 
double[] HeaderFontSizeMultipliers [get]
 The font size for elements at each header level. The values in this array will be multiplied by the BaseFontSize. More...
 
double[] HeaderLineThicknesses = new double[] { 1, 1, 0, 0, 0, 0 } [get]
 The thickness of the separator line after a header of each level. A value of 0 disables the line after headers of that level. More...
 
double ThematicBreakThickness = 2 [get, set]
 The thickness of thematic break lines. More...
 
FontFamily RegularFontFamily = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.Helvetica) [get, set]
 The font family for regular text. More...
 
FontFamily BoldFontFamily = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.HelveticaBold) [get, set]
 The font family for bold text. More...
 
FontFamily ItalicFontFamily = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.HelveticaOblique) [get, set]
 The font family for italic text. More...
 
FontFamily BoldItalicFontFamily = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.HelveticaBoldOblique) [get, set]
 The font family for bold italic text. More...
 
FontFamily CodeFont = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.Courier) [get, set]
 The font family for code elements. More...
 
FontFamily CodeFontBold = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.CourierBold) [get, set]
 The font family for bold code elements. More...
 
FontFamily CodeFontItalic = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.CourierOblique) [get, set]
 The font family for italic code elements. More...
 
FontFamily CodeFontBoldItalic = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.CourierBoldOblique) [get, set]
 The font family for bold italic code elements. More...
 
double UnderlineThickness = 0.075 [get, set]
 The thickness of underlines. This value will be multiplied by the font size of the element being underlined. More...
 
double BoldUnderlineThickness = 0.15 [get, set]
 The thickness of underlines for bold text. This value will be multiplied by the font size of the element being underlined. More...
 
Margins Margins = new Margins(55, 55, 55, 55) [get, set]
 The margins of the page. More...
 
Margins TableCellMargins = new Margins(5, 0, 5, 0) [get, set]
 The margins for table cells. More...
 
VerticalAlignment TableVAlign = VerticalAlignment.Middle [get, set]
 The vertical alignment of table cells. More...
 
Size PageSize = new Size(595, 842) [get, set]
 The size of the page. More...
 
double SpaceBeforeParagaph = 0 [get, set]
 The space before each text paragraph. This value will be multiplied by the BaseFontSize. More...
 
double SpaceAfterParagraph = 0.75 [get, set]
 The space after each text paragraph. This value will be multiplied by the BaseFontSize. More...
 
double SpaceAfterLine = 0.25 [get, set]
 The space after each line of text. This value will be multiplied by the BaseFontSize. More...
 
double SpaceBeforeHeading = 0.25 [get, set]
 The space before each heading. This value will be multiplied by the font size of the heading. More...
 
double SpaceAfterHeading = 0.25 [get, set]
 The space after each heading. This value will be multiplied by the font size of the heading. More...
 
double CodeInlineMargin = 0.25 [get, set]
 The margin at the left and right of code inlines. This value will be multiplied by the current font size. More...
 
double IndentWidth = 40 [get, set]
 The indentation width used for list items. More...
 
double QuoteBlockIndentWidth = 30 [get, set]
 The indentation width used for block quotes. More...
 
double QuoteBlockBarWidth = 5 [get, set]
 The thickness of the bar to the left of block quotes. More...
 
double SubSuperscriptFontSize = 0.7 [get, set]
 The font size for subscripts and superscripts. This value will be multiplied by the current font size. More...
 
double SuperscriptShift = 0.33 [get, set]
 The upwards shift in the baseline for superscript elements. This value will be multiplied by the current font size. More...
 
double SubscriptShift = 0.14 [get, set]
 The downwards shift in the baseline for subscript elements. This value will be multiplied by the current font size. More...
 
string BaseImageUri = "" [get, set]
 The base uri for resolving relative image addresses. More...
 
Func< string, string,(string, bool)> ImageUriResolver = HTTPUtils.ResolveImageURI [get, set]
 A method used to resolve (possibly remote) image uris into local file paths. The first argument of the method should be the image uri and the second argument the base uri used to resolve relative links. The method should return a tuple containing the path of the local file and a boolean value indicating whether the file has been fetched from a remote location and should be deleted after the program has finished using it. More...
 
Uri BaseLinkUri = new Uri("about:blank") [get, set]
 The base uri for resolving links. More...
 
Func< string, string > LinkUriResolver = a => a [get, set]
 A method used to resolve link addresses. The argument of the method should be the absolute link, and the method should return the resolved address. This can be used to "redirect" links to a different target. More...
 
Func< string, RasterImageRasterImageLoader = null [get, set]
 A method used to a load raster image from a local file. The argument of the method should be the path of a local image file, and the method should return a RasterImage representing that file. For example, this can be achieved using the RasterImageFile class from the VectSharp.MuPDFUtils package. If this is null, only SVG images will be included in the document. More...
 
double ImageUnitMultiplier = 0.60714 [get, set]
 The size of images (as defined in the image's width and height attributes) will be multiplied by this value to determine the actual size of the image on the page. This has no effect on images without a width or height attribute. More...
 
double ImageMultiplier = 1 [get, set]
 The size of images will be multiplied by this value to determine the actual size of the image on the page. For images that have a width or height attribute, this will be applied in addition to the ImageUnitMultiplier. For images without width and height, only this multiplier will be applied. More...
 
double ImageSideMargin = 10 [get, set]
 The margin on the right of left-aligned images and on the left of right-aligned images. More...
 
double ImageMarginTolerance = 25 [get, set]
 Images will be allowed to extend into the page bottom margin area by this amount before triggering a page break. This should be smaller than the bottom margin, otherwise images risk being cut off by the page boundary. More...
 
Func< string, string, List< List< FormattedString > > > SyntaxHighlighter = VectSharp.Markdown.SyntaxHighlighter.GetSyntaxHighlightedLines [get, set]
 A method used for syntax highlighting. The first argument should be the source code to highlight, while the second parameter is the name of the language to use for the highlight. The method should return a list of lists of FormattedStrings, with each list of FormattedStrings representing a line. For each code block, if the method returns null, no syntax highlighting is used. More...
 
List< Action< Graphics, Colour > > Bullets [get]
 Bullet points used for unordered lists. Each element of this list corresponds to the bullet for each level of list indentation. If the list indentation is greater than the number of elements in this list, the bullet points will be reused cyclically. Each element of this list is a method taking two arguments: the first is the Graphics object on which the bullet point should be drawn, while the second is the colour in which it should be painted. The method should draw the bullet point centered around the origin. The size of the bullet point will be multiplied by the current font size. More...
 
Colour ForegroundColour = Colours.Black [get, set]
 The foreground colour for text elements. More...
 
Colour BackgroundColour = Colours.White [get, set]
 The background colour for the page. More...
 
Colour HeaderLineColour = Colour.FromRgb(180, 180, 180) [get, set]
 The colour of the line below headers. More...
 
Colour ThematicBreakLineColour = Colour.FromRgb(180, 180, 200) [get, set]
 The colour for thematic break lines. More...
 
Colour LinkColour = Colour.FromRgb(25, 140, 191) [get, set]
 The colour for hypertext links- More...
 
Colour CodeInlineBackgroundColour = Colour.FromRgb(240, 240, 240) [get, set]
 The background colour for code inlines. More...
 
Colour CodeBlockBackgroundColour = Colour.FromRgb(240, 240, 245) [get, set]
 The background colour for code blocks. More...
 
Colour QuoteBlockBarColour = Colour.FromRgb(75, 152, 220) [get, set]
 The colour for the bar to the left of block quotes. More...
 
Colour QuoteBlockBackgroundColour = Colour.FromRgb(240, 240, 255) [get, set]
 The background colour for block quotes. More...
 
Colour InsertedColour = Colour.FromRgb(0, 158, 115) [get, set]
 The colour for text that has been styled as "inserted". More...
 
Colour MarkedColour = Colour.FromRgb(213, 94, 0) [get, set]
 The colour for text that has been styled as "marked". More...
 
Colour TableHeaderRowSeparatorColour = Colours.Black [get, set]
 The colour for the line separating the table header row from normal rows. More...
 
Colour TableRowSeparatorColour = Colour.FromRgb(180, 180, 180) [get, set]
 The colour for lines separating table rows from each other. More...
 
double TableHeaderRowSeparatorThickness = 2 [get, set]
 The thickness of the line separating the table header row from normal rows. More...
 
double TableHeaderSeparatorThickness = 1 [get, set]
 The thickness of lines separating table rows from each other. More...
 
Graphics TaskListUncheckedBullet [get, set]
 The bullet used for unchecked task list items. More...
 
Graphics TaskListCheckedBullet [get, set]
 The bullet used for checked task list items. More...
 
bool AllowPageBreak = true [get, set]
 Determines whether page breaks should be treated as such in the source. More...
 

Detailed Description

Renders Markdown documents into VectSharp graphics objects.

Definition at line 37 of file MarkdownRenderer.cs.

Member Enumeration Documentation

◆ VerticalAlignment

Defines the options for the vertical alignment of table cells.

Definition at line 130 of file MarkdownRenderer.cs.

Member Function Documentation

◆ Render() [1/2]

Document VectSharp.Markdown.MarkdownRenderer.Render ( MarkdownDocument  mardownDocument,
out Dictionary< string, string >  linkDestinations 
)

Renders the supplied mardownDocument . The Document produced consists of one or more pages of the size specified in the PageSize of the current instance.

Parameters
mardownDocumentThe markdown document to render.
linkDestinationsWhen this method returns, this value will contain a dictionary used to associate graphic action tags to hyperlinks. This can be used to enable such links when rendering the Document to a file.
Returns
A Document containing a rendering of the supplied markdown document, consisting of one or more pages of the size specified in the PageSize of the current instance.

Definition at line 504 of file MarkdownRenderer.cs.

◆ Render() [2/2]

Document VectSharp.Markdown.MarkdownRenderer.Render ( string  markdownSource,
out Dictionary< string, string >  linkDestinations 
)

Parses the supplied markdownSource using all the supported extensions and renders the resulting document. The Document produced consists of one or more pages of the size specified in the PageSize of the current instance.

Parameters
markdownSourceThe markdown source to parse.
linkDestinationsWhen this method returns, this value will contain a dictionary used to associate graphic action tags to hyperlinks. This can be used to enable such links when rendering the Document to a file.
Returns
A Document containing a rendering of the supplied markdown document, consisting of one or more pages of the size specified in the PageSize of the current instance.

Definition at line 491 of file MarkdownRenderer.cs.

◆ RenderSinglePage() [1/2]

Page VectSharp.Markdown.MarkdownRenderer.RenderSinglePage ( MarkdownDocument  markdownDocument,
double  width,
out Dictionary< string, string >  linkDestinations 
)

Renders the supplied markdownDocument . Page breaks are disabled, and the document is rendered as a single page with the specified width . The page will be cropped at the appropriate height to contain the entire document.

Parameters
markdownDocumentThe markdown document to render.
widthThe width of the page.
linkDestinationsWhen this method returns, this value will contain a dictionary used to associate graphic action tags to hyperlinks. This can be used to enable such links when rendering the Page to a file.
Returns
A Page containing a rendering of the supplied markdown document.

Definition at line 432 of file MarkdownRenderer.cs.

◆ RenderSinglePage() [2/2]

Page VectSharp.Markdown.MarkdownRenderer.RenderSinglePage ( string  markdownSource,
double  width,
out Dictionary< string, string >  linkDestinations 
)

Parses the supplied markdownSource using all the supported extensions and renders the resulting document. Page breaks are disabled, and the document is rendered as a single page with the specified width . The page will be cropped at the appropriate height to contain the entire document.

Parameters
markdownSourceThe markdown source to parse.
widthThe width of the page.
linkDestinationsWhen this method returns, this value will contain a dictionary used to associate graphic action tags to hyperlinks. This can be used to enable such links when rendering the Page to a file.
Returns
A Page containing a rendering of the supplied markdown document.

Definition at line 418 of file MarkdownRenderer.cs.

Property Documentation

◆ AllowPageBreak

bool VectSharp.Markdown.MarkdownRenderer.AllowPageBreak = true
getset

Determines whether page breaks should be treated as such in the source.

Definition at line 402 of file MarkdownRenderer.cs.

◆ BackgroundColour

Colour VectSharp.Markdown.MarkdownRenderer.BackgroundColour = Colours.White
getset

The background colour for the page.

Definition at line 298 of file MarkdownRenderer.cs.

◆ BaseFontSize

double VectSharp.Markdown.MarkdownRenderer.BaseFontSize = 9.71424
getset

The base font size to use when rendering the document. This will be the size of regular elements, and the size of header elements will be expressed as a multiple of this.

Definition at line 42 of file MarkdownRenderer.cs.

◆ BaseImageUri

string VectSharp.Markdown.MarkdownRenderer.BaseImageUri = ""
getset

The base uri for resolving relative image addresses.

Definition at line 221 of file MarkdownRenderer.cs.

◆ BaseLinkUri

Uri VectSharp.Markdown.MarkdownRenderer.BaseLinkUri = new Uri("about:blank")
getset

The base uri for resolving links.

Definition at line 231 of file MarkdownRenderer.cs.

◆ BoldFontFamily

FontFamily VectSharp.Markdown.MarkdownRenderer.BoldFontFamily = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.HelveticaBold)
getset

The font family for bold text.

Definition at line 75 of file MarkdownRenderer.cs.

◆ BoldItalicFontFamily

FontFamily VectSharp.Markdown.MarkdownRenderer.BoldItalicFontFamily = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.HelveticaBoldOblique)
getset

The font family for bold italic text.

Definition at line 85 of file MarkdownRenderer.cs.

◆ BoldUnderlineThickness

double VectSharp.Markdown.MarkdownRenderer.BoldUnderlineThickness = 0.15
getset

The thickness of underlines for bold text. This value will be multiplied by the font size of the element being underlined.

Definition at line 115 of file MarkdownRenderer.cs.

◆ Bullets

List<Action<Graphics, Colour> > VectSharp.Markdown.MarkdownRenderer.Bullets
get
Initial value:
= new List<Action<Graphics, Colour>>()
{
(graphics, colour) =>
{
graphics.FillPath(new GraphicsPath().Arc(-0.5, 0, 0.25, 0, 2 * Math.PI), colour);
},
(graphics, colour) =>
{
graphics.StrokePath(new GraphicsPath().Arc(-0.5, 0, 0.25, 0, 2 * Math.PI), colour, 0.1);
},
(graphics, colour) =>
{
graphics.StrokeRectangle(-0.75, -0.25, 0.5, 0.5, colour, 0.1);
},
}
Represents a graphics path that can be filled or stroked.
Definition: GraphicsPath.cs:28
GraphicsPath Arc(Point center, double radius, double startAngle, double endAngle)
Trace an arc segment from a circle with the specified center and radius , starting at startAngle an...

Bullet points used for unordered lists. Each element of this list corresponds to the bullet for each level of list indentation. If the list indentation is greater than the number of elements in this list, the bullet points will be reused cyclically. Each element of this list is a method taking two arguments: the first is the Graphics object on which the bullet point should be drawn, while the second is the colour in which it should be painted. The method should draw the bullet point centered around the origin. The size of the bullet point will be multiplied by the current font size.

Definition at line 272 of file MarkdownRenderer.cs.

◆ CodeBlockBackgroundColour

Colour VectSharp.Markdown.MarkdownRenderer.CodeBlockBackgroundColour = Colour.FromRgb(240, 240, 245)
getset

The background colour for code blocks.

Definition at line 323 of file MarkdownRenderer.cs.

◆ CodeFont

FontFamily VectSharp.Markdown.MarkdownRenderer.CodeFont = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.Courier)
getset

The font family for code elements.

Definition at line 90 of file MarkdownRenderer.cs.

◆ CodeFontBold

FontFamily VectSharp.Markdown.MarkdownRenderer.CodeFontBold = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.CourierBold)
getset

The font family for bold code elements.

Definition at line 95 of file MarkdownRenderer.cs.

◆ CodeFontBoldItalic

FontFamily VectSharp.Markdown.MarkdownRenderer.CodeFontBoldItalic = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.CourierBoldOblique)
getset

The font family for bold italic code elements.

Definition at line 105 of file MarkdownRenderer.cs.

◆ CodeFontItalic

FontFamily VectSharp.Markdown.MarkdownRenderer.CodeFontItalic = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.CourierOblique)
getset

The font family for italic code elements.

Definition at line 100 of file MarkdownRenderer.cs.

◆ CodeInlineBackgroundColour

Colour VectSharp.Markdown.MarkdownRenderer.CodeInlineBackgroundColour = Colour.FromRgb(240, 240, 240)
getset

The background colour for code inlines.

Definition at line 318 of file MarkdownRenderer.cs.

◆ CodeInlineMargin

double VectSharp.Markdown.MarkdownRenderer.CodeInlineMargin = 0.25
getset

The margin at the left and right of code inlines. This value will be multiplied by the current font size.

Definition at line 186 of file MarkdownRenderer.cs.

◆ ForegroundColour

Colour VectSharp.Markdown.MarkdownRenderer.ForegroundColour = Colours.Black
getset

The foreground colour for text elements.

Definition at line 293 of file MarkdownRenderer.cs.

◆ HeaderFontSizeMultipliers

double [] VectSharp.Markdown.MarkdownRenderer.HeaderFontSizeMultipliers
get
Initial value:
= new double[]
{
28 / 12.0, 22 / 12.0, 16 / 12.0, 14 / 12.0, 13 / 12.0, 12 / 12.0
}

The font size for elements at each header level. The values in this array will be multiplied by the BaseFontSize.

Definition at line 52 of file MarkdownRenderer.cs.

◆ HeaderLineColour

Colour VectSharp.Markdown.MarkdownRenderer.HeaderLineColour = Colour.FromRgb(180, 180, 180)
getset

The colour of the line below headers.

Definition at line 303 of file MarkdownRenderer.cs.

◆ HeaderLineThicknesses

double [] VectSharp.Markdown.MarkdownRenderer.HeaderLineThicknesses = new double[] { 1, 1, 0, 0, 0, 0 }
get

The thickness of the separator line after a header of each level. A value of 0 disables the line after headers of that level.

Definition at line 60 of file MarkdownRenderer.cs.

◆ ImageMarginTolerance

double VectSharp.Markdown.MarkdownRenderer.ImageMarginTolerance = 25
getset

Images will be allowed to extend into the page bottom margin area by this amount before triggering a page break. This should be smaller than the bottom margin, otherwise images risk being cut off by the page boundary.

Definition at line 261 of file MarkdownRenderer.cs.

◆ ImageMultiplier

double VectSharp.Markdown.MarkdownRenderer.ImageMultiplier = 1
getset

The size of images will be multiplied by this value to determine the actual size of the image on the page. For images that have a width or height attribute, this will be applied in addition to the ImageUnitMultiplier. For images without width and height, only this multiplier will be applied.

Definition at line 251 of file MarkdownRenderer.cs.

◆ ImageSideMargin

double VectSharp.Markdown.MarkdownRenderer.ImageSideMargin = 10
getset

The margin on the right of left-aligned images and on the left of right-aligned images.

Definition at line 256 of file MarkdownRenderer.cs.

◆ ImageUnitMultiplier

double VectSharp.Markdown.MarkdownRenderer.ImageUnitMultiplier = 0.60714
getset

The size of images (as defined in the image's width and height attributes) will be multiplied by this value to determine the actual size of the image on the page. This has no effect on images without a width or height attribute.

Definition at line 246 of file MarkdownRenderer.cs.

◆ ImageUriResolver

Func<string, string, (string, bool)> VectSharp.Markdown.MarkdownRenderer.ImageUriResolver = HTTPUtils.ResolveImageURI
getset

A method used to resolve (possibly remote) image uris into local file paths. The first argument of the method should be the image uri and the second argument the base uri used to resolve relative links. The method should return a tuple containing the path of the local file and a boolean value indicating whether the file has been fetched from a remote location and should be deleted after the program has finished using it.

Definition at line 226 of file MarkdownRenderer.cs.

◆ IndentWidth

double VectSharp.Markdown.MarkdownRenderer.IndentWidth = 40
getset

The indentation width used for list items.

Definition at line 191 of file MarkdownRenderer.cs.

◆ InsertedColour

Colour VectSharp.Markdown.MarkdownRenderer.InsertedColour = Colour.FromRgb(0, 158, 115)
getset

The colour for text that has been styled as "inserted".

Definition at line 338 of file MarkdownRenderer.cs.

◆ ItalicFontFamily

FontFamily VectSharp.Markdown.MarkdownRenderer.ItalicFontFamily = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.HelveticaOblique)
getset

The font family for italic text.

Definition at line 80 of file MarkdownRenderer.cs.

◆ LinkColour

Colour VectSharp.Markdown.MarkdownRenderer.LinkColour = Colour.FromRgb(25, 140, 191)
getset

The colour for hypertext links-

Definition at line 313 of file MarkdownRenderer.cs.

◆ LinkUriResolver

Func<string, string> VectSharp.Markdown.MarkdownRenderer.LinkUriResolver = a => a
getset

A method used to resolve link addresses. The argument of the method should be the absolute link, and the method should return the resolved address. This can be used to "redirect" links to a different target.

Definition at line 236 of file MarkdownRenderer.cs.

◆ Margins

Margins VectSharp.Markdown.MarkdownRenderer.Margins = new Margins(55, 55, 55, 55)
getset

The margins of the page.

Definition at line 120 of file MarkdownRenderer.cs.

◆ MarkedColour

Colour VectSharp.Markdown.MarkdownRenderer.MarkedColour = Colour.FromRgb(213, 94, 0)
getset

The colour for text that has been styled as "marked".

Definition at line 343 of file MarkdownRenderer.cs.

◆ MathFontScalingFactor

double VectSharp.Markdown.MarkdownRenderer.MathFontScalingFactor = 0.85
getset

Scaling factor for the font size to use when rendering math.

Definition at line 47 of file MarkdownRenderer.cs.

◆ PageSize

Size VectSharp.Markdown.MarkdownRenderer.PageSize = new Size(595, 842)
getset

The size of the page.

Definition at line 156 of file MarkdownRenderer.cs.

◆ QuoteBlockBackgroundColour

Colour VectSharp.Markdown.MarkdownRenderer.QuoteBlockBackgroundColour = Colour.FromRgb(240, 240, 255)
getset

The background colour for block quotes.

Definition at line 333 of file MarkdownRenderer.cs.

◆ QuoteBlockBarColour

Colour VectSharp.Markdown.MarkdownRenderer.QuoteBlockBarColour = Colour.FromRgb(75, 152, 220)
getset

The colour for the bar to the left of block quotes.

Definition at line 328 of file MarkdownRenderer.cs.

◆ QuoteBlockBarWidth

double VectSharp.Markdown.MarkdownRenderer.QuoteBlockBarWidth = 5
getset

The thickness of the bar to the left of block quotes.

Definition at line 201 of file MarkdownRenderer.cs.

◆ QuoteBlockIndentWidth

double VectSharp.Markdown.MarkdownRenderer.QuoteBlockIndentWidth = 30
getset

The indentation width used for block quotes.

Definition at line 196 of file MarkdownRenderer.cs.

◆ RasterImageLoader

Func<string, RasterImage> VectSharp.Markdown.MarkdownRenderer.RasterImageLoader = null
getset

A method used to a load raster image from a local file. The argument of the method should be the path of a local image file, and the method should return a RasterImage representing that file. For example, this can be achieved using the RasterImageFile class from the VectSharp.MuPDFUtils package. If this is null, only SVG images will be included in the document.

Definition at line 241 of file MarkdownRenderer.cs.

◆ RegularFontFamily

FontFamily VectSharp.Markdown.MarkdownRenderer.RegularFontFamily = FontFamily.ResolveFontFamily(FontFamily.StandardFontFamilies.Helvetica)
getset

The font family for regular text.

Definition at line 70 of file MarkdownRenderer.cs.

◆ SpaceAfterHeading

double VectSharp.Markdown.MarkdownRenderer.SpaceAfterHeading = 0.25
getset

The space after each heading. This value will be multiplied by the font size of the heading.

Definition at line 181 of file MarkdownRenderer.cs.

◆ SpaceAfterLine

double VectSharp.Markdown.MarkdownRenderer.SpaceAfterLine = 0.25
getset

The space after each line of text. This value will be multiplied by the BaseFontSize.

Definition at line 171 of file MarkdownRenderer.cs.

◆ SpaceAfterParagraph

double VectSharp.Markdown.MarkdownRenderer.SpaceAfterParagraph = 0.75
getset

The space after each text paragraph. This value will be multiplied by the BaseFontSize.

Definition at line 166 of file MarkdownRenderer.cs.

◆ SpaceBeforeHeading

double VectSharp.Markdown.MarkdownRenderer.SpaceBeforeHeading = 0.25
getset

The space before each heading. This value will be multiplied by the font size of the heading.

Definition at line 176 of file MarkdownRenderer.cs.

◆ SpaceBeforeParagaph

double VectSharp.Markdown.MarkdownRenderer.SpaceBeforeParagaph = 0
getset

The space before each text paragraph. This value will be multiplied by the BaseFontSize.

Definition at line 161 of file MarkdownRenderer.cs.

◆ SubscriptShift

double VectSharp.Markdown.MarkdownRenderer.SubscriptShift = 0.14
getset

The downwards shift in the baseline for subscript elements. This value will be multiplied by the current font size.

Definition at line 216 of file MarkdownRenderer.cs.

◆ SubSuperscriptFontSize

double VectSharp.Markdown.MarkdownRenderer.SubSuperscriptFontSize = 0.7
getset

The font size for subscripts and superscripts. This value will be multiplied by the current font size.

Definition at line 206 of file MarkdownRenderer.cs.

◆ SuperscriptShift

double VectSharp.Markdown.MarkdownRenderer.SuperscriptShift = 0.33
getset

The upwards shift in the baseline for superscript elements. This value will be multiplied by the current font size.

Definition at line 211 of file MarkdownRenderer.cs.

◆ SyntaxHighlighter

Func<string, string, List<List<FormattedString> > > VectSharp.Markdown.MarkdownRenderer.SyntaxHighlighter = VectSharp.Markdown.SyntaxHighlighter.GetSyntaxHighlightedLines
getset

A method used for syntax highlighting. The first argument should be the source code to highlight, while the second parameter is the name of the language to use for the highlight. The method should return a list of lists of FormattedStrings, with each list of FormattedStrings representing a line. For each code block, if the method returns null, no syntax highlighting is used.

Definition at line 266 of file MarkdownRenderer.cs.

◆ TableCellMargins

Margins VectSharp.Markdown.MarkdownRenderer.TableCellMargins = new Margins(5, 0, 5, 0)
getset

The margins for table cells.

Definition at line 125 of file MarkdownRenderer.cs.

◆ TableHeaderRowSeparatorColour

Colour VectSharp.Markdown.MarkdownRenderer.TableHeaderRowSeparatorColour = Colours.Black
getset

The colour for the line separating the table header row from normal rows.

Definition at line 348 of file MarkdownRenderer.cs.

◆ TableHeaderRowSeparatorThickness

double VectSharp.Markdown.MarkdownRenderer.TableHeaderRowSeparatorThickness = 2
getset

The thickness of the line separating the table header row from normal rows.

Definition at line 358 of file MarkdownRenderer.cs.

◆ TableHeaderSeparatorThickness

double VectSharp.Markdown.MarkdownRenderer.TableHeaderSeparatorThickness = 1
getset

The thickness of lines separating table rows from each other.

Definition at line 363 of file MarkdownRenderer.cs.

◆ TableRowSeparatorColour

Colour VectSharp.Markdown.MarkdownRenderer.TableRowSeparatorColour = Colour.FromRgb(180, 180, 180)
getset

The colour for lines separating table rows from each other.

Definition at line 353 of file MarkdownRenderer.cs.

◆ TableVAlign

VerticalAlignment VectSharp.Markdown.MarkdownRenderer.TableVAlign = VerticalAlignment.Middle
getset

The vertical alignment of table cells.

Definition at line 151 of file MarkdownRenderer.cs.

◆ TaskListCheckedBullet

Graphics VectSharp.Markdown.MarkdownRenderer.TaskListCheckedBullet
getset
Initial value:
= new Func<Graphics>(() =>
{
Graphics tbr = new Graphics();
GraphicsPath checkboxPath = new GraphicsPath().MoveTo(-0.7, -0.4).LineTo(-0.3, -0.4).Arc(-0.3, -0.2, 0.2, 3 * Math.PI / 2, 2 * Math.PI).LineTo(-0.1, 0.2).Arc(-0.3, 0.2, 0.2, 0, Math.PI / 2).LineTo(-0.7, 0.4).Arc(-0.7, 0.2, 0.2, Math.PI / 2, Math.PI).LineTo(-0.9, -0.2).Arc(-0.7, -0.2, 0.2, Math.PI, 3 * Math.PI / 2).Close();
tbr.FillPath(checkboxPath, Colour.FromRgb(240, 246, 249));
tbr.StrokePath(checkboxPath, Colour.FromRgb(0, 114, 178), 0.075);
GraphicsPath tickpath = new GraphicsPath().MoveTo(-0.75, -0.1).LineTo(-0.5, 0.15).LineTo(-0.1, -0.4);
tbr.StrokePath(new GraphicsPath().MoveTo(-0.5, 0.15).LineTo(-0.1, -0.4), Colour.FromRgb(240, 246, 249), 0.3, LineCaps.Round);
tbr.StrokePath(tickpath, Colour.FromRgb(0, 158, 115), 0.2, LineCaps.Round);
return tbr;
})()
LineCaps
Represents line caps.
Definition: Enums.cs:71

The bullet used for checked task list items.

Definition at line 383 of file MarkdownRenderer.cs.

◆ TaskListUncheckedBullet

Graphics VectSharp.Markdown.MarkdownRenderer.TaskListUncheckedBullet
getset
Initial value:
= new Func<Graphics>(() =>
{
Graphics tbr = new Graphics();
GraphicsPath checkboxPath = new GraphicsPath().MoveTo(-0.7, -0.4).LineTo(-0.3, -0.4).Arc(-0.3, -0.2, 0.2, 3 * Math.PI / 2, 2 * Math.PI).LineTo(-0.1, 0.2).Arc(-0.3, 0.2, 0.2, 0, Math.PI / 2).LineTo(-0.7, 0.4).Arc(-0.7, 0.2, 0.2, Math.PI / 2, Math.PI).LineTo(-0.9, -0.2).Arc(-0.7, -0.2, 0.2, Math.PI, 3 * Math.PI / 2).Close();
tbr.FillPath(checkboxPath, Colour.FromRgb(240, 246, 249));
tbr.StrokePath(checkboxPath, Colour.FromRgb(0, 114, 178), 0.075);
return tbr;
})()

The bullet used for unchecked task list items.

Definition at line 368 of file MarkdownRenderer.cs.

◆ ThematicBreakLineColour

Colour VectSharp.Markdown.MarkdownRenderer.ThematicBreakLineColour = Colour.FromRgb(180, 180, 200)
getset

The colour for thematic break lines.

Definition at line 308 of file MarkdownRenderer.cs.

◆ ThematicBreakThickness

double VectSharp.Markdown.MarkdownRenderer.ThematicBreakThickness = 2
getset

The thickness of thematic break lines.

Definition at line 65 of file MarkdownRenderer.cs.

◆ UnderlineThickness

double VectSharp.Markdown.MarkdownRenderer.UnderlineThickness = 0.075
getset

The thickness of underlines. This value will be multiplied by the font size of the element being underlined.

Definition at line 110 of file MarkdownRenderer.cs.


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