Class TConceptualPixelSurface

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TConceptualPixelSurface = class abstract(TObject)

Description

Conceptual surface that provide means of reading, writing and drawing individual pixels.

Hierarchy

  • TObject
  • TConceptualPixelSurface

Overview

Methods

Protected function GetPixel(X, Y: Integer): TIntColor; virtual; abstract;
Protected function GetPixelUnsafe(X, Y: Integer): TIntColor; virtual; abstract;
Public procedure DrawPixel(const X, Y: Integer; const Color: TIntColor); overload; virtual;
Public procedure DrawPixel(const Position: TPoint2i; const Color: TIntColor); overload; inline;
Public procedure DrawPixelUnsafe(const X, Y: Integer; const Color: TIntColor); overload;
Public procedure DrawPixelUnsafe(const Position: TPoint2i; const Color: TIntColor); overload; inline;
Protected procedure SetPixel(X, Y: Integer; const Color: TIntColor); virtual; abstract;
Protected procedure SetPixelUnsafe(X, Y: Integer; const Color: TIntColor); virtual; abstract;

Properties

Public property Pixels[X,Y:Integer]: TIntColor read GetPixel write SetPixel;
Public property PixelsUnsafe[X,Y:Integer]: TIntColor read GetPixelUnsafe write SetPixelUnsafe;

Description

Methods

Protected function GetPixel(X, Y: Integer): TIntColor; virtual; abstract;

Returns pixel located at specified coordinates. This also includes a sanity check for pixel coordinates to be within valid range. If coordinates are outside of valid range, zero should be returned.

Protected function GetPixelUnsafe(X, Y: Integer): TIntColor; virtual; abstract;

Returns pixel located at specified coordinates similarly to GetPixel, but without sanity check for increased performance.

Public procedure DrawPixel(const X, Y: Integer; const Color: TIntColor); overload; virtual;

Draws a single pixel at specified coordinates and color with alpha-blending. It also does a sanity check for specified coordinates and if they are outside of valid range, does nothing.

Public procedure DrawPixel(const Position: TPoint2i; const Color: TIntColor); overload; inline;

Draws a single pixel at specified position and color with alpha-blending. It also does a sanity check for specified position and if it is outside of valid range, does nothing.

Public procedure DrawPixelUnsafe(const X, Y: Integer; const Color: TIntColor); overload;

Draws a single pixel at specified coordinates similarly to DrawPixel, but without sanity check for increased performance.

Public procedure DrawPixelUnsafe(const Position: TPoint2i; const Color: TIntColor); overload; inline;

Draws a single pixel at specified position similarly to DrawPixel, but without sanity check for increased performance.

Protected procedure SetPixel(X, Y: Integer; const Color: TIntColor); virtual; abstract;

Sets pixel located at specified coordinates. This also includes a sanity check for pixel coordinates to be within valid range. If coordinates are outside of valid range, nothing should be done.

Protected procedure SetPixelUnsafe(X, Y: Integer; const Color: TIntColor); virtual; abstract;

Sets pixel located at specified coordinates similarly to GetPixel, but without sanity check for increased performance.

Properties

Public property Pixels[X,Y:Integer]: TIntColor read GetPixel write SetPixel;

Provides access to surface's individual pixels. See GetPixel and SetPixel on how this actually works.

Public property PixelsUnsafe[X,Y:Integer]: TIntColor read GetPixelUnsafe write SetPixelUnsafe;

Provides access to surface's individual pixels without sanity check for increased performance. See GetPixelUnsafe and SetPixelUnsafe on how this actually works.


Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.