VS:HScale2D: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<desc>
<desc>
Scales the object about the center specified.
Scales a 2D object.</desc>
</desc>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<def>
<def>
<funcDef lang="vs">
<funcDef lang="vs">
PROCEDURE HScale2D(h :HANDLE; centerX :REAL; centerY :REAL; scaleX :REAL; scaleY :REAL; scaleText :BOOLEAN);
PROCEDURE HScale2D(h:HANDLE; centerX:REAL; centerY:REAL; scaleX:REAL; scaleY:REAL; scaleText:BOOLEAN);
</funcDef>
</funcDef>
<funcDef lang="py">
<funcDef lang="py">
Line 54: Line 53:
</lineList>
</lineList>
</params>
</params>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<return>
<remark>
</return>
If (scaleX = -1) or (scaleY = -1) the object will be mirrored.


-----------------------------------------------------------------------------------------------------------
If used on an extrude, the 2D shape inside the extrude will be scaled. The scaling will follow the 2D shape's working plane.
<remark>


[Ptr 07/17/2019]
</remark>
</remark>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<sample>
<sample></sample>
<code lang="pas">
PROCEDURE ScaleEachObject;
VAR
  x, y, scaleX, scaleY :REAL;


PROCEDURE ScaleTheObject(h :HANDLE);
-----------------------------------------------------------------------------------------------------------
BEGIN
<seeAlso></seeAlso>
  HCenter(h, x, y);
  HScale2D(h, x, y, scaleX, scaleY, TRUE);
END;
 
BEGIN
  scaleX := RealDialog('Enter the X scale factor: ', '2');
  scaleY := RealDialog('Enter the Y scale factor: ', '2');
  ForEachObject(ScaleTheObject, (SEL));
END;
RUN(ScaleEachObject);</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|HScale2D]]
[[Category:VS Function Reference|HScale2D]]
[[Category:VS Function Reference:General Edit|HScale2D]]
[[Category:VS Function Reference:Object Editing|HScale2D]]

Latest revision as of 07:17, 17 July 2019

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

Description

Scales a 2D object.

PROCEDURE HScale2D(
h :HANDLE;
centerX :REAL;
centerY :REAL;
scaleX :REAL;
scaleY :REAL;
scaleText :BOOLEAN);
def vs.HScale2D(h, centerX, centerY, scaleX, scaleY, scaleText):
    return None

Parameters

h HANDLE
centerX REAL
centerY REAL
scaleX REAL
scaleY REAL
scaleText BOOLEAN

Remarks

If (scaleX = -1) or (scaleY = -1) the object will be mirrored.

If used on an extrude, the 2D shape inside the extrude will be scaled. The scaling will follow the 2D shape's working plane.

[Ptr 07/17/2019]

Version

Availability: from Vectorworks 2014