Shadow: PP.Ui.DropShadow;
The Shadow property determines element shadow.
To execute the example, the page must contain a Speedometer component named speed1, that has one arrow and a scale (see Example of Creating Hand Watch). Add to the page a button, clicking which sets an offset for the basic element's shadow:
<input TYPE="button" VALUE="Shadow" ONCLICK="shadow()">
<script type="text/javascript">
function shadow() {
var shad = new PP.Ui.Shadow({
// Select style and opacity of shadow fill
Background: {
PPType: PP.SolidColorBrush,
Opacity: .5
},
Offset: '3,3' //shadow offset
});
speed1.getScales(0).getArrows(0).setShadow(shad);
shad.setAttr({
'fill': 'green', //shadow fill color
'stroke': 'brown', //shadow border color
'stroke-width': 1 //border width
});
speed1.redraw(speed1, this);
}
</script>
Clicking the Shadow button shows the arrow's shadow:

See also: