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....



OnMeterRendered


Unit:SDL_meter
Class: TMeter
Declaration: property OnMeterRendered: TMeterRenderedEvent;
{ TMeterRenderedEvent = procedure (Sender: TObject; Canvas: TCanvas) of object; }

The event OnMeterRendered provides a hook for adding user defined graphics to the meter. The event is triggered after the component has been rendered internally and immediately before the outer frame of the component is going to be drawn.

The parameter Canvas provides access to the canvas of the data area. Please note that the state of the canvas (e.g. the color of its pen, or the fill mode of the brush) depends on the graphics elements drawn before.

Hint: In order to avoid unwanted size effects regarding characters displayed on canvases of different resolution (i.e. the screen and a printer) you should never directly assign the font size within the event. Use SetCanvasFontSizeScaled instead. So, for example, the statement Canvas.Font.Size := 12; should be replaced by SetCanvasFontSizeScaled (Canvas, 12);



Last Update: 2023-Dec-14