高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】[注意][求助]想修改块的特性中的x,y比例,但是不能实现????附代码
[注意][求助]想修改块的特性中的x,y比例,但是不能实现????附代码
[注意][求助]想修改块的特性中的x,y比例,但是不能实现????附代码
我想修改块的特性中的x,y比例,代码如下
#include "stdafx.h"
#include "stdarx.h"
// this is command 'setscale'
void zysetscale()
{
// todo: implement the command
int rc;
ads_real sf;
ads_name sname;
ads_matrix matrix;
acedprompt("\nselect enties to scale (transfrom)");
rc=acedssget(null,null,null,null,sname);
ident_init(matrix);//调用函数初始化矩阵
for(int i=0;i<3;i++)
{
matrix[i][i]=sf;
}
acedinitget(rsg_nonull+rsg_noneg+rsg_nozero,null);
acedgetreal("\ntransformation scale factor: ",&sf);
rc=acedxformss(sname,matrix);
acedssfree(sname);
}
void zysetscale()
{
// todo: implement the command
int rc;
ads_real sf;
ads_name sname;
ads_matrix matrix;
acedprompt("\nselect enties to scale (transfrom)");
rc=acedssget(null,null,null,null,sname);
ident_init(matrix);//调用函数初始化矩阵
acedinitget(rsg_nonull+rsg_noneg+rsg_nozero,null);
acedgetreal("\ntransformation scale factor: ",&sf);
for(int i=0;i<3;i++)
{
matrix[i][i]=sf;
}
rc=acedxformss(sname,matrix);
acedssfree(sname);
}
|