Skip to content

Instantly share code, notes, and snippets.

@sysrpl
Created October 28, 2021 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sysrpl/6119ed313c8382004131761d6e292b3b to your computer and use it in GitHub Desktop.
Save sysrpl/6119ed313c8382004131761d6e292b3b to your computer and use it in GitHub Desktop.
unit Tiny.Graphics;
{$i tiny.inc}
interface
{ Forward declarations }
type
IMatrix = interface;
IBitmap = interface;
IFont = interface;
IPen = interface;
IBrush = interface;
ISolidBrush = interface;
IGradientBrush = interface;
ILinearGradientBrush = interface;
IRadialGradientBrush = interface;
IBitmapBrush = interface;
ICanvas = interface;
{ Enumerations used by the interfaces above }
TLineJoin = (joinMiter, joinBevel, joinRound);
TLineCap = (capButt, capSquare, capRound);
TFontAlign = (fontLeft, fontCenter, fontRight);
TFontLayout = (fontTop, fontMiddle, fontBaseline, fontBottom);
TWinding = (windCCW, windCW);
{ Remaking blend modes }
TBlendMode = (blendAlpha, blendAdditive, blendSubtractive, blendNegative);
{ TColorB }
TColorB = LongWord;
{ TColorF }
TColorF = record
public
class operator Implicit(const Value: TColorB): TColorF;
class operator Explicit(const Value: TColorF): TColorB;
class operator Equal(const A, B: TColorF): Boolean; inline;
class operator NotEqual(const A, B: TColorF): Boolean; inline;
public
R, G, B, A: Single;
function Mix(const Color: TColorF; Percent: Single): TColorF;
end;
PColorF = ^TColorF;
{ TPointF }
TPointF = record
public
class operator Negative(const A: TPointF): TPointF; inline;
class operator Equal(const A, B: TPointF): Boolean; inline;
class operator NotEqual(const A, B: TPointF): Boolean; inline;
class operator Add(const A, B: TPointF): TPointF; inline;
class operator Subtract(const A, B: TPointF): TPointF; inline;
class operator Multiply(const A, B: TPointF): TPointF; inline;
class operator Multiply(A: Single; const B: TPointF): TPointF; inline;
class operator Multiply(const A: TPointF; B: Single): TPointF; inline;
class operator Multiply(const A: TPointF; B: IMatrix): TPointF;
class operator Multiply(A: IMatrix; const B: TPointF): TPointF;
class operator Divide(a: Single; const B: TPointF): TPointF; inline;
public
X, Y: Single;
function Rotate(Angle: Single): TPointF;
function Distance: Single; overload;
function Distance(const Point: TPointF): Single; overload;
procedure Move(X, Y: Single); inline;
function Mix(const Point: TPointF; Percent: Single): TPointF;
end;
PPointF = ^TPointF;
{ TRectF }
TRectF = record
public
X, Y, Width, Height: Single;
function IsEmpty: Boolean;
procedure Inflate(X, Y: Single); inline;
procedure Move(X, Y: Single); inline;
function Left: Single; inline;
function Top: Single; inline;
function Right: Single; inline;
function Bottom: Single; inline;
end;
PRectF = ^TRectF;
{ IMatrix }
IMatrix = interface
['{2F82AE30-10EB-40B5-87DD-C9124319B5CB}']
procedure Identity;
function Inverse: IMatrix;
procedure Translate(X, Y: Single);
procedure Rotate(Angle: Single);
procedure RotateAt(Angle, X, Y: Single);
procedure Scale(SX, SY: Single);
procedure ScaleAt(SX, SY, X, Y: Single);
procedure SkewX(X: Single);
procedure SkewY(Y: Single);
{ Creates new matrix C using the formula:
C = A * B
A is this matrix, B is the matrix passed below, and C is the result }
function Transform(M: IMatrix): IMatrix; overload;
{ Creates a new point C using the formula:
C = A * B
A is this matrix, B is the point passed below, and C is the result }
function Transform(const P: TPointF): TPointF; overload;
end;
{ IBitmap are fixed size bitmap instances can be created using any of the
Canvas.LoadBitmap methods. They differ from IRenderBitmap in that they cannot
be the target of canvas rendering and cannot be resized.
Note: Bitmaps and share the same namespace as render bitmaps. }
IBitmap = interface
['{2E0D937A-B9F9-4573-8E22-407BDBA2C587}']
{$region property access methods}
function GetName: string;
function GetClientRect: TRectF;
function GetWidth: LongWord;
function GetHeight: LongWord;
{$endregion}
{ Name is defined when you load a bitmap from a canvas }
property Name: string read GetName;
{ A convenient rectangle exactly fiting the bitmap }
property ClientRect: TRectF read GetClientRect;
{ The fixed width and height of the bitmap }
property Width: LongWord read GetWidth;
property Height: LongWord read GetHeight;
end;
{ IRenderBitmap is a special bitmap which can be drawn to using canvas
commands. When bound to a canvas commands such as LineTo, Circle, and Fill
create graphics on the bitmap. When unbound the render bitmap can be used
as with commands such as DrawImage or as a property of a bitmap brush.
Note: A render bitmap can be created using the Canvas.NewBitmap method and
share the same namespace as fixed bitmaps. }
IRenderBitmap = interface(IBitmap)
['{C8850303-01D8-4BFD-AA68-20DBF90C430B}']
{ Bind makes the render bitmap the current target for canvas drawing }
procedure Bind;
{ Unbind restores the back buffer as the target for canvas drawing }
procedure Unbind;
{ If unbound resize the drawable area of this render bitmap }
procedure Resize(W, H: LongWord);
end;
{ IFont instances can be created by using Canvas.LoadFont methods. }
IFont = interface
['{2DF60E11-7BEB-486E-B7DC-3714ED310B90}']
{$region property access methods}
function GetName: string;
function GetColor: TColorF;
procedure SetColor(const Value: TColorF);
function GetSize: Single;
procedure SetSize(Value: Single);
function GetHeight: Single;
procedure SetHeight(Value: Single);
function GetAlign: TFontAlign;
procedure SetAlign(const Value: TFontAlign);
function GetLayout: TFontLayout;
procedure SetLayout(const Value: TFontLayout);
function GetBlur: Single;
procedure SetBlur(Value: Single);
function GetLetterSpacing: Single;
procedure SetLetterSpacing(Value: Single);
function GetLineSpacing: Single;
procedure SetLineSpacing(Value: Single);
{$endregion}
{ Name of the font }
property Name: string read GetName;
{ Only solid color fonts are supported }
property Color: TColorF read GetColor write SetColor;
{ Font size in pixels }
property Size: Single read GetSize write SetSize;
{ Font height in points }
property Height: Single read GetHeight write SetHeight;
{ Horizontal alignment of text rendered with this font }
property Align: TFontAlign read GetAlign write SetAlign;
{ Vertical layout of text rendered with this font }
property Layout: TFontLayout read GetLayout write SetLayout;
{ Font can be blurred which might be useful for soft font shadows }
property Blur: Single read GetBlur write SetBlur;
{ Additive value used to modify letter spacing }
property LetterSpacing: Single read GetLetterSpacing write SetLetterSpacing;
{ Multiplicative factor used to modify line spacing }
property LineSpacing: Single read GetLineSpacing write SetLineSpacing;
end;
{ IPen instances are used to stroke canvas paths.
Note: Pens can reference a brush for more complex coloring options. }
IPen = interface
['{3D67CC14-17DC-4653-B97A-02E00A16D431}']
{$region property access methods}
function GetColor: TColorF;
procedure SetColor(const Value: TColorF);
function GetBrush: IBrush;
procedure SetBrush(Value: IBrush);
function GetWidth: Single;
procedure SetWidth(Value: Single);
function GetMiterLimit: Single;
procedure SetMiterLimit(Value: Single);
function GetLineCap: TLineCap;
procedure SetLineCap(const Value: TLineCap);
function GetLineJoin: TLineJoin;
procedure SetLineJoin(const Value: TLineJoin);
{$endregion}
property Color: TColorF read GetColor write SetColor;
property Brush: IBrush read GetBrush write SetBrush;
property Width: Single read GetWidth write SetWidth;
property MiterLimit: Single read GetMiterLimit write SetMiterLimit;
property LineCap: TLineCap read GetLineCap write SetLineCap;
property LineJoin: TLineJoin read GetLineJoin write SetLineJoin;
end;
{ IBrush is the base interface for the various brush types to follow }
IBrush = interface
['{B7F6A0C7-EE64-4B97-96AF-74A5A5362486}']
end;
{ ISolidBrush is a simple solid color brush }
ISolidBrush = interface(IBrush)
['{35443F16-1FCD-490B-B2D0-5C17D6621953}']
{$region property access methods}
function GetColor: TColorF;
procedure SetColor(const Value: TColorF);
{$endregion}
property Color: TColorF read GetColor write SetColor;
end;
{ IGradientStop is used by gradient brushes }
IGradientStop = interface
['{A44D2101-F2B4-4AC2-B346-CB2B7857CB13}']
{$region property access methods}
function GetOffset: Single;
procedure SetOffset(Value: Single);
function GetColor: TColorF;
procedure SetColor(const Value: TColorF);
{$endregion}
property Offset: Single read GetOffset write SetOffset;
property Color: TColorF read GetColor write SetColor;
end;
{ IGradientBrush is the base interface for gradient brushes }
IGradientBrush = interface(IBrush)
['{2EAF4D99-EFAC-47C9-AB45-C6C49ACAAF98}']
{$region property access methods}
function GetNearStop: IGradientStop;
function GetFarStop: IGradientStop;
{$endregion}
property NearStop: IGradientStop read GetNearStop;
property FarStop: IGradientStop read GetFarStop;
end;
{ ILinearGradientBrush }
ILinearGradientBrush = interface(IGradientBrush)
['{88232BE7-7B51-4E50-B71C-7EC2AD28AAA2}']
{$region property access methods}
function GetA: TPointF;
procedure SetA(const Value: TPointF);
function GetB: TPointF;
procedure SetB(const Value: TPointF);
{$endregion}
property A: TPointF read GetA write SetA;
property B: TPointF read GetB write SetB;
end;
{ IRadialGradientBrush }
IRadialGradientBrush = interface(IGradientBrush)
['{79C44874-B697-4C02-8E29-5D257828A590}']
{$region property access methods}
function GetRect: TRectF;
procedure SetRect(const Value: TRectF);
{$endregion}
property Rect: TRectF read GetRect write SetRect;
end;
{ IBitmapBrush references a bitmap as a repeatable fill pattern. The pattern
can be scaled along two axes, translated, rotated, and alpha blended. }
IBitmapBrush = interface(IBrush)
['{2EAF4D99-EFAC-47C9-AB45-C6C49ACAAF98}']
{$region property access methods}
function GetBitmap: IBitmap;
procedure SetBitmap(Value: IBitmap);
function GetAngle: Single;
procedure SetAngle(Value: Single);
function GetOffset: TPointF;
procedure SetOffset(const Value: TPointF);
function GetScale: TPointF;
procedure SetScale(const Value: TPointF);
function GetOpacity: Single;
procedure SetOpacity(Value: Single);
{$endregion}
property Bitmap: IBitmap read GetBitmap write SetBitmap;
property Angle: Single read GetAngle write SetAngle;
property Offset: TPointF read GetOffset write SetOffset;
property Scale: TPointF read GetScale write SetScale;
property Opacity: Single read GetOpacity write SetOpacity;
end;
{ IResourceStore is associated with a canvas, and allows for the creation and
management of bitmap and font resources. Resoruces are tracked by name, and
subsequent requests using the same name return an existing resource rather
than loading the same resource mutliple times. }
IResourceStore = interface
['{DEFA1507-0E3F-49C9-8E39-73F12A52560C}']
{ Create a new render bitmap, checking the store first if a render bitmap
with a matching name already exists. }
function NewBitmap(const Name: string; Width, Height: LongWord): IRenderBitmap;
{ Check the store if a image exists using name as a the key.
If name is not found then nil is returned. }
function LoadBitmap(const Name: string): IBitmap; overload;
{ Check the store if an image already exists. If not found load a new jpg, png,
psd, tga, pic or gif image from a file or memory and associated it with the
store using name as a key. }
function LoadBitmap(const Name: string; const FileName: string): IBitmap; overload;
function LoadBitmap(const Name: string; Memory: Pointer; Size: LongWord): IBitmap; overload;
{ Release space used by a bitmap and dispose of the underlying resources. }
procedure DisposeBitmap(Bitmap: IBitmap);
{ Check the store if a font exists using name as a the key.
If name is not found then nil is returned. }
function LoadFont(const Name: string): IFont; overload;
{ Check the store if a font already exists. If not found load a new font from a file
or memory and associated it with the store using name as a key }
function LoadFont(const Name: string; const FileName: string): IFont; overload;
function LoadFont(const Name: string; Memory: Pointer; Size: LongWord): IFont; overload;
{ Note: It is an intentional design that fonts cannot be disposed }
end;
// TODO: test object management
{ ICanvas provides the main interface for generating vector graphics in this
graphics unit. Canvas can be used to draw paths, images, and text. It has
global properties for matrix transforms, blending, and alpha blending (aka
Opacity), and methods for clipping and clearing content. }
ICanvas = interface(IResourceStore)
['{352DAE63-6D1C-40E0-955E-87C27020CCE0}']
{$region property access methods}
function GetBlendMode: TBlendMode;
procedure SetBlendMode(Value: TBlendMode);
function GetOpacity: Single;
procedure SetOpacity(Value: Single);
function GetMatrix: IMatrix;
procedure SetMatrix(Value: IMatrix);
function GetWinding: TWinding;
procedure SetWinding(const Value: TWinding);
{$endregion}
{ Clip drawing to a rectangle. You can use an empty rect to remove the
clipping or combine mutliple calls to intersect the previous clipping
regions }
procedure Clip(const Rect: TRectF); overload;
{ Shortcut to remove the clipping }
procedure Clip; overload;
{ Clear all pixels in the current render or back buffer target. A render
bitmap can be used with the canvas using its Bind and Unbind methods. }
procedure Clear;
{ Measure a single line of text }
function MeasureText(Font: IFont; const Text: string): TPointF;
{ Measure a the height of multiple lines of text given a width }
function MeasureMemo(Font: IFont; const Text: string; Width: Single): Single;
{ Render a single line of text given a coordinate }
procedure DrawText(Font: IFont; const Text: string; X, Y: Single);
{ Render a multiple lines of text given a width }
procedure DrawTextMemo(Font: IFont; const Text: string; X, Y, Width: Single);
{ Raster image drawing }
procedure DrawImage(Image: IBitmap; X, Y: Single; Opacity: Single = 1; Angle: Single = 0); overload;
procedure DrawImage(Image: IBitmap; Source, Dest: TRectF; Opacity: Single = 1; Angle: Single = 0); overload;
{ Discards the existing path and begins a new one }
procedure BeginPath;
{ Closing the path creates a line from the last point to the first point in
the path. It does not begin a new path. }
procedure ClosePath;
{ These methods add geometry to the current path }
procedure MoveTo(X, Y: Single);
procedure LineTo(X, Y: Single);
procedure ArcTo(X1, Y1, X2, Y2, Radius: Single);
procedure BezierTo(CX1, CY1, CX2, CY2, X, Y: Single);
procedure QuadTo(CX, CY, X, Y: Single);
procedure Arc(CX, CY, Radius, A0, A1: Single; Clockwise: Boolean);
procedure Circle(X, Y, Radius: Single); overload;
procedure Ellipse(const R: TRectF); overload;
procedure Ellipse(X, Y, Width, Height: Single); overload;
procedure Rect(const R: TRectF); overload;
procedure Rect(X, Y, Width, Height: Single); overload;
procedure RoundRect(const R: TRectF; Radius: Single); overload;
procedure RoundRect(X, Y, Width, Height: Single; Radius: Single); overload;
procedure Polygon(P: PPointF; Count: Integer; Closed: Boolean = True);
{ Radii are TL top left, TR top right, BR bottom right, and BL bottom left }
procedure RoundRectVarying(const R: TRectF; TL, TR, BR, BL: Single);
{ When preserve is false the current path is discarded and a new path begins }
procedure Fill(Brush: IBrush; Preserve: Boolean = False); overload;
procedure Fill(Color: TColorF; Preserve: Boolean = False); overload;
procedure Stroke(Pen: IPen; Preserve: Boolean = False); overload;
procedure Stroke(Color: TColorF; Width: Single = 1; Preserve: Boolean = False); overload;
{ Convenience methods that begin, paint, then discard a path }
procedure FillCircle(Brush: IBrush; X, Y, Radius: Single);
procedure StrokeCircle(Pen: IPen; X, Y, Radius: Single);
procedure FillRect(Brush: IBrush; const R: TRectF);
procedure StrokeRect(Pen: IPen; const R: TRectF);
procedure FillRoundRect(Brush: IBrush; const R: TRectF; Radius: Single);
procedure StrokeRoundRect(Pen: IPen; const R: TRectF; Radius: Single);
{ Global blending mode can be controlled using this property }
property BlendMode: TBlendMode read GetBlendMode write SetBlendMode;
{ Global rendering opacity can be controlled using this property }
property Opacity: Single read GetOpacity write SetOpacity;
{ Global rendering can be transformed using this property }
property Matrix: IMatrix read GetMatrix write SetMatrix;
{ Counter clockwise creates solid shapes and clockwise creates shapes with holes. }
property Winding: TWinding read GetWinding write SetWinding;
end;
{ Do not use IBackBuffer unless you are implementing a new windowing system
to manage a GL context. }
IBackBuffer = interface
['{65B38056-5457-44B0-B10D-06F2AE95E73A}']
procedure Flip(W, H: Integer);
end;
function Clamp(A: Single): Single; inline;
{ Routines to create objects used by canvas methods }
function NewColorB(R, G, B: Byte; A: Byte = $FF): TColorF; inline;
function NewColorF(R, G, B: Single; A: Single = 1): TColorF; inline;
function NewHSL(H, S, L: Single; A: Single = 1): TColorF; inline;
function NewPointF(X, Y: Single): TPointF; inline;
function NewRectF(Width, Height: Single): TRectF; overload; inline;
function NewRectF(X, Y, Width, Height: Single): TRectF; overload; inline;
function NewMatrix: IMatrix;
function NewPen: IPen; overload;
function NewPen(const Color: TColorF; Width: Single = 1): IPen; overload;
function NewBrush(const Color: TColorF): ISolidBrush; overload;
function NewBrush(const A, B: TPointF): ILinearGradientBrush; overload;
function NewBrush(const Rect: TRectF): IRadialGradientBrush; overload;
function NewBrush(Bitmap: IBitmap): IBitmapBrush; overload;
function NewCanvas: ICanvas;
{ Useful constants }
const
PointZero: TPointF = (X: 0; Y: 0);
RectEmpty: TRectF = (X: 0; Y: 0; Width: 0; Height: 0);
{ Common colors }
colorBlack = TColorB($FF000000);
colorWhite = TColorB($FFFFFFFF);
colorAliceBlue = TColorB($FFF0F8FF);
colorAntiqueWhite = TColorB($FFFAEBD7);
colorAqua = TColorB($FF00FFFF);
colorAquamarine = TColorB($FF7FFFD4);
colorAzure = TColorB($FFF0FFFF);
colorBeige = TColorB($FFF5F5DC);
colorBisque = TColorB($FFFFE4C4);
colorBlanchedAlmond = TColorB($FFFFEBCD);
colorBlue = TColorB($FF0000FF);
colorBlueViolet = TColorB($FF8A2BE2);
colorBrown = TColorB($FFA52A2A);
colorBurlyWood = TColorB($FFDEB887);
colorCadetBlue = TColorB($FF5F9EA0);
colorChartreuse = TColorB($FF7FFF00);
colorChocolate = TColorB($FFD2691E);
colorCoral = TColorB($FFFF7F50);
colorCornflowerBlue = TColorB($FF6495ED);
colorCornsilk = TColorB($FFFFF8DC);
colorCrimson = TColorB($FFDC143C);
colorCyan = TColorB($FF00FFFF);
colorDarkBlue = TColorB($FF00008B);
colorDarkCyan = TColorB($FF008B8B);
colorDarkGoldenRod = TColorB($FFB8860B);
colorDarkGray = TColorB($FFA9A9A9);
colorDarkGrey = TColorB($FFA9A9A9);
colorDarkGreen = TColorB($FF006400);
colorDarkKhaki = TColorB($FFBDB76B);
colorDarkMagenta = TColorB($FF8B008B);
colorDarkOliveGreen = TColorB($FF556B2F);
colorDarkOrange = TColorB($FFFF8C00);
colorDarkOrchid = TColorB($FF9932CC);
colorDarkRed = TColorB($FF8B0000);
colorDarkSalmon = TColorB($FFE9967A);
colorDarkSeaGreen = TColorB($FF8FBC8F);
colorDarkSlateBlue = TColorB($FF483D8B);
colorDarkSlateGray = TColorB($FF2F4F4F);
colorDarkSlateGrey = TColorB($FF2F4F4F);
colorDarkTurquoise = TColorB($FF00CED1);
colorDarkViolet = TColorB($FF9400D3);
colorDeepPink = TColorB($FFFF1493);
colorDeepSkyBlue = TColorB($FF00BFFF);
colorDimGray = TColorB($FF696969);
colorDimGrey = TColorB($FF696969);
colorDodgerBlue = TColorB($FF1E90FF);
colorFireBrick = TColorB($FFB22222);
colorFloralWhite = TColorB($FFFFFAF0);
colorForestGreen = TColorB($FF228B22);
colorFuchsia = TColorB($FFFF00FF);
colorGainsboro = TColorB($FFDCDCDC);
colorGhostWhite = TColorB($FFF8F8FF);
colorGold = TColorB($FFFFD700);
colorGoldenRod = TColorB($FFDAA520);
colorGray = TColorB($FF808080);
colorGrey = TColorB($FF808080);
colorGreen = TColorB($FF008000);
colorGreenYellow = TColorB($FFADFF2F);
colorHoneyDew = TColorB($FFF0FFF0);
colorHotPink = TColorB($FFFF69B4);
colorIndianRed = TColorB($FFCD5C5C);
colorIndigo = TColorB($FF4B0082);
colorIvory = TColorB($FFFFFFF0);
colorKhaki = TColorB($FFF0E68C);
colorLavender = TColorB($FFE6E6FA);
colorLavenderBlush = TColorB($FFFFF0F5);
colorLawnGreen = TColorB($FF7CFC00);
colorLemonChiffon = TColorB($FFFFFACD);
colorLightBlue = TColorB($FFADD8E6);
colorLightCoral = TColorB($FFF08080);
colorLightCyan = TColorB($FFE0FFFF);
colorLightGoldenRodYellow = TColorB($FFFAFAD2);
colorLightGray = TColorB($FFD3D3D3);
colorLightGrey = TColorB($FFD3D3D3);
colorLightGreen = TColorB($FF90EE90);
colorLightPink = TColorB($FFFFB6C1);
colorLightSalmon = TColorB($FFFFA07A);
colorLightSeaGreen = TColorB($FF20B2AA);
colorLightSkyBlue = TColorB($FF87CEFA);
colorLightSlateGray = TColorB($FF778899);
colorLightSlateGrey = TColorB($FF778899);
colorLightSteelBlue = TColorB($FFB0C4DE);
colorLightYellow = TColorB($FFFFFFE0);
colorLime = TColorB($FF00FF00);
colorLimeGreen = TColorB($FF32CD32);
colorLinen = TColorB($FFFAF0E6);
colorMagenta = TColorB($FFFF00FF);
colorMaroon = TColorB($FF800000);
colorMediumAquaMarine = TColorB($FF66CDAA);
colorMediumBlue = TColorB($FF0000CD);
colorMediumOrchid = TColorB($FFBA55D3);
colorMediumPurple = TColorB($FF9370DB);
colorMediumSeaGreen = TColorB($FF3CB371);
colorMediumSlateBlue = TColorB($FF7B68EE);
colorMediumSpringGreen = TColorB($FF00FA9A);
colorMediumTurquoise = TColorB($FF48D1CC);
colorMediumVioletRed = TColorB($FFC71585);
colorMidnightBlue = TColorB($FF191970);
colorMintCream = TColorB($FFF5FFFA);
colorMistyRose = TColorB($FFFFE4E1);
colorMoccasin = TColorB($FFFFE4B5);
colorNavajoWhite = TColorB($FFFFDEAD);
colorNavy = TColorB($FF000080);
colorOldLace = TColorB($FFFDF5E6);
colorOlive = TColorB($FF808000);
colorOliveDrab = TColorB($FF6B8E23);
colorOrange = TColorB($FFFFA500);
colorOrangeRed = TColorB($FFFF4500);
colorOrchid = TColorB($FFDA70D6);
colorPaleGoldenRod = TColorB($FFEEE8AA);
colorPaleGreen = TColorB($FF98FB98);
colorPaleTurquoise = TColorB($FFAFEEEE);
colorPaleVioletRed = TColorB($FFDB7093);
colorPapayaWhip = TColorB($FFFFEFD5);
colorPeachPuff = TColorB($FFFFDAB9);
colorPeru = TColorB($FFCD853F);
colorPink = TColorB($FFFFC0CB);
colorPlum = TColorB($FFDDA0DD);
colorPowderBlue = TColorB($FFB0E0E6);
colorPurple = TColorB($FF800080);
colorRebeccaPurple = TColorB($FF663399);
colorRed = TColorB($FFFF0000);
colorRosyBrown = TColorB($FFBC8F8F);
colorRoyalBlue = TColorB($FF4169E1);
colorSaddleBrown = TColorB($FF8B4513);
colorSalmon = TColorB($FFFA8072);
colorSandyBrown = TColorB($FFF4A460);
colorSeaGreen = TColorB($FF2E8B57);
colorSeaShell = TColorB($FFFFF5EE);
colorSienna = TColorB($FFA0522D);
colorSilver = TColorB($FFC0C0C0);
colorSkyBlue = TColorB($FF87CEEB);
colorSlateBlue = TColorB($FF6A5ACD);
colorSlateGray = TColorB($FF708090);
colorSlateGrey = TColorB($FF708090);
colorSnow = TColorB($FFFFFAFA);
colorSpringGreen = TColorB($FF00FF7F);
colorSteelBlue = TColorB($FF4682B4);
colorTan = TColorB($FFD2B48C);
colorTeal = TColorB($FF008080);
colorThistle = TColorB($FFD8BFD8);
colorTomato = TColorB($FFFF6347);
colorTurquoise = TColorB($FF40E0D0);
colorViolet = TColorB($FFEE82EE);
colorWheat = TColorB($FFF5DEB3);
colorWhiteSmoke = TColorB($FFF5F5F5);
colorYellow = TColorB($FFFFFF00);
colorYellowGreen = TColorB($FF9ACD32);
implementation
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment