a:innerShdw (Inner Shadow)
Specifies an inner shadow effect that creates depth by shadowing the interior edges of a shape.
Parent elements
Description
a:innerShdw is the DrawingML inner shadow effect element that creates a shadow on the inside edges of a shape. It is defined in ECMA-376 Part 1 §20.1.8.8.
Inner shadow effects simulate depth and inset appearance by:
- Shadowing the interior edges of a shape
- Creating a recessed or embossed look
- Using offset, blur radius, and color to control appearance
- Enhancing visual hierarchy in diagrams
Inner shadows are useful for:
- Creating 3D-like inset effects
- Emphasizing shape boundaries
- Adding visual sophistication to designs
- Making shapes appear pressed or carved
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
blurRad |
integer | 0-2147483647 | Blur radius in EMUs. |
dist |
integer | 0-2147483647 | Shadow offset distance in EMUs. |
dir |
integer | 0-21600000 | Shadow direction in 60,000ths of degree. |
algn |
string | tl, t, tr, l, ctr, r, bl, b, br | Shadow alignment. |
rotWithShape |
boolean | true, false | Rotate shadow with shape. |
Examples
Simple Inner Shadow
<a:innerShdw blurRad="50800" dist="38100" dir="2700000">
<a:srgbClr val="000000">
<a:alpha val="60000"/>
</a:srgbClr>
</a:innerShdw>
using DocumentFormat.OpenXml.Drawing;
var innerShdw = new InnerShadow
{
BlurRadius = 50800, // ~0.055 inch blur
Distance = 38100, // ~0.042 inch offset
Direction = 2700000 // 270 degrees (left)
};
var srgbClr = new RgbColorModelHex { Val = "000000" };
var alpha = new Alpha { Val = 60000 }; // 60% opacity
srgbClr.Append(alpha);
innerShdw.Append(srgbClr);
Strong Inset Effect
<a:innerShdw blurRad="76200" dist="76200" dir="2700000" algn="l" rotWithShape="1">
<a:srgbClr val="404040">
<a:alpha val="70000"/>
</a:srgbClr>
</a:innerShdw>
var innerShdw = new InnerShadow
{
BlurRadius = 76200,
Distance = 76200,
Direction = 2700000,
Alignment = RectangleAlignmentValues.Left,
RotateWithShape = true
};
var srgbClr = new RgbColorModelHex { Val = "404040" };
var alpha = new Alpha { Val = 70000 };
srgbClr.Append(alpha);
innerShdw.Append(srgbClr);
Notes
- Shadow direction: 0°=right, 2700000=left (in 60,000ths of degree)
- Blur radius controls softness of shadow edge
- Distance controls offset from shape edge
- Inner shadows typically use dark colors with reduced opacity
- Rotate with shape option keeps effect oriented properly when shape rotates
- Inner shadows can be combined with outer shadows and other effects