-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCanvas.inc
227 lines (188 loc) · 7.13 KB
/
Canvas.inc
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
//----------------------------------------
// ´úÂëÓÉGenlibVcl¹¤¾ß×Ô¶¯Éú³É¡£
// Copyright ? ying32. All Rights Reserved.
//
//----------------------------------------
function Canvas_Create: TCanvas; cdecl;
begin
Result := TCanvas.Create;
end;
procedure Canvas_Free(AObj: TCanvas); cdecl;
begin
AObj.Free;
end;
procedure Canvas_Arc(AObj: TCanvas; X1: Integer; Y1: Integer; X2: Integer; Y2: Integer; X3: Integer; Y3: Integer; X4: Integer; Y4: Integer); cdecl;
begin
AObj.Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4);
end;
procedure Canvas_ArcTo(AObj: TCanvas; X1: Integer; Y1: Integer; X2: Integer; Y2: Integer; X3: Integer; Y3: Integer; X4: Integer; Y4: Integer); cdecl;
begin
AObj.ArcTo(X1, Y1, X2, Y2, X3, Y3, X4, Y4);
end;
procedure Canvas_AngleArc(AObj: TCanvas; X: Integer; Y: Integer; Radius: Cardinal; var StartAngle: Single; var SweepAngle: Single); cdecl;
begin
AObj.AngleArc(X, Y, Radius, StartAngle, SweepAngle);
end;
procedure Canvas_Chord(AObj: TCanvas; X1: Integer; Y1: Integer; X2: Integer; Y2: Integer; X3: Integer; Y3: Integer; X4: Integer; Y4: Integer); cdecl;
begin
AObj.Chord(X1, Y1, X2, Y2, X3, Y3, X4, Y4);
end;
procedure Canvas_Ellipse(AObj: TCanvas; X1: Integer; Y1: Integer; X2: Integer; Y2: Integer); cdecl;
begin
AObj.Ellipse(X1, Y1, X2, Y2);
end;
procedure Canvas_FloodFill(AObj: TCanvas; X: Integer; Y: Integer; Color: TColor; FillStyle: TFillStyle); cdecl;
begin
AObj.FloodFill(X, Y, Color, FillStyle);
end;
function Canvas_HandleAllocated(AObj: TCanvas): LongBool; cdecl;
begin
Result := AObj.HandleAllocated;
end;
procedure Canvas_LineTo(AObj: TCanvas; X: Integer; Y: Integer); cdecl;
begin
AObj.LineTo(X, Y);
end;
procedure Canvas_MoveTo(AObj: TCanvas; X: Integer; Y: Integer); cdecl;
begin
AObj.MoveTo(X, Y);
end;
procedure Canvas_Pie(AObj: TCanvas; X1: Integer; Y1: Integer; X2: Integer; Y2: Integer; X3: Integer; Y3: Integer; X4: Integer; Y4: Integer); cdecl;
begin
AObj.Pie(X1, Y1, X2, Y2, X3, Y3, X4, Y4);
end;
procedure Canvas_Rectangle(AObj: TCanvas; X1: Integer; Y1: Integer; X2: Integer; Y2: Integer); cdecl;
begin
AObj.Rectangle(X1, Y1, X2, Y2);
end;
procedure Canvas_Refresh(AObj: TCanvas); cdecl;
begin
AObj.Refresh;
end;
procedure Canvas_RoundRect(AObj: TCanvas; X1: Integer; Y1: Integer; X2: Integer; Y2: Integer; X3: Integer; Y3: Integer); cdecl;
begin
AObj.RoundRect(X1, Y1, X2, Y2, X3, Y3);
end;
procedure Canvas_TextExtent(AObj: TCanvas; Text: PWideChar; var Result: TSize); cdecl;
begin
Result := AObj.TextExtent(Text);
end;
procedure Canvas_TextOut(AObj: TCanvas; X: Integer; Y: Integer; Text: PWideChar); cdecl;
begin
AObj.TextOut(X, Y, Text);
end;
procedure Canvas_Lock(AObj: TCanvas); cdecl;
begin
AObj.Lock;
end;
procedure Canvas_Assign(AObj: TCanvas; Source: TPersistent); cdecl;
begin
AObj.Assign(Source);
end;
function Canvas_GetNamePath(AObj: TCanvas): PWideChar; cdecl;
begin
Result := PWideChar(AObj.GetNamePath);
end;
function Canvas_ClassName(AObj: TCanvas): PWideChar; cdecl;
begin
Result := ShortstrToPWideChar(AObj.ClassName);
end;
function Canvas_Equals(AObj: TCanvas; Obj: TObject): LongBool; cdecl;
begin
Result := AObj.Equals(Obj);
end;
function Canvas_GetHashCode(AObj: TCanvas): Integer; cdecl;
begin
Result := AObj.GetHashCode;
end;
function Canvas_ToString(AObj: TCanvas): PWideChar; cdecl;
begin
Result := PWideChar(AObj.ToString);
end;
function Canvas_GetHandle(AObj: TCanvas): HDC; cdecl;
begin
Result := AObj.Handle;
end;
procedure Canvas_SetHandle(AObj: TCanvas; AValue: HDC); cdecl;
begin
AObj.Handle := AValue;
end;
function Canvas_GetBrush(AObj: TCanvas): TBrush; cdecl;
begin
Result := AObj.Brush;
end;
procedure Canvas_SetBrush(AObj: TCanvas; AValue: TBrush); cdecl;
begin
AObj.Brush := AValue;
end;
function Canvas_GetCopyMode(AObj: TCanvas): Integer; cdecl;
begin
Result := AObj.CopyMode;
end;
procedure Canvas_SetCopyMode(AObj: TCanvas; AValue: Integer); cdecl;
begin
AObj.CopyMode := AValue;
end;
function Canvas_GetFont(AObj: TCanvas): TFont; cdecl;
begin
Result := AObj.Font;
end;
procedure Canvas_SetFont(AObj: TCanvas; AValue: TFont); cdecl;
begin
AObj.Font := AValue;
end;
function Canvas_GetPen(AObj: TCanvas): TPen; cdecl;
begin
Result := AObj.Pen;
end;
procedure Canvas_SetPen(AObj: TCanvas; AValue: TPen); cdecl;
begin
AObj.Pen := AValue;
end;
procedure Canvas_SetOnChange(AObj: TCanvas; AEventId: NativeUInt); stdcall;
begin
if AEventId = 0 then
begin
AObj.OnChange := nil;
TEventClass.Remove(AObj, geChange);
Exit;
end;
AObj.OnChange := TEventClass.OnChange;
TEventClass.Add(AObj, geChange, AEventId);
end;
exports
Canvas_Create {$IFNDEF MSWINDOWS}name '_Canvas_Create'{$ENDIF},
Canvas_Free {$IFNDEF MSWINDOWS}name '_Canvas_Free'{$ENDIF},
Canvas_Arc {$IFNDEF MSWINDOWS}name '_Canvas_Arc'{$ENDIF},
Canvas_ArcTo {$IFNDEF MSWINDOWS}name '_Canvas_ArcTo'{$ENDIF},
Canvas_AngleArc {$IFNDEF MSWINDOWS}name '_Canvas_AngleArc'{$ENDIF},
Canvas_Chord {$IFNDEF MSWINDOWS}name '_Canvas_Chord'{$ENDIF},
Canvas_Ellipse {$IFNDEF MSWINDOWS}name '_Canvas_Ellipse'{$ENDIF},
Canvas_FloodFill {$IFNDEF MSWINDOWS}name '_Canvas_FloodFill'{$ENDIF},
Canvas_HandleAllocated {$IFNDEF MSWINDOWS}name '_Canvas_HandleAllocated'{$ENDIF},
Canvas_LineTo {$IFNDEF MSWINDOWS}name '_Canvas_LineTo'{$ENDIF},
Canvas_MoveTo {$IFNDEF MSWINDOWS}name '_Canvas_MoveTo'{$ENDIF},
Canvas_Pie {$IFNDEF MSWINDOWS}name '_Canvas_Pie'{$ENDIF},
Canvas_Rectangle {$IFNDEF MSWINDOWS}name '_Canvas_Rectangle'{$ENDIF},
Canvas_Refresh {$IFNDEF MSWINDOWS}name '_Canvas_Refresh'{$ENDIF},
Canvas_RoundRect {$IFNDEF MSWINDOWS}name '_Canvas_RoundRect'{$ENDIF},
Canvas_TextExtent {$IFNDEF MSWINDOWS}name '_Canvas_TextExtent'{$ENDIF},
Canvas_TextOut {$IFNDEF MSWINDOWS}name '_Canvas_TextOut'{$ENDIF},
Canvas_Lock {$IFNDEF MSWINDOWS}name '_Canvas_Lock'{$ENDIF},
Canvas_Assign {$IFNDEF MSWINDOWS}name '_Canvas_Assign'{$ENDIF},
Canvas_GetNamePath {$IFNDEF MSWINDOWS}name '_Canvas_GetNamePath'{$ENDIF},
Canvas_ClassName {$IFNDEF MSWINDOWS}name '_Canvas_ClassName'{$ENDIF},
Canvas_Equals {$IFNDEF MSWINDOWS}name '_Canvas_Equals'{$ENDIF},
Canvas_GetHashCode {$IFNDEF MSWINDOWS}name '_Canvas_GetHashCode'{$ENDIF},
Canvas_ToString {$IFNDEF MSWINDOWS}name '_Canvas_ToString'{$ENDIF},
Canvas_GetHandle {$IFNDEF MSWINDOWS}name '_Canvas_GetHandle'{$ENDIF},
Canvas_SetHandle {$IFNDEF MSWINDOWS}name '_Canvas_SetHandle'{$ENDIF},
Canvas_GetBrush {$IFNDEF MSWINDOWS}name '_Canvas_GetBrush'{$ENDIF},
Canvas_SetBrush {$IFNDEF MSWINDOWS}name '_Canvas_SetBrush'{$ENDIF},
Canvas_GetCopyMode {$IFNDEF MSWINDOWS}name '_Canvas_GetCopyMode'{$ENDIF},
Canvas_SetCopyMode {$IFNDEF MSWINDOWS}name '_Canvas_SetCopyMode'{$ENDIF},
Canvas_GetFont {$IFNDEF MSWINDOWS}name '_Canvas_GetFont'{$ENDIF},
Canvas_SetFont {$IFNDEF MSWINDOWS}name '_Canvas_SetFont'{$ENDIF},
Canvas_GetPen {$IFNDEF MSWINDOWS}name '_Canvas_GetPen'{$ENDIF},
Canvas_SetPen {$IFNDEF MSWINDOWS}name '_Canvas_SetPen'{$ENDIF},
Canvas_SetOnChange {$IFNDEF MSWINDOWS}name '_Canvas_SetOnChange'{$ENDIF};