Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix angle and alignment handing of (m)texts #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/drw_entities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,10 +1294,10 @@ void DRW_Text::parseCode(int code, dxfReader *reader){
widthscale = reader->getDouble();
break;
case 50:
angle = reader->getDouble();
angle = reader->getDouble() / ARAD;
break;
case 51:
oblique = reader->getDouble();
oblique = reader->getDouble() / ARAD;
break;
case 71:
textgen = reader->getInt32();
Expand Down Expand Up @@ -1379,7 +1379,6 @@ bool DRW_Text::parseDwg(DRW::Version version, dwgBuffer *buf, duint32 bs){
height = buf->getBitDouble(); /* Height BD 40 */
widthscale = buf->getBitDouble(); /* Width factor BD 41 */
}
angle *= ARAD;
DRW_DBG("thickness: "); DRW_DBG(thickness); DRW_DBG(", Oblique ang: "); DRW_DBG(oblique); DRW_DBG(", Width: ");
DRW_DBG(widthscale); DRW_DBG(", Rotation: "); DRW_DBG(angle); DRW_DBG(", height: "); DRW_DBG(height); DRW_DBG("\n");
text = sBuf->getVariableText(version, false); /* Text value TV 1 */
Expand Down Expand Up @@ -1771,7 +1770,7 @@ void DRW_Hatch::parseCode(int code, dxfReader *reader){
else if (ellipse) ellipse->endparam = reader->getDouble()/ARAD;
break;
case 52:
angle = reader->getDouble();
angle = reader->getDouble() / ARAD;
break;
case 73:
if (arc) arc->isccw = reader->getInt32();
Expand Down Expand Up @@ -2365,10 +2364,10 @@ void DRW_Dimension::parseCode(int code, dxfReader *reader){
rot = reader->getDouble();
break;
case 50:
angle = reader->getDouble();
angle = reader->getDouble() / ARAD;
break;
case 52:
oblique = reader->getDouble();
oblique = reader->getDouble() / ARAD;
break;
case 40:
length = reader->getDouble();
Expand Down