Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Viktor Govako
455d226e2d world 2022-04-02 17:58:08 +03:00
Viktor Govako
34b3407588 sdf_image 2022-04-02 17:57:53 +03:00
Viktor Govako
b138cd76ee [android] Fixed typo with Internet.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
2022-04-01 17:13:14 +03:00
7 changed files with 2311 additions and 2319 deletions

View file

@ -77,13 +77,6 @@ SdfImage::SdfImage(uint32_t h, uint32_t w, uint8_t * imageData, uint8_t border)
}
}
SdfImage::SdfImage(SdfImage const & copy)
{
m_height = copy.m_height;
m_width = copy.m_width;
m_data = copy.m_data;
}
uint32_t SdfImage::GetWidth() const
{
return m_width;
@ -182,6 +175,7 @@ SdfImage SdfImage::Bilinear(float scale)
SdfImage result(dstHeight, dstWidth);
/// @todo Probably, should make srcWidth-1, srcHeight-1 here, but now it works fine with current std::round.
float xRatio = static_cast<float>(srcWidth) / dstWidth;
float yRatio = static_cast<float>(srcHeight) / dstHeight;
for (uint32_t i = 0; i < dstHeight; i++)
@ -194,9 +188,8 @@ SdfImage SdfImage::Bilinear(float scale)
uint32_t x = static_cast<uint32_t>(fx);
uint32_t y = static_cast<uint32_t>(fy);
uint32_t index = y * srcWidth + x;
ASSERT_LESS(index, m_data.size(), ());
ASSERT_LESS(index + srcWidth + 1, m_data.size(), ());
// range is 0 to 255 thus bitwise AND with 0xff
float A = m_data[index];
float B = m_data[index + 1];
float C = m_data[index + srcWidth];

View file

@ -42,7 +42,6 @@ public:
SdfImage() = default;
SdfImage(uint32_t h, uint32_t w);
SdfImage(uint32_t h, uint32_t w, uint8_t * imageData, uint8_t border);
SdfImage(SdfImage const & copy);
uint32_t GetWidth() const;
uint32_t GetHeight() const;

View file

@ -973,7 +973,7 @@ public class PlacePageView extends NestedScrollViewClickFixed
private void refreshWiFi(@NonNull MapObject mapObject)
{
final String inet = mapObject.getMetadata(Metadata.MetadataType.FMD_INTERNET);
if (inet != null)
if (!TextUtils.isEmpty(inet))
{
mWifi.setVisibility(View.VISIBLE);
/// @todo Better (but harder) to wrap C++ osm::Internet into Java, instead of comparing with "no".

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
World.mwm 35775691
WorldCoasts.mwm 4803642
World.mwm 35857932
WorldCoasts.mwm 4808668
00_NotoNaskhArabic-Regular.ttf 149192
00_NotoSansThai-Regular.ttf 21952
01_dejavusans.ttf 757076