unit GraphicControl1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, mGeoForm, StdCtrls;
type
toval =
class(tgeoform)
private
public
x1,x2,y1,y2:integer;
zeichenflaeche:tform;
constructor Create(AOwner:Tcomponent);
override;
procedure paint();
override;
procedure MyMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftstate;x,y : integer);
override;
procedure MyMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
override;
procedure MyMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer) ;
override;
end;
implementation
constructor toval.Create(AOwner:Tcomponent);
begin
inherited ;
x1:=50;
y1:=50;
x2:=150;
y2:=100;
//zeichenflaeche:=f;
{OnMouseDown := MyMouseDown;
OnMouseMove := MyMouseMove;
OnMouseUp := MyMouseup; }
end;
procedure toval.MyMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer) ;
begin
// end;
end;
procedure toval.MyMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
end;
procedure toval.MyMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer) ;
begin
Canvas.Ellipse(x1+40,y1+40,x2+40,y2+40);
end;
procedure toval.paint();
var vFuellfarbe,vRandfarbe : Tcolor;
begin
vFuellfarbe := self.Fuellfarbe;
vRandfarbe := self.Randfarbe;
Canvas.Brush.Color := vFuellfarbe;
Canvas.Pen.Color := vRandfarbe;
Canvas.Pen.Width := 3;
Canvas.Ellipse(x1,y1,x2,y2);
end;
end.