-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathAsciiImage.RenderContext.Intf.pas
57 lines (47 loc) · 1.72 KB
/
AsciiImage.RenderContext.Intf.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
unit AsciiImage.RenderContext.Intf;
interface
uses
Classes,
Types,
Graphics,
AsciiImage.RenderContext.Types;
type
IProperties = interface;
TPropertyChangedEvent = reference to procedure;
IProperties = interface
['{171649BE-47FC-4536-822A-CCDD20878573}']
function GetOnChanged: TPropertyChangedEvent;
procedure SetOnChanged(const Value: TPropertyChangedEvent);
property OnChanged: TPropertyChangedEvent read GetOnChanged write SetOnChanged;
end;
IBrushProperties = interface(IProperties)
['{C716DFFA-B2CD-4210-981B-627B8F923D70}']
function GetColor: TColorValue;
procedure SetColor(const Value: TColorValue);
function GetVisible: Boolean;
procedure SetVisible(const Value: Boolean);
property Color: TColorValue read GetColor write SetColor;
property Visible: Boolean read GetVisible write SetVisible;
end;
IPenProperties = interface(IBrushProperties)
['{DE04B09C-7ED5-4189-82A6-2C90F5E1F4D6}']
function GetSize: Integer;
procedure SetSize(const Value: Integer);
property Size: Integer read GetSize write SetSize;
end;
IRenderContext = interface
['{22DAA33A-F062-4F21-92EE-C38F09E2520B}']
function GetBrush: IBrushProperties;
function GetPen: IPenProperties;
procedure Clear(AColor: TColorValue);
procedure DrawPolygon(const APoints: array of TPointF);
procedure DrawLine(const AFrom, ATo: TPointF);
procedure DrawEllipsis(const ARect: TRectF);
procedure FillRectangle(const ARect: TRectF);
procedure BeginScene(const ARect: TRect);
procedure EndScene();
property Brush: IBrushProperties read GetBrush;
property Pen: IPenProperties read GetPen;
end;
implementation
end.