Class HorizontalLinePainter
Mark painter implementation that draws a horizontal line.
Inheritance
System.Object
HorizontalLinePainter
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Sdl.DesktopEditor.EditorApi.Implementation
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public class HorizontalLinePainter : AbstractMarkPainter, ITextMarkPainter
Constructors
HorizontalLinePainter()
Declaration
public HorizontalLinePainter()
Methods
DrawLine(Graphics, Rectangle)
Implementation used by DrawMarkPart(Graphics, ITextMark, Rectangle, Rectangle, Boolean, Boolean) to draw the line.
Declaration
protected Rectangle DrawLine(Graphics g, Rectangle contentRectangle)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | |
| System.Drawing.Rectangle | contentRectangle |
Returns
| Type | Description |
|---|---|
| System.Drawing.Rectangle |
DrawMarkPart(Graphics, ITextMark, Rectangle, Rectangle, Boolean, Boolean)
Draw the line.
Declaration
public override void DrawMarkPart(Graphics g, ITextMark mark, Rectangle boundingRectangle, Rectangle contentRectangle, bool isFirstLine, bool isLastLine)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | |
| ITextMark | mark | |
| System.Drawing.Rectangle | boundingRectangle | |
| System.Drawing.Rectangle | contentRectangle | |
| System.Boolean | isFirstLine | |
| System.Boolean | isLastLine |
Overrides
GetLineRectangle(Rectangle, Int32)
Implementation used by GetMarkPartBounds(Graphics, ITextMark, Rectangle, Boolean, Boolean) to calculate the line rectangle.
Declaration
protected Rectangle GetLineRectangle(Rectangle contentRectangle, int penWidth)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Rectangle | contentRectangle | |
| System.Int32 | penWidth |
Returns
| Type | Description |
|---|---|
| System.Drawing.Rectangle |
GetMarkPartBounds(Graphics, ITextMark, Rectangle, Boolean, Boolean)
Returns a rectangle that represents the line that will be drawn.
Declaration
public override Rectangle GetMarkPartBounds(Graphics g, ITextMark mark, Rectangle contentRectangle, bool isFirstLine, bool isLastLine)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Graphics | g | |
| ITextMark | mark | |
| System.Drawing.Rectangle | contentRectangle | |
| System.Boolean | isFirstLine | |
| System.Boolean | isLastLine |
Returns
| Type | Description |
|---|---|
| System.Drawing.Rectangle |