VS:Create2DObjShadow

From Vectorworks Developer
Revision as of 12:28, 23 October 2017 by Patrick (talk | contribs) (Edit Python example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Create a shadow representation of the given 2D object at the specified offset vector.

FUNCTION Create2DObjShadow(
h :HANDLE;
offsetVec :REAL) : HANDLE;
def vs.Create2DObjShadow(h, offsetVec):
    return HANDLE

Parameters

h HANDLE Handle to a 2D object.
offsetVec REAL Shadow direction and length.

Example

Python

h = vs.FSActLayer()

x = 1
y = 0.5

h_shadow = vs.Create2DObjShadow(h, (x, y))    

# The shadow is not placed on the layer of h.
# This can be fixed with set parent.
vs.SetParent(h_shadow, h.parent)

vs.SetFillBack(h_shadow, (0,0,65000))
vs.SetOpacity(h_shadow, 30)

Version

Availability: from Vectorworks 2014