这是完整代码,现在能画出线,但是线是虚线!怎么样画成实线?unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, ADODB, Grids, DBGrids, StdCtrls, ExtCtrls, ExtDlgs, Buttons,jpeg, DBCtrls;type TForm1 = class(TForm) Panel1: TPanel; Splitter1: TSplitter; Panel2: TPanel; Panel3: TPanel; Splitter2: TSplitter; Image: TImage; DataSource1: TDataSource; DBGrid1: TDBGrid; qGraphData: TADODataSet; OpenPD: TOpenPictureDialog; DBNavigator1: TDBNavigator; Panel5: TPanel; GroupBox1: TGroupBox; ListBox1: TListBox; Panel4: TPanel; BitBtn1: TBitBtn; BitBtn2: TBitBtn; BitBtn3: TBitBtn; procedure BitBtn3Click(Sender: TObject); procedure qGraphDataAfterScroll(DataSet: TDataSet); procedure ImageMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure ImageMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure ImageMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); private { Private declarations } public { Public declarations } procedure DrawShape(TopLeft, BottomRight: TPoint; AMode: TPenMode); end;var Form1: TForm1; Drawing: Boolean; Origin, MovePt: TPoint; Bitmap: TBitmap;implementation{$R *.dfm}procedure TForm1.BitBtn3Click(Sender: TObject);var GraphName: String;begin if OpenPD.Execute then begin GraphName := ExtractFileName(OpenPD.FileName); qGraphData.AfterScroll := nil; qGraphData.Append; qGraphData.FieldByName('jpgName').asstring := GraphName; TBlobField(qGraphData.FieldByName('jpgValue')).loadfromfile(OpenPD.FileName); qGraphData.post; qGraphData.AfterScroll := qGraphDataAfterScroll; end;end;procedure TForm1.qGraphDataAfterScroll(DataSet: TDataSet);var MS: TMemoryStream; sjpg: TJpegImage;begin if qGraphData.Active and (not qGraphData.IsEmpty ) then begin MS := TMemoryStream.Create; sjpg := TJpegImage.Create; try TBlobField(qGraphData.FieldByName('jpgValue')).SaveToStream(MS); ms.position := 0; sjpg.LoadFromStream(ms); Image.Picture.Bitmap.Assign(sjpg); finally sjpg.Free; MS.Free; end; end; ListBox1.Items.Text := qGraphData.Fieldbyname('jpgInfo').AsString;end;procedure TForm1.ImageMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin Drawing := True; Origin := Point(X * image.Picture.Bitmap.Width div Image.Width, Y * image.Picture.Bitmap.Height div Image.Height); MovePt := Point(X * image.Picture.Bitmap.Width div Image.Width, Y * image.Picture.Bitmap.Height div Image.Height); Image.Canvas.MoveTo(X,Y); //Origin := Point(X,Y); //MovePt := Origin;end;procedure TForm1.ImageMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);begin if Drawing then begin DrawShape(Origin, MovePt, pmNotXor); MovePt := Point(X * image.Picture.Bitmap.Width div Image.Width, Y * image.Picture.Bitmap.Height div Image.Height); DrawShape(Origin, MovePt, pmNotXor); end;end;procedure TForm1.ImageMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);begin if Drawing then begin DrawShape(Origin, Point(X * image.Picture.Bitmap.Width div Image.Width, Y * image.Picture.Bitmap.Height div Image.Height), pmCopy); Drawing := False; end;end;procedure TForm1.DrawShape(TopLeft, BottomRight: TPoint; AMode: TPenMode);begin with Image.Canvas do begin Pen.Mode := AMode; Pen.Style:= psSolid; Image.Canvas.MoveTo(TopLeft.X, TopLeft.Y); Image.Canvas.LineTo(BottomRight.X, BottomRight.Y); end;end;end.