VS:Create2DObjShadow: Difference between revisions
Jump to navigation
Jump to search
(Added Python Example) |
(Edit Python example) |
||
Line 48: | Line 48: | ||
h_shadow = vs.Create2DObjShadow(h, (x, y)) | h_shadow = vs.Create2DObjShadow(h, (x, y)) | ||
# The shadow is placed on the layer of h. | # The shadow is not placed on the layer of h. | ||
# This can be fixed with set parent. | # This can be fixed with set parent. | ||
vs.SetParent(h_shadow, h.parent) | vs.SetParent(h_shadow, h.parent) |
Latest revision as of 12:28, 23 October 2017
.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