[core] Cleaned up Transform

Eliminated many redundant methods on Transform. Minimized usage of TransformState::x and TransformState::y. Added convenient constructors for AnimationOptions. When scaling, passing in view’s origin as the anchor no longer anchors the scaling operation at the view’s center. To specify no anchor, use NaN.

Increased precision of worldSize(), now that it’s used much more heavily in transform methods.
This commit is contained in:
Minh Nguyễn
2016-01-10 17:28:21 -08:00
committed by Minh Nguyễn
parent 27b308a234
commit d26b956a48
7 changed files with 155 additions and 181 deletions

View File

@@ -248,8 +248,8 @@ double TransformState::scaleZoom(double s) const {
return ::log2(s);
}
float TransformState::worldSize() const {
return util::tileSize * scale;
double TransformState::worldSize() const {
return scale * util::tileSize;
}
PrecisionPoint TransformState::latLngToPoint(const LatLng& latLng) const {