Compare commits
3 commits
master
...
vng-sdfima
Author | SHA1 | Date | |
---|---|---|---|
|
455d226e2d | ||
|
34b3407588 | ||
|
b138cd76ee |
7 changed files with 2311 additions and 2319 deletions
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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".
|
||||
|
|
BIN
data/World.mwm
BIN
data/World.mwm
Binary file not shown.
Binary file not shown.
4612
data/countries.txt
4612
data/countries.txt
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
|
|
Reference in a new issue