Hide Comments
Hide Comments

Comments (0)

Extends the RSChartPanel.TRSChartGraphicArea class to add properties and methods for drawing a shadow for an element of the chart panel or a chart. The shadow class accepts a    Size and    Direction, which specify the Size in pixels and Direction of the shadow.

The following graphic shows the interrelationships of the elements of the TRSChartShadow class: ShadowRectExample

Namespace: RSChartPanel

expandingInheritance Hierarchy

TPersistent
  RSChartPanel.TRSChartGraphic
    RSChartPanel.TRSChartGraphicArea
      RSChartPanel.TRSChartShadow
 

expandingSyntax

Delphi

type
  TRSChartShadow = class(TRSChartGraphicArea)
  end; 
 

expandingConstructors

 

Name

Description

public constructor

Create

Initializes a new instance of the TRSChartGraphic class. (Inherited from RSChartPanel.TRSChartGraphic.)

Top

expandingProperties

 

Name

Description

published property

Brush

Represents property Brush.

published property

Direction

Specifies the direction the shadow is drawn in. For example, if the Direction is sdBottomRight, the shadow will be drawn below and to the right as if the light source was above and to the left of the object.

public property

OnChange

Occurs immediately after the chart graphic object changes. Write an OnChange event handler to take specific action when the chart graphic changes. The properties of the chart graphic reflect the new settings when OnChange occurs.

alert_cautionWarning

For chart graphics that a chart or chart panel creates, you shouldn't assign a handler to this event. The chart or chart panel has already assigned an event handler.

published property

Opacity

Represents property Opacity.

public property

Pen

Specifies the kind of pen the chart graphic area uses for drawing lines and outlining shapes. Set Pen to specify the pen to use for drawing lines and outlining shapes in the image.
 (Inherited from RSChartPanel.TRSChartGraphicArea.)

published property

Size

Specifies the size in pixels of the shadow. When the   Direction is sdBottomRight, the shadow will be drawn Size pixels below and Size pixels to the right.

protected property

Style

Represents property Style.

published property

Visible

Represents property Visible.

Top

expandingMethods

 

Name

Description

public method

Assign(TPersistent)

Copies the contents of another similar object to the current object

alert_noteNotes to Inheritors

Most objects override Assign to handle the assignment of properties from similar objects. When overriding Assign, call the inherited method if the destination object cannot handle the assignment of properties from the class of the Source parameter

protected method

Changed

Overloaded. Represents method Changed. (Inherited from RSChartPanel.TRSChartGraphic.)

public method

Clone

Creates a "deep" copy of the chart graphic. It constructs a new chart graphic of the correct type and then calls the   Assign method to copy its properties to the new copy. (Inherited from RSChartPanel.TRSChartGraphic.)

public method

Draw(TCanvas,TCanvasRect)

Overloaded. Paints the chart graphic to the specified Canvas in the specified location. It uses the current canvas' brush and pen. Use the Draw method to paint the chart graphic to any canvas and anywhere and with any size on the canvas.

alert_noteNotes to Inheritors

Descendant classes of TRSChartGraphic override the InternalDraw method to actually paint themselves.

public method

Draw(TCanvas,TCanvasRect,TRSChartAxis,TRSChartAxis)

Overloaded.  Paints the chart graphic to the specified Canvas in the specified location. It uses the current canvas' brush and pen. Use the Draw method to paint the chart graphic to any canvas and anywhere and with any size on the canvas.

The VertAxis and HorizAxis parameters can be used to provide point to pixel conversions (see RSChartPanel.TRSChartAxis ).

alert_noteNotes to Inheritors

Descendant classes of TRSChartGraphic override the InternalDraw method to actually paint themselves.

public method

Draw(TCanvas,TCanvasRect,TRSShapeStyle,Single)

Overloaded.  Paints the shadow on the canvas in the specified rectangle. It first calls  ShadowRect to figure out the rectangle that contains the shadow. Then, using the     Brush and Pen properties, it paints the shadow. The AStyle parameter defines the shape of the shadow.

