Class TBGRACanvas

Unit

Declaration

type TBGRACanvas = class(TObject)

Description

Improved canvas with gamma correction and transparency

Hierarchy

Overview

Fields

Public AntialiasingMode: TAntialiasingMode;
Public DrawFontBackground: boolean;
Protected FBitmap: TBGRACustomBitmap;
Protected FBrush: TBGRABrush;
Protected FClippingOn: Boolean;
Protected FFont: TBGRAFont;
Public FillMode: TFillMode;
Protected FInactiveClipRect: TRect;
Protected FPen: TBGRAPen;
Protected FPenPos: TPoint;
Public TextStyle: TTextStyle;

Methods

Public constructor Create(ABitmap: TBGRACustomBitmap);
Public destructor Destroy; override;
Public function GetPixelColor(X, Y: Integer): TColor;
Public function TextExtent(const Text: string): TSize;
Public function TextHeight(const Text: string): Integer;
Public function TextWidth(const Text: string): Integer;
Protected function NoBrush: boolean;
Protected function NoPen: boolean;
Public procedure Arc(x1,y1,x2,y2,StartDeg16,LengthDeg16: integer);
Public procedure Arc(x1,y1,x2,y2,sx,sy,ex,ey: integer);
Public procedure Arc65536(x1,y1,x2,y2: integer; start65536,end65536: word; Options: TArcOptions);
Public procedure Chord(x1,y1,x2,y2,sx,sy,ex,ey: integer);
Public procedure Chord(x1,y1,x2,y2,StartDeg16,LengthDeg16: integer);
Public procedure CopyRect(X,Y: Integer; SrcBitmap: TBGRACustomBitmap; SrcRect: TRect);
Public procedure CopyRect(Dest: TRect; SrcBmp: TBGRACustomBitmap; Source: TRect); virtual;
Public procedure Draw(X,Y: Integer; SrcBitmap: TBitmap); overload;
Public procedure Draw(X,Y: Integer; SrcBitmap: TBGRACustomBitmap); overload;
Public procedure DrawFocusRect(bounds: TRect);
Public procedure Ellipse(const bounds: TRect);
Public procedure Ellipse(x1,y1,x2,y2: integer);
Public procedure EllipseC(x,y,rx,ry: integer);
Public procedure FillRect(const bounds: TRect);
Public procedure FillRect(x1,y1,x2,y2: integer);
Public procedure FloodFill(X, Y: Integer);
Public procedure FloodFill(X, Y: Integer; FillColor: TBGRAPixel; FillStyle: TFillStyle);
Public procedure FloodFill(X, Y: Integer; FillColor: TColor; FillStyle: TFillStyle);
Public procedure Frame(const bounds: TRect);
Public procedure Frame(x1,y1,x2,y2: integer);
Public procedure Frame3D(var bounds: TRect; width: integer; Style: TGraphicsBevelCut); overload;
Public procedure Frame3D(var bounds: TRect; width: integer; Style: TGraphicsBevelCut; LightColor: TBGRAPixel; ShadowColor: TBGRAPixel); overload;
Public procedure FrameRect(x1,y1,x2,y2: integer; width: integer = 1);
Public procedure FrameRect(const bounds: TRect; width: integer = 1);
Public procedure GradientFill(ARect: TRect; AStart, AStop: TColor; ADirection: TGradientDirection; GammaCorrection: Boolean = false);
Public procedure Line(p1,p2: TPoint); overload;
Public procedure Line(x1,y1,x2,y2: integer); overload;
Public procedure LineTo(x,y: integer); overload;
Public procedure LineTo(p: TPoint); overload;
Public procedure MoveTo(p: TPoint); overload;
Public procedure MoveTo(x,y: integer); overload;
Public procedure Pie(x1,y1,x2,y2,StartDeg16,LengthDeg16: integer);
Public procedure Pie(x1,y1,x2,y2,sx,sy,ex,ey: integer);
Public procedure PolyBezier(const Points: array of TPoint; Filled: boolean = False; Continuous: boolean = False);
Public procedure PolyBezier(Points: PPoint; NumPts: Integer; Filled: boolean = False; Continuous: boolean = False);
Public procedure Polygon(Points: PPoint; NumPts: Integer; Winding: boolean = False);
Public procedure Polygon(const Points: array of TPoint; Winding: Boolean; StartIndex: Integer = 0; NumPts: Integer = -1);
Public procedure Polygon(const APoints: array of TPoint);
Public procedure PolygonF(const APoints: array of TPointF; Winding: Boolean; FillOnly: Boolean = False);
Public procedure PolygonF(const APoints: array of TPointF);
Public procedure Polyline(Points: PPoint; NumPts: Integer);
Public procedure Polyline(const Points: array of TPoint; StartIndex: Integer; NumPts: Integer = -1);
Public procedure Polyline(const APoints: array of TPoint);
Public procedure PolylineF(const APoints: array of TPointF);
Public procedure RadialPie(x1,y1,x2,y2,StartDeg16,LengthDeg16: integer);
Public procedure Rectangle(x1,y1,x2,y2: integer; Filled: Boolean = True);
Public procedure Rectangle(const bounds: TRect; Filled: Boolean = True);
Public procedure RoundRect(const bounds: TRect; dx,dy: integer);
Public procedure RoundRect(x1,y1,x2,y2: integer; dx,dy: integer);
Public procedure SetBrush(const AValue: TBGRABrush);
Public procedure SetPen(const AValue: TBGRAPen);
Public procedure SetPixelColor(X, Y: Integer; const AValue: TColor);
Public procedure StretchDraw(DestRect: TRect; SrcBitmap: TBGRACustomBitmap; HorizFlip: Boolean = false; VertFlip: Boolean = false);
Public procedure TextOut(X,Y: Integer; const Text: String; RightToLeft: boolean = false);
Public procedure TextRect(const ARect: TRect; X, Y: integer; const Text: string);
Public procedure TextRect(ARect: TRect; X, Y: integer; const Text: string; const Style: TTextStyle);
Protected procedure ApplyFont;
Protected procedure ApplyPenStyle;

