Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    BackgroundColourPainter
    Implements
    ITextMarkPainter
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Sdl.DesktopEditor.EditorApi.Implementation
    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

    Implements

    ITextMarkPainter

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(object, Action<Window>)
    In this article
    • Constructors
      • BackgroundColourPainter()
      • BackgroundColourPainter(Color)
    • Properties
      • Color
    • Methods
      • DrawMarkPart(Graphics, ITextMark, Rectangle, Rectangle, bool, bool)
      • GetMarkPartBounds(Graphics, ITextMark, Rectangle, bool, bool)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX