PDF Plugin for Xojo |

# Page.TextRenderingMode Property (console safe)

Sets or gets the text rendering mode of the page.

TextRenderingMode as Page.TextRenderingModeEnum {Read and Write}

#### Remarks

This can be any value from the Page.TextRenderingModeEnum.
Node if choosing enum value that does clipping then you need to make sure you save the state before so you can restore it back to the full page.
When selecting on of the clipping enum values then the clipping path is set to the text region after drawing the text.
Example 1:

myPage.BeginText()
myPage.SetFont(myFont,24)
myPage.TextRenderingMode = Page.TextRenderingModeEnum.FILL
myPage.TextRect("Einhugur PDF export - TextRenderingMode = FILL", 10,myPage.Height - 40, myPage.Width - 10,myPage.Height - 75, Page.TextAlignmentEnum.LEFT,outLength)
myPage.EndText()
Example 2, using one of the clipping constants:
myPage.SaveState() // We save the state since else we permanently loose the full clipping of the page
myPage.BeginText()
myPage.TextRenderingMode = Page.TextRenderingModeEnum.STROKE_CLIPPING
myPage.TextRect("Einhugur PDF export - TextRenderingMode = STROKE_CLIPPING", 10,myPage.Height - 200, myPage.Width - 10,myPage.Height - 235, Page.TextAlignmentEnum.LEFT,outLength)
myPage.EndText()
// At this point the clipping path is equal to the fill zone of the text - to test this we draw a line through the text
myPage.StrokeColor = &c0000FF
myPage.LineWidth = 8
myPage.MoveTo(10,myPage.Height - 215)
myPage.LineTo(myPage.Width - 10,myPage.Height - 215)
myPage.Draw()
myPage.RestoreState()

#### See Also

Page Class