Properties

Public property Brush: TBGRABrush read FBrush write SetBrush;
Public property Clipping: Boolean read GetClipping write SetClipping;
Public property ClipRect: TRect read GetClipRect write SetClipRect;
Public property Colors[X,Y: Integer]: TFPColor read GetFPPixelColor write SetFPPixelColor;
Public property Font: TBGRAFont read FFont write SetFont;
Public property GammaExpandedPixels[X,Y: Integer]: TExpandedPixel read GetExpandedPixel write SetExpandedPixel;
Public property Height: integer read GetHeight;
Public property Pen: TBGRAPen read FPen write SetPen;
Public property PenPos : TPoint read FPenPos write FPenPos;
Public property Pixels[X,Y: Integer]: TColor read GetPixelColor write SetPixelColor;
Public property Width : integer read GetWidth;

Description

Fields

Public AntialiasingMode: TAntialiasingMode;

This item has no description.

Public DrawFontBackground: boolean;

This item has no description.

Protected FBitmap: TBGRACustomBitmap;

This item has no description.

Protected FBrush: TBGRABrush;

This item has no description.

Protected FClippingOn: Boolean;

This item has no description.

Protected FFont: TBGRAFont;

This item has no description.

Public FillMode: TFillMode;

This item has no description.

Protected FInactiveClipRect: TRect;

This item has no description.

Protected FPen: TBGRAPen;

This item has no description.

Protected FPenPos: TPoint;

This item has no description.

Public TextStyle: TTextStyle;

This item has no description.

Methods

Public constructor Create(ABitmap: TBGRACustomBitmap);

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public function GetPixelColor(X, Y: Integer): TColor;

This item has no description.

Public function TextExtent(const Text: string): TSize;

This item has no description.

Public function TextHeight(const Text: string): Integer;

This item has no description.

Public function TextWidth(const Text: string): Integer;

This item has no description.

Protected function NoBrush: boolean;

This item has no description.

Protected function NoPen: boolean;

This item has no description.

Public procedure Arc(x1,y1,x2,y2,StartDeg16,LengthDeg16: integer);

This item has no description.

Public procedure Arc(x1,y1,x2,y2,sx,sy,ex,ey: integer);

This item has no description.

Public procedure Arc65536(x1,y1,x2,y2: integer; start65536,end65536: word; Options: TArcOptions);

This item has no description.

Public procedure Chord(x1,y1,x2,y2,sx,sy,ex,ey: integer);

This item has no description.

Public procedure Chord(x1,y1,x2,y2,StartDeg16,LengthDeg16: integer);

This item has no description.

Public procedure CopyRect(X,Y: Integer; SrcBitmap: TBGRACustomBitmap; SrcRect: TRect);

This item has no description.

Public procedure CopyRect(Dest: TRect; SrcBmp: TBGRACustomBitmap; Source: TRect); virtual;

This item has no description.

Public procedure Draw(X,Y: Integer; SrcBitmap: TBitmap); overload;

This item has no description.

Public procedure Draw(X,Y: Integer; SrcBitmap: TBGRACustomBitmap); overload;

This item has no description.

Public procedure DrawFocusRect(bounds: TRect);

This item has no description.

Public procedure Ellipse(const bounds: TRect);

This item has no description.

Public procedure Ellipse(x1,y1,x2,y2: integer);

This item has no description.

Public procedure EllipseC(x,y,rx,ry: integer);

This item has no description.

Public procedure FillRect(const bounds: TRect);

This item has no description.

Public procedure FillRect(x1,y1,x2,y2: integer);

This item has no description.

Public procedure FloodFill(X, Y: Integer);

This item has no description.

Public procedure FloodFill(X, Y: Integer; FillColor: TBGRAPixel; FillStyle: TFillStyle);

This item has no description.

Public procedure FloodFill(X, Y: Integer; FillColor: TColor; FillStyle: TFillStyle);

This item has no description.

Public procedure Frame(const bounds: TRect);

This item has no description.

Public procedure Frame(x1,y1,x2,y2: integer);

