Table of Contents

Enum PixelGeometry

Namespace
Egami.Drawing
Assembly
Egami.Drawing.dll

The order of a display's color subpixels, which LCD text edging needs to know.

public enum PixelGeometry

Fields

BgrHorizontal = 2

Blue, green and red stripes from left to right.

BgrVertical = 4

Blue, green and red stripes from top to bottom.

RgbHorizontal = 1

Red, green and blue stripes from left to right, the common LCD layout.

RgbVertical = 3

Red, green and blue stripes from top to bottom, as on a rotated display.

Unknown = 0

Not known: LCD edging falls back to grayscale.

Examples

// Small text for a screen: light hinting (vertical only), quarter-pixel origins (the default) and, for an RGB display
// the image will not leave, LCD edging.
var screen = new Font(face, 13) { Hinting = FontHinting.Light, Edging = FontEdging.Lcd };
using (RasterCanvas<Rgba8> canvas = image.CreateCanvas(new CanvasOptions { PixelGeometry = PixelGeometry.RgbHorizontal }))
{
    canvas.DrawText("Crisp caption", new Vector2(8, 24), screen, Rgba8.Black);

    // A face matched for bold italic it lacks is emboldened and slanted, unless AllowSynthesis is off.
    var synthetic = new Font(face, 13) { Synthesis = FontSynthesis.Bold | FontSynthesis.Italic };
    canvas.DrawText("Synthetic bold italic", new Vector2(8, 48), synthetic, Rgba8.Black);
}