Table of Contents

Class Painter

Namespace
Alternet.Common
Assembly
Alternet.Common.v9.dll

Encapsulates a drawing surface, providing properties and methods used to draw text and graphic primitives.

public class Painter : IDisposable
Inheritance
Painter
Implements
Derived

Constructors

Painter()

Initializes a new instance of the Painter class with default settings.

Properties

BackColor

Gets or sets background color of the device context currently associated with the Painter.

BrushTable
CurrentInfo
Font

Gets or sets font of the device context currently associated with the Painter.

FontHeight

Represents height of the font of the device context currently associated with the Painter.

FontStyle

Gets or sets font style of the device context currently associated with the Painter.

FontTable
FontWidth

Represents width of the font of the device context currently associated with the Painter.

ForeColor

Gets or sets foreground color of the device context currently associated with the Painter.

IsFontMonoSpace
IsMonoSpaced

Represents a value indicating whether font of the device context currently associated with this Painter is monospaced, meaning that all characters drawn with this font have the same width.

LineHeight

When implemented by a class, represents height of the individual lines.

LineSpace

Represents additional height added to the height of the font.

MeasureDC
Opaque

Gets or sets a boolean value indicating that background is filled with the current background color before the text is drawn.

PenTable
StringFormat

Encapsulates text layout information and display manipulations for this Painter.

TextColor

Gets or sets text color of the device context currently associated with the Painter.

Methods

Clear()

Resets all Painter properties to the initial state.

ClearBrushes()
ClearColors()
ClearFonts()
ClearPens()
CreateBrush(Color)
CreateFontInfos(Font)
CreateFontInfos(IntPtr)
CreatePen(Color)
CreatePen(Color, int)
Dispose()

Disposes this Painter and frees resources associated with it.

Dispose(bool)
~Painter()

Destroys the instance of the Painter class.

GetColorKey(Color, int)
GetFontKey(Font)
GetFontKey(string, int)
Init()
SelectBrush(Color)
SelectBrush(Color, bool)
SelectFont(Font, FontStyle)
SelectFont(FontStyle)
SelectNativeFont(string, FontStyle, int)

Selects font with specified parameters.

SelectOpaque(bool)
SelectPen(Color)
SelectPen(Color, bool)
SelectPen(Color, int)
SelectStringFormat(StringFormat?)
SelectTextColor(Color)