ChartDirector 5.1 (.NET Edition)

Chart.cylinderEffect


Usage

[VB] Public Shared Function cylinderEffect([ orientation As Integer [, ambientIntensity As Double, diffuseIntensity As Double, specularIntensity As Double, shininess As Integer ]]) As Integer
[C#] public static int cylinderEffect([ int orientation [, double ambientIntensity, double diffuseIntensity, double specularIntensity, int shininess ]]);

Description

A special shading effect that emulates the lighting of a cylinder surface.

This effect adjusts the brightness of the color of a rectangular box to make it look like cylindrical. The brightness is adjusted as according to the Phong lighting model, in which the light source is from the viewer direction and is far away.

The cylinderEffect 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).

This effect is automatically used for cylindrical bars in a BarLayer. You may use this method to adjust the lighting parameters by using its return value as the second argument to Layer.setBorderColor.

Arguments

ArgumentDefaultDescription
orientationCenterThe orientation of the cylinder.

A value of Top or Bottom means the cylinder is vertical. A value of Left or Right means the cylinder is horizontal.

A value of Center means the orientation is automatically determined. For a BarLayer, the orientation will be the same as the orientation of the bars. For other objects (eg. TextBox objects), if the object height is bigger than its width, the cylinder will be treated as vertical, otherwise it will be treated as horizontal.
ambientIntensity0.5The ambient reflection coefficient of the Phong lighting model.
diffuseIntensity0.5The diffuse reflection coefficient of the Phong lighting model.
specularIntensity0.75The specular reflection coefficient of the Phong lighting model.
shininess8The shininess coefficient of the Phong lighting model.

Return Value

An integer representing the cylinder effect.