高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】now with colors
now with colors
now with colors
hello everybody.
first of all, thanks to sergey for all his help.
my application almost is able to import all the information contained in a dxf/dwg file, but not all the information is still read. i suppose it is because i make some mistakes in the way to import the hatches information.
first of all, i read all the loops of the hatch, the code is more or less like this:
for( i = 0; i < phatch->numloops(); i++ ){
type = phatch->looptypeat( i );
if( phatch->looptypeat( i ) & oddbhatch::kpolyline ){
.....
}else{
phatch->getloopat( i, type, edges );
for( edgearray::iterator pcurve = edges.begin(); pcurve != edges.end(); ++pcurve ){
.....
}
}
and after that, i read all the stroke lines:
if( phatch->numhatchlines() > 0 ){
for( i = 0; i < phatch->numhatchlines(); i++ ){
phatch->gethatchlinedataat( i, from, to );
....
}
}
is this way more or less correct?
and my second question is, what's the way to read the hatch colors?
i use a function like that to set the color in my structures: getcolor( int red, int green, int blue );
i get the entity color:
odcmentitycolor ccc = phatch->entitycolor();
|