VS:Stipple: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<desc>
<desc>
Creates a group of stipple shapes and returns the handle to the group.
Greates a group of 'stipple-shapes', objects that fill a 'profile object'</desc>
 
The illustrations below show the same set of stipple shapes drawn with clipToProfile set to 0, 1, and 2 from left to right:
 
[[Image:VSStippleClipOptions.jpg]]
 
The shapeType parameter is a code of which shape to be used:
*2 - line
*3 - rect
*4 - oval
*5 - poly
 
In the case of a poly, you merge the shapeType with the number of edges of the polygons you want to be created by the following formula:
 
shapeType = numEdges * 10 + 5
 
so when you specify for example 125 as ShapeType that means 5- polygon with 12 edges.
</desc>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<def>
<def>
<funcDef lang="vs">
<funcDef lang="vs">
FUNCTION Stipple(hProfileObject :HANDLE; shapeType :INTEGER; density :INTEGER; clipToProfile :INTEGER; minSize :REAL; maxSize :REAL; minAspectRatio :REAL; maxAspectRatio :REAL; randomRotate :BOOLEAN) :HANDLE;
FUNCTION Stipple(hProfileObject:HANDLE; shapeType:INTEGER; density:INTEGER; clipToProfile:INTEGER; minSize:REAL; maxSize:REAL; minAspectRatio:REAL; maxAspectRatio:REAL; randomRotate:BOOLEAN) : HANDLE;
</funcDef>
</funcDef>
<funcDef lang="py">
<funcDef lang="py">
Line 85: Line 68:
</lineList>
</lineList>
</params>
</params>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<return>
<remark></remark>
</return>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>
<sample></sample>
 
</remark>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<sample>
<seeAlso></seeAlso>
<code lang="pas">
PROCEDURE Example;
VAR
  hProfileObject :HANDLE;
  shapeType      :INTEGER;
  density        :INTEGER;
  clipToProfile  :INTEGER;
  minSize        :REAL;
  maxSize        :REAL;
  minAspectRatio :REAL;
  maxAspectRatio :REAL;
  randomRotate  :BOOLEAN;
  h              :HANDLE;
BEGIN
  CallTool(-204);
  hProfileObject := FSActLayer;
  shapeType      := 5;
  density        := 50;
  clipToProfile  := 2;
  minSize        := 1;
  maxSize        := 5;
  minAspectRatio := 1;
  maxAspectRatio := 2;
  randomRotate  := true;
  h := Stipple(hProfileObject, shapeType, density, clipToProfile, minSize, maxSize, minAspectRatio, maxAspectRatio, randomRotate);
END;
Run(Example);</code>
 
</sample>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<version>
<version>
Availability: from All Versions
Availability: from Vectorworks 2014


This is drop-in function.
</version>
</version>
-----------------------------------------------------------------------------------------------------------
<seeAlso>
</seeAlso>


</vwDoc>
</vwDoc>


[[Category:VS Function Reference|Stipple]]
[[Category:VS Function Reference|Stipple]]
[[Category:VS Function Reference:Hatches / Vector Fills|Stipple]]
[[Category:VS Function Reference:Graphic Calculation|Stipple]]

Latest revision as of 17:35, 18 September 2013

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

Description

Greates a group of 'stipple-shapes', objects that fill a 'profile object'

FUNCTION Stipple(
hProfileObject :HANDLE;
shapeType :INTEGER;
density :INTEGER;
clipToProfile :INTEGER;
minSize :REAL;
maxSize :REAL;
minAspectRatio :REAL;
maxAspectRatio :REAL;
randomRotate :BOOLEAN) : HANDLE;
def vs.Stipple(hProfileObject, shapeType, density, clipToProfile, minSize, maxSize, minAspectRatio, maxAspectRatio, randomRotate):
    return HANDLE

Parameters

hProfileObject HANDLE
shapeType INTEGER
density INTEGER
clipToProfile INTEGER
minSize REAL
maxSize REAL
minAspectRatio REAL
maxAspectRatio REAL
randomRotate BOOLEAN

Version

Availability: from Vectorworks 2014