The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: none
Declaration: procedure DrawRectangle (const cv: TCanvas; Left, Top, Right, Bottom: integer);

The procedure DrawRectangle is yet another way to draw a rectangular line using the pen of the canvas. The parameter cv addresses the canvas to draw on, the parameters Left...Bottom are the pixel coordinates of the four lines of the rectangle.

Hint: Please note the difference between DrawRectangle and the Delphi/C++Builder built-in procedure FrameRect. Both routines draw a rectangular line; however, DrawRectangle is much more flexible since the current line width of the pen affects the drawing. Further, DrawRectangle uses the pen color (and not the brush color).

Last Update: 2013-May-14