|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....|
|Home ChartPack Plot3D Events OnBeforeRenderPolygon|
|See also: TBeforeRenderPolygonEvent, ColorCodeAvg, SetCanvasFontSizeScaled|
The events OnDataRendered and OnBeforeRenderPolygon provide a hook for adding user defined graphics to a Plot3D. While the event OndataRendered can be used to draw special graphics or text on top of the 3D surface, the event OnBeforeRenderPolygon is triggered immediately before a quadrilateral of the surface is going to be rendered.
The parameter Canvas provides access to the canvas of the surface plot. The variable parameter Handled determines whether the component actually draws the quadrilateral after returning from OnBeforeRenderPolygon. If the parameter Handled is TRUE the component assumes that the drawing has already been done in the event handler, if Handled is set to FALSE the component draws the quadrilateral using the color specified in the parameter color. Handled is, by default, FALSE. The parameters CellX and CellY specify the indices of the matrix cell to be represented by the quadrilateral. The parameter quad specifies the position of the quadrilateral (four corners in pixel coordinates).
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.