also, whats the diff between fcWorld and fcScreen?
Thanks.
Code: Select all
Procedure DrawMap(X, Y: Integer);
Var
Figure: TMapFigure;
Begin
Figure.kind := fkText;
//fkLine, fkEllipse, fkRectangle,fkDirection,fkText
Figure.coord := fcWorld;
//fcWorld, fcScreen
Figure.x1 := X;
Figure.y1 := Y;
Figure.x2 := 0;
Figure.y2 := 0;
Figure.brushStyle := bsClear;
//bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross
Figure.brushColor := $000000;
Figure.color := $FFFF00;
Figure.text := '*';
AddFigure(Figure);
End;
Procedure DrawMapArea(X, Y: Integer);
Var
Figure: TMapFigure;
Begin
Figure.kind := fkRectangle;
//fkLine, fkEllipse, fkRectangle,fkDirection,fkText
Figure.coord := fcWorld;
//fcWorld, fcScreen
Figure.x1 := X-10;
Figure.y1 := Y-10;
DrawMap(Figure.x1, Figure.y1);
Figure.x2 := X+10;
Figure.y2 := Y+10;
DrawMap(Figure.x2, Figure.y2);
AddToSystemJournal('x1: ' + IntToStr(Figure.x1) + ' y1: ' + IntToStr(Figure.y1) + ' x2: ' + IntToStr(Figure.x2) + ' y2: ' + IntToStr(Figure.y2));
Figure.brushStyle := bsClear;
//bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross
Figure.brushColor := $000000;
Figure.color := $FFFF00;
Figure.text := '';
AddFigure(Figure);
End;
begin
DrawMapArea(GetX(self), GetY(self));
end.