Version: |
1.2.1 |
Description: |
Makes a copy of the specified entity using the entity's settings and the current properties for layer, color, line type, and line width, while allowing for scaling, translation, and rotation of the copied entity. |
Declaration: |
|
C/C++ |
extern "C" void WINAPI VCDuplicateWithTransform(short* iError, ENTITYHANDLE lH, Point2D* dpTrans, Point2D* dpScale, double dAngle); |
Delphi |
procedure VCDuplicateWithTransform(var iError: Smallint; lH: Longint; var dpTrans: Point2D; var dpScale: Point2D; dAngle: Double); stdcall; |
ActiveX/COM |
Sub DuplicateWithTransform(ByVal lH As Long, dpTrans As IVCPoint2D, dpScale As IVCPoint2D, ByVal dAngle As Double) |
Parameters: |
IH - the handle of the entity
to be duplicated. |
Notes: |
Normally when changing or editing entities in Visual CADD™ it would be necessary to first query for each of the coordinates of the entity and then reintroduce the entity into the database using the VCAdd...Entity functions after transforming those points. VCDuplicateWithTransform allows for scaling, translation, and rotation of the copied entity without the need for other mathematical routines. VCDuplicateWithTransform uses the entity's transformed settings, in contrast to VCDuplicate which uses current settings, except that VCDuplicateWithTransform uses the current properties for layer, color, line type, and line width. The reason for the exception is that settings can include length, position, and rotation settings which can be affected by the transformation, thus VCDuplicateWithTransform uses the entity's transformed settings. In comparison, VCDuplicate does this by copying the specified entity with all its data points while still adopting all the current applicable settings. VCDuplicateWithTransform performs the transformations in the following order:
If you require the transformations in a different order, then use VCDuplicateWithScale, VCDuplicateWithRotate, and VCDuplicateWithMove in the required order. |
See Also: |
VCDuplicate, VCDuplicateWithScale, VCDuplicateWithRotate, VCDuplicateWithSkew, VCDuplicateWithMove, VCDuplicateToWorld |