VS:Create2DObjShadow

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

.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