ChartDirector 7.0 (Python Edition)

pychartdir.softLighting


Usage

softLighting([ direction [, raisedEffect ]])

Description

A special shading effect that looks like gradient coloring.

This effect is best explained by viewing the examples.

ExampleDescription
Soft Multi-Bar ChartThe bars are shaded using soft lighting effect, with light direction from Top, and raised effect of 4 pixels.
Soft Bar ShadingThe bars are shaded using soft lighting effect, with light direction from Left, and raised effect of 4 pixels.
Spline Line ChartThe title is shaded using soft lighting effect, with light direction from Right, and raised effect of 4 pixels.

The softLighting method returns an integer representing this effect. The integer can be used as the third argument to Box.setBackground to apply the effect to Box objects (including derived objects such as TextBox objects). It may also be used as the second argument to Layer.setBorderColor for BarLayer or BoxWhiskerLayer objects to apply the effect to bars or boxes.

Arguments

ArgumentDefaultDescription
directionTopThe direction of the lighting, which must be one of the predefined constants Top, Bottom, Right or Left.
raisedEffect4With soft lighting effect, the object will appear to have some 3D depth. The raisedEffect argument controls the amount of 3D depth in pixels.

Return Value

An integer representing the soft lighting effect.