?? icadentpropmain.cpp
字號:
}
else if(strsame(pTmpRb->resval.rstring,"MTEXT"/*DNT*/)) {
EntType=DB_MTEXT;
csTmp.Empty();
for(pRb=pTmpRb;pRb!=NULL;pRb=pRb->rbnext){
if(pRb->restype==3){
if(pRb->resval.rstring){
csTmp+=pRb->resval.rstring;
free(pRb->resval.rstring);
pRb->resval.rstring=NULL;
}
}
}
if(!csTmp.IsEmpty()){
for(pRb=pTmpRb;(pRb!=NULL&&pRb->restype!=1);pRb=pRb->rbnext);
if(pRb!=NULL) {
csTmp+=pRb->resval.rstring;
pRb->resval.rstring=(char *)realloc((char *)pRb->resval.rstring,csTmp.GetLength()+1);
strcpy(pRb->resval.rstring,csTmp);
}
}
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"POLYLINE"/*DNT*/)) {
EntType=DB_POLYLINE;
pTmpRb=pTmpRb->rbnext;
//check for mesh
for(pRb=pTmpRb;(pRb!=NULL&&pRb->restype!=70);pRb=pRb->rbnext);
if(pRb->resval.rint & (IC_PLINE_POLYFACEMESH | IC_PLINE_3DMESH)) bPlineIsMesh=true;
if(pRb->resval.rint & (IC_PLINE_POLYFACEMESH | IC_PLINE_3DMESH | IC_PLINE_3DPLINE)) bPlineIs3D=true;
if(num_of_plines==false) {
num_of_plines=true;
pVert=pCur->next; // first vertex entity
}else{
pVert=NULL;
}
if(num_of_plines==true){
if(NULL!=pCur->grpptr)
entprop_plextru=&pCur->grpptr->resval.rpoint[0];
else
entprop_plextru=NULL;
}
}
else if(strsame(pTmpRb->resval.rstring,"LWPOLYLINE"/*DNT*/)) {
EntType=DB_LWPOLYLINE;
pTmpRb=pTmpRb->rbnext;
if(num_of_plines==false) {
num_of_plines=true;
pVert=pCur; // LWPOLY entity
}else{
pVert=NULL;
}
if(num_of_plines==true){
if(NULL!=pCur->grpptr)
entprop_plextru=&pCur->grpptr->resval.rpoint[0];
else
entprop_plextru=NULL;
}
}
else if(strsame(pTmpRb->resval.rstring,"VERTEX"/*DNT*/)) {
EntType=DB_VERTEX;
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"POINT"/*DNT*/)) {
EntType=DB_POINT;
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"RAY"/*DNT*/)) {
EntType=DB_RAY;
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"SEQEND"/*DNT*/)) {
EntType=DB_SEQEND;
pTmpRb=pTmpRb->rbnext;
}
// EBATECH(CNBR) -[ 2002/4/24 Add SHAPE
else if(strsame(pTmpRb->resval.rstring,"SHAPE"/*DNT*/)) {
EntType=DB_SHAPE;
pTmpRb=pTmpRb->rbnext;
}// EBATECH(CNBR) ]-
else if(strsame(pTmpRb->resval.rstring,"SOLID"/*DNT*/)) {
EntType=DB_SOLID;
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"SPLINE"/*DNT*/)) {
EntType=DB_SPLINE;
pTmpRb=pTmpRb->rbnext;
num_of_splines++;
}
else if(strsame(pTmpRb->resval.rstring,"TEXT"/*DNT*/)) {
EntType=DB_TEXT;
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"TOLERANCE"/*DNT*/)) {
EntType=DB_TOLERANCE;
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"TRACE"/*DNT*/)) {
EntType=DB_TRACE;
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"VIEWPORT"/*DNT*/)) {
EntType=DB_VIEWPORT;
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"XLINE"/*DNT*/)) {
EntType=DB_XLINE;
pTmpRb=pTmpRb->rbnext;
}
else if(strsame(pTmpRb->resval.rstring,"HATCH"/*DNT*/)) {
EntType=DB_HATCH;
pTmpRb=pTmpRb->rbnext;
}
//Modified Cybage MM 24-09-2001 DD-MM-YYYY [
//Reason : Bug No.- 77847 from Bugzilla
else if(strsame(pTmpRb->resval.rstring,"IMAGE"/*DNT*/)) {
EntType=DB_IMAGE;
pTmpRb=pTmpRb->rbnext;
}
else if (strsame(pTmpRb->resval.rstring,"3DSOLID"))
{
EntType = DB_3DSOLID;
pTmpRb = pTmpRb->rbnext;
}
else if (strsame(pTmpRb->resval.rstring,"REGION"))
{
EntType = DB_REGION;
pTmpRb = pTmpRb->rbnext;
}
else if (strsame(pTmpRb->resval.rstring,"BODY"))
{
EntType = DB_BODY;
pTmpRb = pTmpRb->rbnext;
}
else break; //get the next entity and ignore this one
//Go to the proper index of the struct
for(start=0;(ent_DlgItems[start].EntTyp!=EntType);start++); //Find the start of the section
for(end=start;(ent_DlgItems[end+1].EntTyp==EntType);end++); //Find the end of the section
}
for(index=start;index<=end;index++) { //Loop through the proper section only
if(pTmpRb->restype==ent_DlgItems[index].DXFCode) { //If the DXF codes match
if(ent_DlgItems[index].pRbll==NULL) {
ent_DlgItems[index].pCurll=ent_DlgItems[index].pRbll=new (struct ent_EntCodes); //Make 1 new resbuf link
}else{
ent_DlgItems[index].pCurll=ent_DlgItems[index].pCurll->next=new (struct ent_EntCodes); //Add 1 new resbuf link
}
ent_DlgItems[index].pCurll->prbb=pTmpRb; //Point the entity link to this new link
ent_DlgItems[index].pCurll->next=NULL; //Set next to NULL
switch(ent_DlgItems[index].ResType) { //Match the type of value
//Bugzilla No. 7219 ; 07-10-2002 [
case DIME_TYPE:
if(!ent_DlgItems[index].DoOnce){
ent_DlgItems[index].CheckBit=pTmpRb->resval.rint; //Store org value
ent_DlgItems[index].DoOnce=1; //only do this once
}
break;
case DIM_MEASURE:
if(!ent_DlgItems[index].DoOnce){
ent_DlgItems[index].OrgValue=pTmpRb->resval.rreal; //Store org value
int dimtype = ent_DlgItems[index - 1].CheckBit; //Get the type of dimension
dimtype &= ~DIM_TEXT_MOVED;
dimtype &= ~DIM_BIT_6;
if(dimtype == DIM_ANGULAR || dimtype == DIM_ANGULAR_3P)
sds_angtos_end(pTmpRb->resval.rreal,-1,-1,fs1);
else
sds_rtos(pTmpRb->resval.rreal,-1,-1,fs1); //Convert real to string
ent_DlgItems[index].DspValue=(char *)malloc(strlen(fs1)+1); //alloc memory
strcpy(ent_DlgItems[index].DspValue,fs1); //copy to struct
ent_DlgItems[index].DoOnce=1; //only do this once
}
else if(!cmd_real_equal(pTmpRb->resval.rreal,ent_DlgItems[index].OrgValue)){ //if a different value
if(!strisame(ResourceString(IDC_ICADENTPROP_VARIES_18, "Varies" ),ent_DlgItems[index].DspValue)) { //and varies is not there
strcpy(fs1,ResourceString(IDC_ICADENTPROP_VARIES_18, "Varies" ));
ent_DlgItems[index].DspValue=(char *)realloc(ent_DlgItems[index].DspValue,strlen(fs1)+1); //alloc memory
strcpy(ent_DlgItems[index].DspValue,fs1);
}
}
break;
//Bugzilla No. 7219 ; 07-10-2002 ]
case RTREAL: //If it is a real in an edit box
if(!ent_DlgItems[index].DoOnce){
ent_DlgItems[index].OrgValue=pTmpRb->resval.rreal; //Store org value
// DP: I had change request to display linetype scale independent on drawing units.
// DP: So, now we always form linetype scale with decimal units.
//Added Cybage SBD 04/03/2002 DD/MM/YYYY
//Reason : Fix for Bug No. 77983 from Bugzilla
//if(pTmpRb->restype == 48)
if(isScaleType(EntType,pTmpRb->restype))
sds_rtos(pTmpRb->resval.rreal,2,-1,fs1); //Convert linetype scale real to string using decimal units
else
sds_rtos(pTmpRb->resval.rreal,-1,-1,fs1); //Convert real to string
ent_DlgItems[index].DspValue=(char *)malloc(strlen(fs1)+1); //alloc memory
strcpy(ent_DlgItems[index].DspValue,fs1); //copy to struct
ent_DlgItems[index].DoOnce=1; //only do this once
}
else if(!cmd_real_equal(pTmpRb->resval.rreal,ent_DlgItems[index].OrgValue)){ //if a different value
if(!strisame(ResourceString(IDC_ICADENTPROP_VARIES_18, "Varies" ),ent_DlgItems[index].DspValue)) { //and varies is not there
strcpy(fs1,ResourceString(IDC_ICADENTPROP_VARIES_18, "Varies" ));
ent_DlgItems[index].DspValue=(char *)realloc(ent_DlgItems[index].DspValue,strlen(fs1)+1); //alloc memory
strcpy(ent_DlgItems[index].DspValue,fs1);
}
}
break;
case RTANG: //If it is a angle in an edit box
if(!ent_DlgItems[index].DoOnce){
ent_DlgItems[index].OrgValue=pTmpRb->resval.rreal; //Store org value
sds_angtos(pTmpRb->resval.rreal,-1,-1,fs1); //Convert real to string
ent_DlgItems[index].DspValue=(char *)malloc(strlen(fs1)+1); //alloc memory
strcpy(ent_DlgItems[index].DspValue,fs1); //copy to struct
ent_DlgItems[index].DoOnce=1; //only do this once
}
else if(!cmd_real_equal(pTmpRb->resval.rreal,ent_DlgItems[index].OrgValue)){ //if a different value
if(!strisame(ResourceString(IDC_ICADENTPROP_VARIES_18, "Varies" ),ent_DlgItems[index].DspValue)) { //and varies is not there
strcpy(fs1,ResourceString(IDC_ICADENTPROP_
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -