?? ch3_3commands.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 + -