ta feuille aussi peut être considérée comme un Canvas !! ;) en faisant : #include <Printers.hpp> void ta_fonction_d_impression(void) { TPrinter *Prntr = Printer(); Prntr->Title = "Suivi des cartes - BL" ; Prntr->Orientation = poPortrait ; xmax = Prntr->PageWidth ; ymax = Prntr->PageHeight ; Prntr->BeginDoc() ; Prntr->Canvas->MoveTo(0,0) ; Prntr->Canvas->LineTo(xmax, ymax) ; // tu peux aussi changer la taille du crayon Prntr->Canvas->Pen->Width = 2 ; Prntr->Canvas->MoveTo(0,ymax) ; Prntr->Canvas->LineTo(xmax, 0) ; // ou encore imprimer du texte Prntr->Canvas->Font->Name = "Times New Roman" ; Prntr->Canvas->Font->Size = 10 ; Prntr->Canvas->TextOut(xmax/2, ymax/2, "Un petit texte vite fait") ; // changer de page Prntr->NewPage() ; // faire à nouveau un trait Prntr->Canvas->MoveTo(0,0) ; Prntr->Canvas->LineTo(xmax, ymax) ; // terminer l'impression Prntr->EndDoc() ; } à partir du moment où tu as un Canvas qui désigne ton document, tu peux utiliser toutes les fonctions (je crois) d'un Canvas. j'espère que ça pourra te servir... DvdMizo
|