-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Added DXF style attribute of TEXT and MTEXT to OGR style string #198
Conversation
autotest/ogr/ogr_dxf.py tests need to be updated. See
|
@@ -478,6 +478,7 @@ OGRFeature *OGRDXFLayer::TranslateMTEXT() | |||
bool bHaveZ = false; | |||
int nAttachmentPoint = -1; | |||
CPLString osText; | |||
CPLString styleName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming convention: use osStyleName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -652,6 +662,7 @@ OGRFeature *OGRDXFLayer::TranslateTEXT() | |||
double dfAngle = 0.0; | |||
double dfHeight = 0.0; | |||
CPLString osText; | |||
CPLString styleName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming convention: use osStyleName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -595,8 +600,13 @@ OGRFeature *OGRDXFLayer::TranslateMTEXT() | |||
/* -------------------------------------------------------------------- */ | |||
CPLString osStyle; | |||
char szBuffer[64]; | |||
|
|||
if (styleName == "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace that by initialization to "Arial" at declaration time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Removed if and changed to setting at declaration time.
@@ -804,8 +819,13 @@ OGRFeature *OGRDXFLayer::TranslateTEXT() | |||
CPLString osStyle; | |||
char szBuffer[64]; | |||
|
|||
osStyle.Printf("LABEL(f:\"Arial\",t:\"%s\"",osText.c_str()); | |||
if (styleName == "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace that by initialization to "Arial" at declaration time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Removed if and changed to setting at declaration time.
@rouault Can you please review changes? Seems like only one Travis build is failing and it's unrelated to this PR. |
mingw was complaining about "ogrdxflayer.cpp:2547:2: error: no newline at end of file". I've manually fixed that and committed your patch in trunk r37571. Thanks |
… Lebedev, OSGeo/gdal#198) git-svn-id: https://svn.osgeo.org/gdal/trunk/gdal@37571 f0d54148-0727-0410-94bb-9a71ac55c965
… Lebedev, #198) git-svn-id: https://svn.osgeo.org/gdal/trunk@37571 f0d54148-0727-0410-94bb-9a71ac55c965
Added parsing of property 7 from TEXT and MTEXT DXF objects and printing it out to the "font"
f
property of style string.