Skip to content

Commit

Permalink
lngLatToScreenPosition returns true if the point is visible
Browse files Browse the repository at this point in the history
  • Loading branch information
matteblair committed Jul 12, 2016
1 parent 1ae3948 commit caeb93e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/tangram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ bool lngLatToScreenPosition(double _lng, double _lat, double* _x, double* _y) {

bool withinViewport = *_x >= 0. && *_x <= m_view->getWidth() && *_y >= 0. && *_y <= m_view->getHeight();

return clipped || !withinViewport;
return !clipped && withinViewport;
}

void setPixelScale(float _pixelsPerPoint) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/tangram.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ float getTilt();
void screenPositionToLngLat(double _x, double _y, double* _lng, double* _lat);

// Transform longitude and latitude coordinates into their position in screen space
// (x right, y down); returns true if the (lat,lon) is not visible on the screen
// (x right, y down); returns true if the (lat,lon) is visible on the screen
bool lngLatToScreenPosition(double _lng, double _lat, double* _x, double* y);

// Set the ratio of hardware pixels to logical pixels (defaults to 1.0)
Expand Down

0 comments on commit caeb93e

Please sign in to comment.