-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpen.pas
46 lines (33 loc) · 893 Bytes
/
pen.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
unit pen;
{$mode ObjFPC}{$H+}
interface
uses
Classes, SysUtils, Forms, ExtCtrls, Controls, Graphics, hctypes, hcGlobals;//HC12 , GR32,GR32_Image;
procedure hc_pen(Sender: TImage; Shift: TShiftState;
PX, PY: integer // 1:Down,2:Move:3:Up);
);
implementation
procedure hc_pen(Sender: TImage; Shift: TShiftState;
PX, PY: integer // 1:Down,2:Move:3:Up);
);
begin
//DOWN
if (hMouseButton = hmbLeft) and (hMouseEvent = hMouseDown) then
begin
end
//MOVE
else if (hMouseButton = hmbLeft) and (hMouseEvent = hMouseMove) then
begin
Sender.Canvas.Line(oldx, oldy, px, py);
//Sender.bitmap.LineAS(oldx, oldy, px, py,foreColor);
oldx := px;
oldy := py;
end
//UP
else if (hMouseButton = hmbLeft) and (hMouseEvent = hMouseUp) then
begin
Sender.Canvas.Line(oldx, oldy, px, py);
// Sender.bitmap.LineA(oldX, oldy, px, py,foreColor);
end;
end;
end.