Class BackgroundColourPainter
Mark painter that fills the entire content rectangle with a solid color, and is meant to be used for highlighting text using background color.
Implements
Inherited Members
Namespace: SdlSdl.DesktopEditorEditorApiImplementation
Assembly: Sdl.DesktopEditor.EditorApi.dll
Syntax
public sealed class BackgroundColourPainter : ITextMarkPainter
Constructors
BackgroundColourPainter()
Create a background painter that uses the default color (Khaki).
Declaration
public BackgroundColourPainter()
BackgroundColourPainter(Color)
Create a background painter that uses a specific color.
Declaration
public BackgroundColourPainter(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color |
Properties
Color
Color of the marker.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
Methods
DrawMarkPart(Graphics, ITextMark, Rectangle, Rectangle, bool, bool)
Fills the content rectangle with the background color.
Declaration
public 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 |
GetMarkPartBounds(Graphics, ITextMark, Rectangle, bool, bool)
The bounds are the same as the content rectangle.
Declaration
public 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 |