The following graphic shows the interrelationships of the elements of the TRSChartShadow class: ShadowRectExample

protected method

Drawing(TCanvas,TCanvasRect)

Represents method Drawing(TCanvas,TCanvasRect). (Overrides RSChartPanel.TRSChartGraphic.Drawing(TCanvas,TCanvasRect).)

protected method

Drawn(TCanvas,TCanvasRect)

Represents method Drawn(TCanvas,TCanvasRect). (Inherited from RSChartPanel.TRSChartGraphic.)

protected method

Initialize

Represents method Initialize. (Overrides RSChartPanel.TRSChartGraphicArea.Initialize.)

protected method

InitializeEvents

Represents method InitializeEvents. (Overrides RSChartPanel.TRSChartGraphic.InitializeEvents.)

protected method

InternalDraw(TCanvas,TCanvasRect)

Overloaded. Represents method InternalDraw(TCanvas,TCanvasRect). (Overrides RSChartPanel.TRSChartGraphicArea.InternalDraw(TCanvas,TCanvasRect).)

public method

NonShadowRect(TCanvasRect,Boolean,TCanvas)

Returns the rectangle of the object which is casting the shadow, given the ARect parameter. The method uses the     Size and     Direction to calculate a smaller rectangle within the ARect rectangle, which is in the opposite direction of the  ShadowRect.

The following graphic shows the interrelationships of the elements of the TRSChartShadow class: ShadowRectExample

protected method

SenderChanged(TObject)

Overloaded. Represents method SenderChanged(TObject). (Inherited from RSChartPanel.TRSChartGraphic.)

public method

ShadowRect(TCanvasRect,Boolean,TCanvas)

Returns the rectangle of the shadow given the ARect parameter. The method uses the Size and Direction to calculate a shadow under the aRect. If the Constrained parameter is true, the shadow will be a subrectangle of the input rectangle.

The following graphic shows the interrelationships of the elements of the TRSChartShadow class: ShadowRectExample

public method

TiledDraw(TCanvas,TCanvasRect,TTileGraphic,TCanvasPixel,TCanvasPixel)

Overloaded.  Tiles the image across the entire input rectangle.

The Image is drawn at full size from the top left of the ARect across and down until outside of the input rectangle. Use the overloaded TiledDraw methods to constrain the size of the Image.

public method

TiledDraw(TCanvas,TCanvasRect,TTileGraphic,TCanvasPixel,TCanvasPixel,TCanvasPixel,TCanvasPixel)

Overloaded.  Tiles the image across the entire input rectangle.

The Image is drawn at ImageWidth, ImageHeight size from the top left of the ARect across and down until outside of the input rectangle.

public method

TiledDraw(TCanvas,TCanvasRect,TTileGraphic,TCanvasRect)

Overloaded.  Tiles the image across the entire input rectangle.

The Image is drawn at ImageRect size from the top left of the ARect across and down until outside of the input rectangle.

protected method

VisibleChanged

Represents method VisibleChanged. (Overrides RSChartPanel.TRSChartGraphic.VisibleChanged.)

Top

expandingEvents

 

Name

Description

public event

OnDraw

Occurs just after the chart graphic is painted. Write an OnDraw event handler to take specific action when the chart graphic has finished painting. The OnDraw event also allows you to do custom painting after the chart graphic has painted. (Inherited from RSChartPanel.TRSChartGraphic.)

public event

OnDrawing

Occurs just before the chart graphic is painted. Write an OnDrawing event handler to take specific action when the chart graphic is about to paint. If the event handler sets the DoDraw parameter to False, the chart graphic will not be painted. The OnDraw event also allows you to do custom painting before the chart graphic has been painted. (Inherited from RSChartPanel.TRSChartGraphic.)

Top

expandingRemarks

When the  Draw method is called, it calculates the rectangle for the shadow (ShadowRect) and the object that is casting the shadow (NonShadowRect). Finally, the shadow is drawn using the  Brush and Pen in the ShadowRect.
 

expandingSee Also

Comments (0)

RiverSoftAVG Charting Component Suite (RCCS) © 2005-2015, Thomas G. Grubb