[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:
committed by
Minh Nguyễn
parent
27b308a234
commit
d26b956a48
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user