Skip to content

Commit d46f711

Browse files
committed
Circle thickness
1 parent 96635e6 commit d46f711

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

dxf/circle.dxf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ CIRCLE
66
100
77
20
88
100
9+
39
10+
5
911
40
1012
50
1113
0

src/Circle.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ namespace dxfv
6161
case 20:
6262
y = atof(cvit->myValue.c_str());
6363
break;
64+
case 39:
65+
myThick = atoi(cvit->myValue.c_str());
66+
break;
6467
case 40:
6568
r = atof(cvit->myValue.c_str());
6669
break;
@@ -83,6 +86,7 @@ namespace dxfv
8386
draw.rect->ApplyScale(draw.x1, draw.y1);
8487
draw.r /= draw.rect->myScale;
8588
draw.color = myColor;
89+
draw.thick = myThick;
8690
return true;
8791
}
8892
void CCircle::Adjust(double ax, double ay)

src/Dxf.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ namespace dxfv
211211
double r;
212212
double sa;
213213
double ea;
214+
int thick;
214215
int index;
215216
int index_curve;
216217
std::string text;
@@ -243,14 +244,16 @@ namespace dxfv
243244

244245
int myColor;
245246

247+
int myThick;
248+
246249
/// default contructor
247250
cDXFGraphObject()
248251
{
249252
}
250253

251254
/// construct base for a type
252255
cDXFGraphObject(const std::string &c, eType t)
253-
: myType(t), myCode(c), myColor(0x808080)
256+
: myType(t), myCode(c), myColor(0x808080), myThick( 1 )
254257
{
255258
}
256259
virtual ~cDXFGraphObject()

src/windex.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ void CCircle::Draw( CDxf* dxf )
208208
cDrawPrimitiveData draw( dxf );
209209
getDraw( draw );
210210
dxf->shapes()->fill( false );
211+
dxf->shapes()->penThick( draw.thick );
211212
dxf->shapes()->color( draw.color );
212213
dxf->shapes()->circle(
213214
draw.x1, draw.y1, draw.r );

0 commit comments

Comments
 (0)