This item has no description.

Public procedure Frame3D(var bounds: TRect; width: integer; Style: TGraphicsBevelCut); overload;

This item has no description.

Public procedure Frame3D(var bounds: TRect; width: integer; Style: TGraphicsBevelCut; LightColor: TBGRAPixel; ShadowColor: TBGRAPixel); overload;

This item has no description.

Public procedure FrameRect(x1,y1,x2,y2: integer; width: integer = 1);

This item has no description.

Public procedure FrameRect(const bounds: TRect; width: integer = 1);

This item has no description.

Public procedure GradientFill(ARect: TRect; AStart, AStop: TColor; ADirection: TGradientDirection; GammaCorrection: Boolean = false);

This item has no description.

Public procedure Line(p1,p2: TPoint); overload;

This item has no description.

Public procedure Line(x1,y1,x2,y2: integer); overload;

This item has no description.

Public procedure LineTo(x,y: integer); overload;

This item has no description.

Public procedure LineTo(p: TPoint); overload;

This item has no description.

Public procedure MoveTo(p: TPoint); overload;

This item has no description.

Public procedure MoveTo(x,y: integer); overload;

This item has no description.

Public procedure Pie(x1,y1,x2,y2,StartDeg16,LengthDeg16: integer);

This item has no description.

Public procedure Pie(x1,y1,x2,y2,sx,sy,ex,ey: integer);

This item has no description.

Public procedure PolyBezier(const Points: array of TPoint; Filled: boolean = False; Continuous: boolean = False);

This item has no description.

Public procedure PolyBezier(Points: PPoint; NumPts: Integer; Filled: boolean = False; Continuous: boolean = False);

This item has no description.

Public procedure Polygon(Points: PPoint; NumPts: Integer; Winding: boolean = False);

This item has no description.

Public procedure Polygon(const Points: array of TPoint; Winding: Boolean; StartIndex: Integer = 0; NumPts: Integer = -1);

This item has no description.

Public procedure Polygon(const APoints: array of TPoint);

This item has no description.

Public procedure PolygonF(const APoints: array of TPointF; Winding: Boolean; FillOnly: Boolean = False);

This item has no description.

Public procedure PolygonF(const APoints: array of TPointF);

This item has no description.

Public procedure Polyline(Points: PPoint; NumPts: Integer);

This item has no description.

Public procedure Polyline(const Points: array of TPoint; StartIndex: Integer; NumPts: Integer = -1);

This item has no description.

Public procedure Polyline(const APoints: array of TPoint);

This item has no description.

Public procedure PolylineF(const APoints: array of TPointF);

This item has no description.

Public procedure RadialPie(x1,y1,x2,y2,StartDeg16,LengthDeg16: integer);

This item has no description.

Public procedure Rectangle(x1,y1,x2,y2: integer; Filled: Boolean = True);

This item has no description.

Public procedure Rectangle(const bounds: TRect; Filled: Boolean = True);

This item has no description.

Public procedure RoundRect(const bounds: TRect; dx,dy: integer);

This item has no description.

Public procedure RoundRect(x1,y1,x2,y2: integer; dx,dy: integer);

This item has no description.

Public procedure SetBrush(const AValue: TBGRABrush);

This item has no description.

Public procedure SetPen(const AValue: TBGRAPen);

This item has no description.

Public procedure SetPixelColor(X, Y: Integer; const AValue: TColor);

This item has no description.

Public procedure StretchDraw(DestRect: TRect; SrcBitmap: TBGRACustomBitmap; HorizFlip: Boolean = false; VertFlip: Boolean = false);

This item has no description.

Public procedure TextOut(X,Y: Integer; const Text: String; RightToLeft: boolean = false);

This item has no description.

Public procedure TextRect(const ARect: TRect; X, Y: integer; const Text: string);

This item has no description.

Public procedure TextRect(ARect: TRect; X, Y: integer; const Text: string; const Style: TTextStyle);

This item has no description.

Protected procedure ApplyFont;

This item has no description.

Protected procedure ApplyPenStyle;

This item has no description.

Properties

Public property Brush: TBGRABrush read FBrush write SetBrush;

This item has no description.

Public property Clipping: Boolean read GetClipping write SetClipping;

This item has no description.

Public property ClipRect: TRect read GetClipRect write SetClipRect;

This item has no description.

Public property Colors[X,Y: Integer]: TFPColor read GetFPPixelColor write SetFPPixelColor;

This item has no description.

Public property Font: TBGRAFont read FFont write SetFont;

This item has no description.

Public property GammaExpandedPixels[X,Y: Integer]: TExpandedPixel read GetExpandedPixel write SetExpandedPixel;

This item has no description.

Public property Height: integer read GetHeight;

This item has no description.

Public property Pen: TBGRAPen read FPen write SetPen;

This item has no description.

Public property PenPos : TPoint read FPenPos write FPenPos;

This item has no description.

Public property Pixels[X,Y: Integer]: TColor read GetPixelColor write SetPixelColor;

This item has no description.

Public property Width : integer read GetWidth;

This item has no description.