Class SquigglyLinePainter
Mark painter that draws squiggly lines, similar to the mis-spelled word marks in Microsoft Word.
Implements
Inherited Members
Namespace: SdlSdl.DesktopEditorEditorApiImplementation
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public sealed class SquigglyLinePainter : HorizontalLinePainter, ITextMarkPainter
Constructors
SquigglyLinePainter()
Initialize the painter to draw angular quiggly red underlines size 3 by 3 with pen width 1, which is how spelling errors in Word are formatted.
Declaration
public SquigglyLinePainter()
Properties
Shape
Shape of the squiggles.
Declaration
public SquigglyLinePainter.SquiggleShape Shape { get; set; }
Property Value
Type | Description |
---|---|
SquigglyLinePainterSquiggleShape |
SquiggleHeight
Total height of a the squiggle line
Declaration
public int SquiggleHeight { get; set; }
Property Value
Type | Description |
---|---|
int |
SquiggleWidth
Width of a single 180 degree squiggle arc (i.e. "half a squiggle")
Declaration
public int SquiggleWidth { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
DrawMarkPart(Graphics, ITextMark, Rectangle, Rectangle, bool, bool)
Draw the squiggly underline.
Declaration
public override void DrawMarkPart(Graphics g, ITextMark mark, Rectangle boundingRectangle, Rectangle contentRectangle, bool isFirstLine, bool isLastLine)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g | |
ITextMark | mark | |
Rectangle | boundingRectangle | |
Rectangle | contentRectangle | |
bool | isFirstLine | |
bool | isLastLine |
Overrides
GetMarkPartBounds(Graphics, ITextMark, Rectangle, bool, bool)
Returns a box that is SquiggleHeight high in the location.
Declaration
public override Rectangle GetMarkPartBounds(Graphics g, ITextMark mark, Rectangle contentRectangle, bool isFirstLine, bool isLastLine)
Parameters
Type | Name | Description |
---|---|---|
Graphics | g | |
ITextMark | mark | |
Rectangle | contentRectangle | |
bool | isFirstLine | |
bool | isLastLine |
Returns
Type | Description |
---|---|
Rectangle |