Go to the documentation of this file.
56 if(zoom < m_minZoom || zoom > m_maxZoom)
62 m_scale = 1.0f / (1 << std::abs(zoom));
64 m_scale = 1.0f * (1 << std::abs(zoom));
76 m_cameraPosition = pos;
119 layout->addPositionAnchor(anchoredWidget, anchoredEdge, hookedPosition, hookedEdge);
126 layout->fillPosition(anchoredWidget, hookedPosition);
133 layout->centerInPosition(anchoredWidget, hookedPosition);
143 callLuaField(
"onCameraPositionChange", position, oldPosition);
150 if(node->tag() ==
"zoom")
152 else if(node->tag() ==
"max-zoom")
154 else if(node->tag() ==
"min-zoom")
Position getTilePosition(const Point &mousePos)
void fillPosition(const UIWidgetPtr &anchoredWidget, const Position &hookedPosition)
Rect getTileRect(const Position &pos)
void setMaxZoom(int maxZoom)
void anchorPosition(const UIWidgetPtr &anchoredWidget, Fw::AnchorEdge anchoredEdge, const Position &hookedPosition, Fw::AnchorEdge hookedEdge)
void setMinZoom(int minZoom)
Point getTilePoint(const Position &pos)
stdext::shared_object_ptr< UIMapAnchorLayout > UIMapAnchorLayoutPtr
R callLuaField(const std::string &field, const T &... args)
virtual void onStyleApply(const std::string &styleName, const OTMLNodePtr &styleNode)
stdext::shared_object_ptr< T > static_self_cast()
virtual void onZoomChange(int zoom, int oldZoom)
void centerInPosition(const UIWidgetPtr &anchoredWidget, const Position &hookedPosition)
Rect getTileRect(const Position &pos, const Rect &screenRect, const Position &mapCenter, float scale)
Position getTilePosition(const Point &point, const Rect &screenRect, const Position &mapCenter, float scale)
Point getTilePoint(const Position &pos, const Rect &screenRect, const Position &mapCenter, float scale)
Position getCameraPosition()
void setCameraPosition(const Position &pos)
void drawSelf(Fw::DrawPane drawPane)
virtual void onCameraPositionChange(const Position &position, const Position &oldPosition)
void draw(const Rect &screenRect, const Position &mapCenter, float scale, const Color &color)