⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch3_3commands.cpp

📁 ARX二次开发
💻 CPP
字号:
/////////////////////////////////////////////
// ObjectARX defined commands

#include "StdAfx.h"
#include "StdArx.h"


// This is command 'TSS'
void tss()
{
	int i	;			// Row of ads_matrix
	ads_matrix xform;	// The transformation matrix
	ads_name ssGrp;		// The entities that make up transform SS
	int rc;				// Return code
	ads_real sf;		// Scale Factor


	// Select the entities
	acedPrompt("\nSelect enties to scale (transfrom) ");
	rc = acedSSGet(NULL, NULL, NULL, NULL, ssGrp);
	if(rc != RTNORM)
	{
		acutPrintf("\nEmpty or invalid selection set ");
		return;
	}

	// Input the scale factor
	acedInitGet(RSG_NONULL + RSG_NONEG + RSG_NOZERO, NULL);
	acedGetReal("\nTransformation Scale factor: ", &sf);

	// Initialize the matrix
	ident_init(xform);

	// Apply the scaling factor
	// to the matrix
	for(i = 0; i <= 3; i++)
	{
		xform[i][i] = sf;
	}
	
	rc = acedXformSS(ssGrp, xform);
	if(rc != RTNORM)
	{
		acutPrintf("\nFailed in transformation of selection set. ");
	}

	acedSSFree(ssGrp);	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -