unit UDessin; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, ExtCtrls, Math, UInit, UDessinComposant; procedure EffaceImage; procedure Affichage; procedure Decalage(x,y:integer); procedure DeplaceSelection(x,y:integer); implementation uses Unit1,UTest; // Efface l'image procedure EffaceImage; begin with Form1.Image.Canvas do begin Brush.Color:=ClrFd; //couleur de fond; FillRect(ClipRect); end; // with Form1.Image.Canvas end; procedure Affichage; var x,y,k,i : integer; xmin,ymin,xmax,ymax:integer; xx,yy:integer; begin // test('Affichage'); i:=round(10/zoom); Form1.Image.Canvas.Font.Size:=i; if i<1 then i:=1; if i>60 then i:=60; xmin:=0;xmax:=0; ymin:=0;ymax:=0; for i:=0 to Nb_Relais - 1 do begin if L_Relais[i].P.X>xmax then xmax:=L_Relais[i].P.X; if L_Relais[i].P.Xymax then ymax:=L_Relais[i].P.Y; if L_Relais[i].P.Yxmax then xmax:=L_Connect[i].P.X; if L_Connect[i].P.Xymax then ymax:=L_Connect[i].P.Y; if L_Connect[i].P.Yxmax then xmax:=L_Contact[i].P.X; if L_Contact[i].P.Xymax then ymax:=L_Contact[i].P.Y; if L_Contact[i].P.Yxmax then xmax:=L_Segment[i].P1.X; if L_Segment[i].P1.Xymax then ymax:=L_Segment[i].P1.Y; if L_Segment[i].P1.Yxmax then xmax:=L_Segment[i].P2.X; if L_Segment[i].P2.Xymax then ymax:=L_Segment[i].P2.Y; if L_Segment[i].P2.Yxmax then xmax:=L_Alim[i].P.X; if L_Alim[i].P.Xymax then ymax:=L_Alim[i].P.Y; if L_Alim[i].P.Yxmax then xmax:=L_Compo[i].P.X; if L_Compo[i].P.Xymax then ymax:=L_Compo[i].P.Y; if L_Compo[i].P.Yxmax then xmax:=L_Lampe[i].P.X; if L_Lampe[i].P.Xymax then ymax:=L_Lampe[i].P.Y; if L_Lampe[i].P.Y