Skip to content

Commit

Permalink
Fixed duplicate code due to merging two related pull requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwimsey committed Jul 2, 2014
1 parent f22219c commit 0c1d739
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions Source/Core/ElementStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,23 +364,6 @@ float ElementStyle::ResolveProperty(const Property* property, float base_value)
{
return property->value.Get< float >();
}

// Values based on pixels-per-inch.
if (property->unit & Property::PPI_UNIT)
{
float inch = property->value.Get< float >() * element->GetRenderInterface()->GetPixelsPerInch();

if (property->unit & Property::INCH) // inch
return inch;
if (property->unit & Property::CM) // centimeter
return inch / 2.54f;
if (property->unit & Property::MM) // millimeter
return inch / 25.4f;
if (property->unit & Property::PT) // point
return inch / 72.0f;
if (property->unit & Property::PC) // pica
return inch / 6.0f;
}

// Values based on pixels-per-inch.
if (property->unit & Property::PPI_UNIT)
Expand Down

0 comments on commit 0c1d739

Please sign in to comment.