dxflib_qcad: add dimscale support for leaders
upstream commit 049e1bf95138f32360609b83372e358963a9dd9c
This commit is contained in:
parent
ac31cee0cc
commit
5ea6755594
|
@ -4061,6 +4061,18 @@ void DL_Dxf::writeLeaderVertex( DL_WriterA& dw,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DL_Dxf::writeLeaderEnd( DL_WriterA& dw, const DL_LeaderData& data )
|
||||||
|
{
|
||||||
|
if( version == DL_VERSION_2000 )
|
||||||
|
{
|
||||||
|
dw.dxfString( 1001, "ACAD" );
|
||||||
|
dw.dxfString( 1000, "DSTYLE" );
|
||||||
|
dw.dxfString( 1002, "{" );
|
||||||
|
dw.dxfInt( 1070, 40 );
|
||||||
|
dw.dxfReal( 1040, data.dimScale );
|
||||||
|
dw.dxfString( 1002, "}" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the beginning of a hatch entity to the file.
|
* Writes the beginning of a hatch entity to the file.
|
||||||
|
|
|
@ -310,6 +310,8 @@ public:
|
||||||
const DL_Attributes& attrib );
|
const DL_Attributes& attrib );
|
||||||
void writeLeaderVertex( DL_WriterA& dw,
|
void writeLeaderVertex( DL_WriterA& dw,
|
||||||
const DL_LeaderVertexData& data );
|
const DL_LeaderVertexData& data );
|
||||||
|
void writeLeaderEnd( DL_WriterA& dw,
|
||||||
|
const DL_LeaderData& data );
|
||||||
void writeHatch1( DL_WriterA& dw,
|
void writeHatch1( DL_WriterA& dw,
|
||||||
const DL_HatchData& data,
|
const DL_HatchData& data,
|
||||||
const DL_Attributes& attrib );
|
const DL_Attributes& attrib );
|
||||||
|
|
|
@ -1579,23 +1579,25 @@ struct DXFLIB_EXPORT DL_LeaderData
|
||||||
* Constructor.
|
* Constructor.
|
||||||
* Parameters: see member variables.
|
* Parameters: see member variables.
|
||||||
*/
|
*/
|
||||||
DL_LeaderData( int lArrowHeadFlag,
|
DL_LeaderData( int arrowHeadFlag,
|
||||||
int lLeaderPathType,
|
int leaderPathType,
|
||||||
int lLeaderCreationFlag,
|
int leaderCreationFlag,
|
||||||
int lHooklineDirectionFlag,
|
int hooklineDirectionFlag,
|
||||||
int lHooklineFlag,
|
int hooklineFlag,
|
||||||
double lTextAnnotationHeight,
|
double textAnnotationHeight,
|
||||||
double lTextAnnotationWidth,
|
double textAnnotationWidth,
|
||||||
int lNumber )
|
int number,
|
||||||
|
double dimScale = 1.0 ) :
|
||||||
|
arrowHeadFlag(arrowHeadFlag),
|
||||||
|
leaderPathType(leaderPathType),
|
||||||
|
leaderCreationFlag(leaderCreationFlag),
|
||||||
|
hooklineDirectionFlag( hooklineDirectionFlag ),
|
||||||
|
hooklineFlag( hooklineFlag ),
|
||||||
|
textAnnotationHeight( textAnnotationHeight ),
|
||||||
|
textAnnotationWidth( textAnnotationWidth ),
|
||||||
|
number( number ),
|
||||||
|
dimScale( dimScale )
|
||||||
{
|
{
|
||||||
arrowHeadFlag = lArrowHeadFlag;
|
|
||||||
leaderPathType = lLeaderPathType;
|
|
||||||
leaderCreationFlag = lLeaderCreationFlag;
|
|
||||||
hooklineDirectionFlag = lHooklineDirectionFlag;
|
|
||||||
hooklineFlag = lHooklineFlag;
|
|
||||||
textAnnotationHeight = lTextAnnotationHeight;
|
|
||||||
textAnnotationWidth = lTextAnnotationWidth;
|
|
||||||
number = lNumber;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Arrow head flag (71). */
|
/*! Arrow head flag (71). */
|
||||||
|
@ -1621,6 +1623,9 @@ struct DXFLIB_EXPORT DL_LeaderData
|
||||||
|
|
||||||
/*! Number of vertices in leader (76). */
|
/*! Number of vertices in leader (76). */
|
||||||
int number;
|
int number;
|
||||||
|
|
||||||
|
/*! Dimension scale (dimscale) style override. */
|
||||||
|
double dimScale;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue