title: Drawing rectangle with canvas
body: <p>With this code I want to draw a rectangle:</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var rectangle:Trect;
  begin
    fx:=400;
    fy:=400;
    sc1:=base/fx;
    sc2:=altezza/fy;
    sc:=max(sc1, sc2);
    lx:=fx*sc;
    ly:=fy*sc;
    xc:=base/2;
    yc:=altezza/2;
    x1:=xc-(lx/2); x2:=xc+(lx/2); y1:=yc-(ly/2); y2:=yc+(ly/2);
    panel1.Repaint; 
    panel1.Canvas.Brush.color:= clblack;
    panel1.Canvas.line((panel1.width div 2),0,(panel1.Width div 2), panel1.Height);
    panel1.Canvas.line(0,(panel1.height div 2), panel1.Width,(panel1.Height div 2));
    panel1.canvas.brush.style:=bsclear;
    Rectangle:=rect(x1, y1, x2, y2);
  end;  
  </code></pre>
  
  <p>But there is a problem because I have to use only integer values.</p>
  
  <p>Is it possible to use real values for drawing a rectangle with <code>TCanvas</code>? </p>