Interface ITextMarkPainter
Draw marks for ranges of content an edit control.
Namespace: SdlSdl.DesktopEditorEditorApi
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public interface ITextMarkPainter
Methods
DrawMarkPart(Graphics, ITextMark, Rectangle, Rectangle, bool, bool)
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 |
---|---|---|
Graphics | g | The graphics context to use for drawing |
ITextMark | mark | the mark which to draw a part of |
Rectangle | boundingRectangle | the bounding rectangle for the mark part, as determined from a previous call to GetMarkPartBounds(Graphics, ITextMark, Rectangle, bool, bool), in window coordinates. |
Rectangle | contentRectangle | the rectangle spanning the content to be marked on this line, relative to the control window |
bool | isFirstLine |
|
bool | isLastLine |
|
GetMarkPartBounds(Graphics, ITextMark, Rectangle, bool, bool)
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 |
---|---|---|
Graphics | g | The graphics context to use for drawing |
ITextMark | mark | the mark of which a part is being sized |
Rectangle | contentRectangle | the rectangle for the content the mark part spans on this line. These coordinates are relative to the window. |
bool | isFirstLine |
|
bool | isLastLine |
|
Returns
Type | Description |
---|---|
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. |