string const ExtraData::get(string const & id) const
{
std::map<string, string>::const_iterator it = data_.find(id);
string const ExtraData::get(string const & id) const
{
std::map<string, string>::const_iterator it = data_.find(id);
}
string const RotationData::adjAngle() const
{
// Ensure that angle lies in the range -360 < angle < 360
}
string const RotationData::adjAngle() const
{
// Ensure that angle lies in the range -360 < angle < 360
if (std::abs(rotAngle) > 360.0) {
rotAngle -= 360.0 * floor(rotAngle / 360.0);
return convert<string>(rotAngle);
if (std::abs(rotAngle) > 360.0) {
rotAngle -= 360.0 * floor(rotAngle / 360.0);
return convert<string>(rotAngle);
if (!float_equal(scl, 100.0, 0.05))
os << "scale=" << scl / 100.0 << ',';
return os.str();
if (!float_equal(scl, 100.0, 0.05))
os << "scale=" << scl / 100.0 << ',';
return os.str();
// If the thing is empty, leave it so, else wrap it in square brackets.
return output.empty() ? output : "[" + output + "]";
}
// If the thing is empty, leave it so, else wrap it in square brackets.
return output.empty() ? output : "[" + output + "]";
}