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
    System.Object
    BackgroundColourPainter
    Implements
    ITextMarkPainter
    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 BackgroundColourPainter : ITextMarkPainter

    Constructors

    BackgroundColourPainter()

    Create a background painter that uses the default color (System.Drawing.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
    System.Drawing.Color color

    Properties

    Color

    Color of the marker.

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    Methods

    DrawMarkPart(Graphics, ITextMark, Rectangle, Rectangle, Boolean, Boolean)

    Fills the content rectangle with the background color.

    Declaration
    public virtual 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

    GetMarkPartBounds(Graphics, ITextMark, Rectangle, Boolean, Boolean)

    The bounds are the same as the content rectangle.

    Declaration
    public virtual 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

    Implements

    ITextMarkPainter

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(Object, Action<Window>)

    On this page

    • Constructors
      • BackgroundColourPainter()
      • BackgroundColourPainter(Color)
    • Properties
      • Color
    • Methods
      • DrawMarkPart(Graphics, ITextMark, Rectangle, Rectangle, Boolean, Boolean)
      • GetMarkPartBounds(Graphics, ITextMark, Rectangle, Boolean, Boolean)
    • Implements
    • Extension Methods
    Back to top Generated by DocFX