Class TUniversalDrawer

Unit

Declaration

type TUniversalDrawer = class(TCustomUniversalDrawer)

Description

Drawer implementation that is colorspace agnostic

Hierarchy

Overview

Methods

Public class function CheckAntialiasRectBounds(var x, y, x2, y2: single; w: single): boolean;
Public class function CheckRectBounds(var x,y,x2,y2: integer; minsize: integer): boolean;
Public class function CreateArrow: TBGRACustomArrow; override;
Public class function CreatePenStroker: TBGRACustomPenStroker; override;
Public class function GetMaxColorChannelDepth(ADest: TCustomUniversalBitmap): byte;
Public class procedure DrawLine(ADest: TCustomUniversalBitmap; x1, y1, x2, y2: integer; const ABrush: TUniversalBrush; DrawLastPixel: boolean; AAlpha: Word = 65535); override;
Public class procedure DrawLineAntialias(ADest: TCustomUniversalBitmap; x1, y1, x2, y2: integer; const ABrush: TUniversalBrush; DrawLastPixel: boolean; AAlpha: Word = 65535); overload; override;
Public class procedure DrawLineAntialias(ADest: TCustomUniversalBitmap; x1, y1, x2, y2: integer; const ABrush1, ABrush2: TUniversalBrush; ADashLen: integer; var DashPos: integer; DrawLastPixel: boolean; AAlpha: Word = 65535); override;
Public class procedure DrawPolygon(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush: TUniversalBrush; AAlpha: Word = 65535); override;
Public class procedure DrawPolygonAntialias(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush1, ABrush2: TUniversalBrush; ADashLen: integer; AAlpha: Word = 65535); overload; override;
Public class procedure DrawPolygonAntialias(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; const APoints: array of TPointF; const ABrush: TUniversalBrush; AWidth: single); overload; override;
Public class procedure DrawPolygonAntialias(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;
Public class procedure DrawPolyLine(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush: TUniversalBrush; DrawLastPixel: boolean; AAlpha: Word = 65535); override;
Public class procedure DrawPolyLineAntialias(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush1, ABrush2: TUniversalBrush; ADashLen: integer; DrawLastPixel: boolean; AAlpha: Word = 65535); overload; override;
Public class procedure DrawPolyLineAntialias(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush: TUniversalBrush; DrawLastPixel: boolean; AAlpha: Word = 65535); overload; override;
Public class procedure Ellipse(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; const AOrigin, AXAxis, AYAxis: TPointF; const ABrush: TUniversalBrush; AWidth: single; AAlpha: Word=65535); overload; override;
Public class procedure Ellipse(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; x, y, rx, ry: single; const ABrush: TUniversalBrush; AWidth: single; AAlpha: Word=65535); overload; override;
Public class procedure EllipseAntialias(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; const AOrigin, AXAxis, AYAxis: TPointF; const ABrush: TUniversalBrush; AWidth: single); overload; override;
Public class procedure EllipseAntialias(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; x, y, rx, ry: single; const ABrush: TUniversalBrush; AWidth: single); overload; override;
Public class procedure FillEllipseAntialias(ADest: TCustomUniversalBitmap; const AOrigin, AXAxis, AYAxis: TPointF; const ABrush: TUniversalBrush); overload; override;
Public class procedure FillEllipseAntialias(ADest: TCustomUniversalBitmap; x, y, rx, ry: single; const ABrush: TUniversalBrush); overload; override;
Public class procedure FillPoly(ADest: TCustomUniversalBitmap; const APoints: array of TPointF; AFillMode: TFillMode; ABrush: TUniversalBrush; APixelCenteredCoordinates: boolean = true; AAlpha: Word = 65535); override;
Public class procedure FillPolyAntialias(ADest: TCustomUniversalBitmap; const APoints: array of TPointF; AFillMode: TFillMode; ABrush: TUniversalBrush; APixelCenteredCoordinates: boolean); override;
Public class procedure FillRectAntialias(ADest: TCustomUniversalBitmap; x, y, x2, y2: single; const ABrush: TUniversalBrush; APixelCenteredCoordinates: boolean = true); override;
Public class procedure FillRoundRect(ADest: TCustomUniversalBitmap; X1, Y1, X2, Y2: integer; DX, DY: integer; const AFillBrush: TUniversalBrush; AAlpha: Word = 65535); override;
Public class procedure FillRoundRectAntialias(ADest: TCustomUniversalBitmap; x,y,x2,y2, rx,ry: single; const ABrush: TUniversalBrush; AOptions: TRoundRectangleOptions = []; APixelCenteredCoordinates: boolean = true); override;
Public class procedure FillShape(ADest: TCustomUniversalBitmap; AShape: TBGRACustomFillInfo; AFillMode: TFillMode; ABrush: TUniversalBrush; AAlpha: Word = 65535); override;
Public class procedure FillShapeAntialias(ADest: TCustomUniversalBitmap; AShape: TBGRACustomFillInfo; AFillMode: TFillMode; ABrush: TUniversalBrush); override;
Public class procedure FilterBlurMotion(ASource: TCustomUniversalBitmap; const ABounds: TRect; distance: single; angle: single; oriented: boolean; ADest: TCustomUniversalBitmap); override;
Public class procedure FilterBlurRadial(ASource: TCustomUniversalBitmap; const ABounds: TRect; radiusX, radiusY: single; blurType: TRadialBlurType; ADest: TCustomUniversalBitmap); override;
Public class procedure FilterCustomBlur(ASource: TCustomUniversalBitmap; const ABounds: TRect; mask: TCustomUniversalBitmap; ADest: TCustomUniversalBitmap); override;
Public class procedure LoadFromFile(ADest: TCustomUniversalBitmap; const AFilename: string); overload; override;
Public class procedure LoadFromFile(ADest: TCustomUniversalBitmap; const AFilename:String; AHandler:TFPCustomImageReader); overload; override;
Public class procedure LoadFromFile(ADest: TCustomUniversalBitmap; const AFilename: string; AOptions: TBGRALoadingOptions); overload; override;
Public class procedure LoadFromFile(ADest: TCustomUniversalBitmap; const AFilename:String; AHandler:TFPCustomImageReader; AOptions: TBGRALoadingOptions); overload; override;
Public class procedure LoadFromFileUTF8(ADest: TCustomUniversalBitmap; const AFilenameUTF8: string; AOptions: TBGRALoadingOptions = []); overload; override;
Public class procedure LoadFromFileUTF8(ADest: TCustomUniversalBitmap; const AFilenameUTF8: string; AHandler: TFPCustomImageReader; AOptions: TBGRALoadingOptions = []); overload; override;
Public class procedure LoadFromResource(ADest: TCustomUniversalBitmap; AFilename: string; AOptions: TBGRALoadingOptions); overload; override;
Public class procedure LoadFromResource(ADest: TCustomUniversalBitmap; AFilename: string); overload; override;
Public class procedure LoadFromResource(ADest: TCustomUniversalBitmap; AFilename: string; AHandler: TFPCustomImageReader); overload; override;
Public class procedure LoadFromResource(ADest: TCustomUniversalBitmap; AFilename: string; AHandler: TFPCustomImageReader; AOptions: TBGRALoadingOptions); overload; override;
Public class procedure LoadFromStream(ADest: TCustomUniversalBitmap; AStream: TStream; AHandler: TFPCustomImageReader; AOptions: TBGRALoadingOptions); overload; override;
Public class procedure LoadFromStream(ADest: TCustomUniversalBitmap; AStream: TStream; AHandler: TFPCustomImageReader); overload; override;
Public class procedure LoadFromStream(ADest: TCustomUniversalBitmap; AStream: TStream); overload; override;
Public class procedure LoadFromStream(ADest: TCustomUniversalBitmap; AStream: TStream; AOptions: TBGRALoadingOptions); overload; override;
Public class procedure Rectangle(ADest: TCustomUniversalBitmap; x, y, x2, y2: integer; const ABorderBrush, AFillBrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;
Public class procedure Rectangle(ADest: TCustomUniversalBitmap; x, y, x2, y2: integer; const ABrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;
Public class procedure RectangleAntialias(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; x, y, x2, y2: single; const ABrush: TUniversalBrush; AWidth: single); override;
Public class procedure RoundRect(ADest: TCustomUniversalBitmap; X1, Y1, X2, Y2: integer; DX, DY: integer; const ABorderBrush, AFillBrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;
Public class procedure RoundRect(ADest: TCustomUniversalBitmap; X1, Y1, X2, Y2: integer; DX, DY: integer; const ABorderBrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;
Public class procedure SaveToFile(ASource: TCustomUniversalBitmap; const AFilename: string; AHandler:TFPCustomImageWriter); overload; override;
Public class procedure SaveToFile(ASource: TCustomUniversalBitmap; const AFilename: string); overload; override;
Public class procedure SaveToFileUTF8(ASource: TCustomUniversalBitmap; const AFilenameUTF8: string); overload; override;
Public class procedure SaveToFileUTF8(ASource: TCustomUniversalBitmap; const AFilenameUTF8: string; AHandler:TFPCustomImageWriter); overload; override;
Public class procedure SaveToStreamAs(ASource: TCustomUniversalBitmap; AStream: TStream; AFormat: TBGRAImageFormat); override;
Public class procedure SaveToStreamAsPng(ASource: TCustomUniversalBitmap; AStream: TStream); override;

Description

Methods

Public class function CheckAntialiasRectBounds(var x, y, x2, y2: single; w: single): boolean;

This item has no description.

Public class function CheckRectBounds(var x,y,x2,y2: integer; minsize: integer): boolean;

==== Pixelwise drawing ====

Public class function CreateArrow: TBGRACustomArrow; override;

This item has no description.

Public class function CreatePenStroker: TBGRACustomPenStroker; override;

==== Using pen ====

Public class function GetMaxColorChannelDepth(ADest: TCustomUniversalBitmap): byte;

This item has no description.

Public class procedure DrawLine(ADest: TCustomUniversalBitmap; x1, y1, x2, y2: integer; const ABrush: TUniversalBrush; DrawLastPixel: boolean; AAlpha: Word = 65535); override;

Draws an aliased line from (x1,y1) to (x2,y2) using Bresenham's algorithm. ''DrawLastPixel'' specifies if (x2,y2) must be drawn.

Public class procedure DrawLineAntialias(ADest: TCustomUniversalBitmap; x1, y1, x2, y2: integer; const ABrush: TUniversalBrush; DrawLastPixel: boolean; AAlpha: Word = 65535); overload; override;

Draws an antialiased line from (x1,y1) to (x2,y2) using an improved version of Bresenham's algorithm ''c'' specifies the color. ''DrawLastPixel'' specifies if (x2,y2) must be drawn

Public class procedure DrawLineAntialias(ADest: TCustomUniversalBitmap; x1, y1, x2, y2: integer; const ABrush1, ABrush2: TUniversalBrush; ADashLen: integer; var DashPos: integer; DrawLastPixel: boolean; AAlpha: Word = 65535); override;

Draws an antialiased line with two colors ''c1'' and ''c2'' as dashes of length ''dashLen''. ''DashPos'' can be used to specify the start dash position and to retrieve the dash position at the end of the line, in order to draw a polyline with consistent dashes

Public class procedure DrawPolygon(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush: TUniversalBrush; AAlpha: Word = 65535); override;

This item has no description.

Public class procedure DrawPolygonAntialias(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush1, ABrush2: TUniversalBrush; ADashLen: integer; AAlpha: Word = 65535); overload; override;

This item has no description.

Public class procedure DrawPolygonAntialias(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; const APoints: array of TPointF; const ABrush: TUniversalBrush; AWidth: single); overload; override;

This item has no description.

Public class procedure DrawPolygonAntialias(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;

This item has no description.

Public class procedure DrawPolyLine(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush: TUniversalBrush; DrawLastPixel: boolean; AAlpha: Word = 65535); override;

This item has no description.

Public class procedure DrawPolyLineAntialias(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush1, ABrush2: TUniversalBrush; ADashLen: integer; DrawLastPixel: boolean; AAlpha: Word = 65535); overload; override;

This item has no description.

Public class procedure DrawPolyLineAntialias(ADest: TCustomUniversalBitmap; const points: array of TPoint; const ABrush: TUniversalBrush; DrawLastPixel: boolean; AAlpha: Word = 65535); overload; override;

This item has no description.

Public class procedure Ellipse(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; const AOrigin, AXAxis, AYAxis: TPointF; const ABrush: TUniversalBrush; AWidth: single; AAlpha: Word=65535); overload; override;

This item has no description.

Public class procedure Ellipse(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; x, y, rx, ry: single; const ABrush: TUniversalBrush; AWidth: single; AAlpha: Word=65535); overload; override;

This item has no description.

Public class procedure EllipseAntialias(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; const AOrigin, AXAxis, AYAxis: TPointF; const ABrush: TUniversalBrush; AWidth: single); overload; override;

This item has no description.

Public class procedure EllipseAntialias(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; x, y, rx, ry: single; const ABrush: TUniversalBrush; AWidth: single); overload; override;

This item has no description.

Public class procedure FillEllipseAntialias(ADest: TCustomUniversalBitmap; const AOrigin, AXAxis, AYAxis: TPointF; const ABrush: TUniversalBrush); overload; override;

This item has no description.

Public class procedure FillEllipseAntialias(ADest: TCustomUniversalBitmap; x, y, rx, ry: single; const ABrush: TUniversalBrush); overload; override;

This item has no description.

Public class procedure FillPoly(ADest: TCustomUniversalBitmap; const APoints: array of TPointF; AFillMode: TFillMode; ABrush: TUniversalBrush; APixelCenteredCoordinates: boolean = true; AAlpha: Word = 65535); override;

This item has no description.

Public class procedure FillPolyAntialias(ADest: TCustomUniversalBitmap; const APoints: array of TPointF; AFillMode: TFillMode; ABrush: TUniversalBrush; APixelCenteredCoordinates: boolean); override;

This item has no description.

Public class procedure FillRectAntialias(ADest: TCustomUniversalBitmap; x, y, x2, y2: single; const ABrush: TUniversalBrush; APixelCenteredCoordinates: boolean = true); override;

==== Filling ====

Public class procedure FillRoundRect(ADest: TCustomUniversalBitmap; X1, Y1, X2, Y2: integer; DX, DY: integer; const AFillBrush: TUniversalBrush; AAlpha: Word = 65535); override;

This item has no description.

Public class procedure FillRoundRectAntialias(ADest: TCustomUniversalBitmap; x,y,x2,y2, rx,ry: single; const ABrush: TUniversalBrush; AOptions: TRoundRectangleOptions = []; APixelCenteredCoordinates: boolean = true); override;

This item has no description.

Public class procedure FillShape(ADest: TCustomUniversalBitmap; AShape: TBGRACustomFillInfo; AFillMode: TFillMode; ABrush: TUniversalBrush; AAlpha: Word = 65535); override;

This item has no description.

Public class procedure FillShapeAntialias(ADest: TCustomUniversalBitmap; AShape: TBGRACustomFillInfo; AFillMode: TFillMode; ABrush: TUniversalBrush); override;

This item has no description.

Public class procedure FilterBlurMotion(ASource: TCustomUniversalBitmap; const ABounds: TRect; distance: single; angle: single; oriented: boolean; ADest: TCustomUniversalBitmap); override;

This item has no description.

Public class procedure FilterBlurRadial(ASource: TCustomUniversalBitmap; const ABounds: TRect; radiusX, radiusY: single; blurType: TRadialBlurType; ADest: TCustomUniversalBitmap); override;

filters

Public class procedure FilterCustomBlur(ASource: TCustomUniversalBitmap; const ABounds: TRect; mask: TCustomUniversalBitmap; ADest: TCustomUniversalBitmap); override;

This item has no description.

Public class procedure LoadFromFile(ADest: TCustomUniversalBitmap; const AFilename: string); overload; override;

Load image from a file. ''filename'' is an ANSI string

Public class procedure LoadFromFile(ADest: TCustomUniversalBitmap; const AFilename:String; AHandler:TFPCustomImageReader); overload; override;

Load image from a file with the specified image reader. ''filename'' is an ANSI string

Public class procedure LoadFromFile(ADest: TCustomUniversalBitmap; const AFilename: string; AOptions: TBGRALoadingOptions); overload; override;

This item has no description.

Public class procedure LoadFromFile(ADest: TCustomUniversalBitmap; const AFilename:String; AHandler:TFPCustomImageReader; AOptions: TBGRALoadingOptions); overload; override;

This item has no description.

Public class procedure LoadFromFileUTF8(ADest: TCustomUniversalBitmap; const AFilenameUTF8: string; AOptions: TBGRALoadingOptions = []); overload; override;

Load image from a file. ''filename'' is an UTF8 string

Public class procedure LoadFromFileUTF8(ADest: TCustomUniversalBitmap; const AFilenameUTF8: string; AHandler: TFPCustomImageReader; AOptions: TBGRALoadingOptions = []); overload; override;

Load image from a file with the specified image reader. ''filename'' is an UTF8 string

Public class procedure LoadFromResource(ADest: TCustomUniversalBitmap; AFilename: string; AOptions: TBGRALoadingOptions); overload; override;

This item has no description.

Public class procedure LoadFromResource(ADest: TCustomUniversalBitmap; AFilename: string); overload; override;

Load image from an embedded Lazarus resource. Format is detected automatically

Public class procedure LoadFromResource(ADest: TCustomUniversalBitmap; AFilename: string; AHandler: TFPCustomImageReader); overload; override;

Load image from an embedded Lazarus resource. The specified image reader is used

Public class procedure LoadFromResource(ADest: TCustomUniversalBitmap; AFilename: string; AHandler: TFPCustomImageReader; AOptions: TBGRALoadingOptions); overload; override;

This item has no description.

Public class procedure LoadFromStream(ADest: TCustomUniversalBitmap; AStream: TStream; AHandler: TFPCustomImageReader; AOptions: TBGRALoadingOptions); overload; override;

This item has no description.

Public class procedure LoadFromStream(ADest: TCustomUniversalBitmap; AStream: TStream; AHandler: TFPCustomImageReader); overload; override;

Load image from a stream. The specified image reader is used

Public class procedure LoadFromStream(ADest: TCustomUniversalBitmap; AStream: TStream); overload; override;

Load image from a stream. Format is detected automatically

Public class procedure LoadFromStream(ADest: TCustomUniversalBitmap; AStream: TStream; AOptions: TBGRALoadingOptions); overload; override;

This item has no description.

Public class procedure Rectangle(ADest: TCustomUniversalBitmap; x, y, x2, y2: integer; const ABorderBrush, AFillBrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;

Draw a filled rectangle with a border

Public class procedure Rectangle(ADest: TCustomUniversalBitmap; x, y, x2, y2: integer; const ABrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;

Draw the border of a rectangle

Public class procedure RectangleAntialias(ADest: TCustomUniversalBitmap; APen: TBGRACustomPenStroker; x, y, x2, y2: single; const ABrush: TUniversalBrush; AWidth: single); override;

This item has no description.

Public class procedure RoundRect(ADest: TCustomUniversalBitmap; X1, Y1, X2, Y2: integer; DX, DY: integer; const ABorderBrush, AFillBrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;

This item has no description.

Public class procedure RoundRect(ADest: TCustomUniversalBitmap; X1, Y1, X2, Y2: integer; DX, DY: integer; const ABorderBrush: TUniversalBrush; AAlpha: Word = 65535); overload; override;

This item has no description.

Public class procedure SaveToFile(ASource: TCustomUniversalBitmap; const AFilename: string; AHandler:TFPCustomImageWriter); overload; override;

Save image to a file with the specified image writer. ''filename'' is an ANSI string

Public class procedure SaveToFile(ASource: TCustomUniversalBitmap; const AFilename: string); overload; override;

Save image to a file. The format is guessed from the file extension. ''filename'' is an ANSI string

Public class procedure SaveToFileUTF8(ASource: TCustomUniversalBitmap; const AFilenameUTF8: string); overload; override;

Save image to a file. The format is guessed from the file extension. ''filename'' is an ANSI string

Public class procedure SaveToFileUTF8(ASource: TCustomUniversalBitmap; const AFilenameUTF8: string; AHandler:TFPCustomImageWriter); overload; override;

Save image to a file with the specified image writer. ''filename'' is an UTF8 string

Public class procedure SaveToStreamAs(ASource: TCustomUniversalBitmap; AStream: TStream; AFormat: TBGRAImageFormat); override;

Save image to a stream in the specified image format

Public class procedure SaveToStreamAsPng(ASource: TCustomUniversalBitmap; AStream: TStream); override;

Save image to a stream in PNG format