Previous Document Next Document

Object Model Reference : Classes : E : EffectDropShadow : Properties : EffectDropShadow.OffsetY


EffectDropShadow.OffsetY

Property OffsetY As Double

Description

Member of EffectDropShadow

The OffsetY property returns or specifies the vertical offset of a flat drop shadow.

 
See also the EffectDropShadow.SetOffset method.
VBA example

The following VBA example moves all flat drop shadows — so that the offset distance is 0.5" — while preserving the original offset angle.

Sub Test()
 Const Radius As Double = 0.5
 Dim s As Shape, ds As EffectDropShadow
 Dim dx As Double, dy As Double, r As Double
 For Each s In ActivePage.Shapes
  If s.Type = cdrDropShadowGroupShape Then
   Set ds = s.Effect.DropShadow
   If ds.Type = cdrDropShadowFlat Then
    dx = ds.OffsetX
    dy = ds.OffsetY
    r = Sqr(dx * dx + dy * dy)
    If r = 0 Then
     dx = 1
     r = 1
    End If
    ds.OffsetX = dx * Radius / r
    ds.OffsetY = dy * Radius / r
   End If
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.