PrintPreview

<< Click to Display Table of Contents >>

Navigation:  TMyCAD > Methods >

PrintPreview

procedure PrintPreview(ALayers: array OF Integer; ABitmap:TBitmap; ScaleforPreview:double = 1.0);

 

Description:

 

 Preview the drawing on the Bitmap.

 

Parameter

  ALayer: if you want print all layer, please use [], else [1,2,3], or you create array and set layerId that you want print

  ABitmap: that you draw on.

   ScaleforPreview:the scale.

 

Example:

 

Delphi:

//print preview all shapes in 100% scale.

MyCAD1.PrintPeview ([],Image1.Picture.Bitmap,1.0);

 

int p[1];

p[0]=0;

 MyCAD1->PrintPreview(p,1,Form1->Image1->Picture->Bitmap,1);

 Form1->Show();

}

//---------------------------------------------------------------------------

 

C++ Builder:

//print preview all shapes in 100% scale.

void __fastcall TMainFrm::BitBtn1Click(TObject *Sender)

{

int p[1];

p[0]=NULL;

MyCAD1->PrintPreview(p,0,Image1->Picture->Bitmap,1.0);

}

//print preview the shapes in 0,1 layers in 100% scale.

void __fastcall TMainFrm::BitBtn1Click(TObject *Sender)

{

int p[2];

p[0]=0; //First Layer Id

p[1]=1; //Second Layer Id

MyCAD1->Print(p,2,Image1->Picture->Bitmap,1.0);

}

 

 

See also:

 

Print