Interface ITextMarkPainter
Draw marks for ranges of content an edit control.
Namespace: Sdl.DesktopEditor.EditorApi
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public interface ITextMarkPainter
Methods
DrawMarkPart(Graphics, ITextMark, Rectangle, Rectangle, Boolean, Boolean)
Draw the part of the mark that appears on a specific line of the content.
Declaration
void DrawMarkPart(Graphics g, ITextMark mark, Rectangle boundingRectangle, Rectangle contentRectangle, bool isFirstLine, bool isLastLine)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The graphics context to use for drawing |
ITextMark | mark | the mark which to draw a part of |
System.Drawing.Rectangle | boundingRectangle | the bounding rectangle for the mark part, as determined from a previous call to GetMarkPartBounds(Graphics, ITextMark, Rectangle, Boolean, Boolean), in window coordinates. |
System.Drawing.Rectangle | contentRectangle | the rectangle spanning the content to be marked on this line, relative to the control window |
System.Boolean | isFirstLine |
|
System.Boolean | isLastLine |
|
GetMarkPartBounds(Graphics, ITextMark, Rectangle, Boolean, Boolean)
Calculate the size of the piece of the text mark for the content on a specific line in the layout.
If the content spans multiple lines this method will be called for each of the lines. The Boolean flags indicate whether the content rectangle for a specific call is the first and/or last line of the marked content.
Declaration
Rectangle GetMarkPartBounds(Graphics g, ITextMark mark, Rectangle contentRectangle, bool isFirstLine, bool isLastLine)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | The graphics context to use for drawing |
ITextMark | mark | the mark of which a part is being sized |
System.Drawing.Rectangle | contentRectangle | the rectangle for the content the mark part spans on this line. These coordinates are relative to the window. |
System.Boolean | isFirstLine |
|
System.Boolean | isLastLine |
|
Returns
Type | Description |
---|---|
System.Drawing.Rectangle | The bounding rectangle where the mark will be painted, in window coordinates. This rectangle can be fully or partially outside of the content rectangle. |