Skip to content

Instantly share code, notes, and snippets.

@TNick
Created March 20, 2013 18:08
Show Gist options
  • Save TNick/5207010 to your computer and use it in GitHub Desktop.
Save TNick/5207010 to your computer and use it in GitHub Desktop.
dwgBuffer::getThickness
void dwgBuffer::getThickness(bool b_R2000_style)
{
/* BitThickness
For R13-R14, this is a BD.
We are asserting that the version is not R13-R14; this value should
be read by the user
*/
if ( !b_R2000_style )
return getBitDouble();
/*
For R2000+, this is a single bit followed optionally
by a BD.*/
duint8 def_val = getBit();
if ( def_val )
{ /* If the bit is one, the thickness value is assumed to be 0.0.*/
return 0.0;
}
else
{ /* If the bit is 0, then a BD that represents the thickness follows. */
return getBitDouble();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment