mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[styles] Added custom road shields for Italian autostrada
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
Yannik Bloscheck
parent
f6e7580aff
commit
658c3c0af8
1
data/styles/default/dark/symbols/shield-it-a-scaled.svg
Normal file
1
data/styles/default/dark/symbols/shield-it-a-scaled.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg height="37" viewBox="0 0 37 37" width="37" xmlns="http://www.w3.org/2000/svg"><g fill="none"><path d="m18.5 0 .4327198.09615995 13.4644918 2.99210929 1.239152.27536712.2753672 1.23915204 2.9921093 13.4644918.0961599.4327198-.0961599.4327198-2.9921093 13.4644918-.2753672 1.239152-1.239152.2753672-13.4644918 2.9921093-.4327198.0961599-.4327198-.0961599-13.4644918-2.9921093-1.23915204-.2753672-.27536712-1.239152-2.99210929-13.4644918-.09615995-.4327198.09615995-.4327198 2.99210929-13.4644918.27536712-1.23915204 1.23915204-.27536712 13.4644918-2.99210929z" fill="#B7B6B6"/><path d="m5.04878766 5.04878766 13.50000004-3 13.5 3 3 13.50000004-3 13.5-13.5 3-13.50000004-3-3-13.5z" fill="#136C30"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 710 B |
1
data/styles/default/dark/symbols/shield-it-a.svg
Normal file
1
data/styles/default/dark/symbols/shield-it-a.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg height="25" viewBox="0 0 25 25" width="25" xmlns="http://www.w3.org/2000/svg"><g fill="none"><path d="m12.5 0 .3244459.0720991 8.9737316 1.99416257.9290952.2064656.2064656.92909522 1.9941626 8.97373161.0720991.3244459-.0720991.3244459-1.9941626 8.9737316-.2064656.9290952-.9290952.2064656-8.9737316 1.9941626-.3244459.0720991-.3244459-.0720991-8.97373161-1.9941626-.92909522-.2064656-.2064656-.9290952-1.99416257-8.9737316-.0720991-.3244459.0720991-.3244459 1.99416257-8.97373161.2064656-.92909522.92909522-.2064656 8.97373161-1.99416257z" fill="#B7B6B6"/><path d="m3.53659074 3.53659074 8.99999996-2 9 2 2 8.99999996-2 9-9 2-8.99999996-2-2-9z" fill="#136C30"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 676 B |
1
data/styles/default/light/symbols/shield-it-a-scaled.svg
Normal file
1
data/styles/default/light/symbols/shield-it-a-scaled.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg height="37" viewBox="0 0 37 37" width="37" xmlns="http://www.w3.org/2000/svg"><g fill="none"><path d="m18.5 0 .4327198.09615995 13.4644918 2.99210929 1.239152.27536712.2753672 1.23915204 2.9921093 13.4644918.0961599.4327198-.0961599.4327198-2.9921093 13.4644918-.2753672 1.239152-1.239152.2753672-13.4644918 2.9921093-.4327198.0961599-.4327198-.0961599-13.4644918-2.9921093-1.23915204-.2753672-.27536712-1.239152-2.99210929-13.4644918-.09615995-.4327198.09615995-.4327198 2.99210929-13.4644918.27536712-1.23915204 1.23915204-.27536712 13.4644918-2.99210929z" fill="#fff"/><path d="m5.04878766 5.04878766 13.50000004-3 13.5 3 3 13.50000004-3 13.5-13.5 3-13.50000004-3-3-13.5z" fill="#309302"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 707 B |
1
data/styles/default/light/symbols/shield-it-a.svg
Normal file
1
data/styles/default/light/symbols/shield-it-a.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg height="25" viewBox="0 0 25 25" width="25" xmlns="http://www.w3.org/2000/svg"><g fill="none"><path d="m12.5 0 .3244459.0720991 8.9737316 1.99416257.9290952.2064656.2064656.92909522 1.9941626 8.97373161.0720991.3244459-.0720991.3244459-1.9941626 8.9737316-.2064656.9290952-.9290952.2064656-8.9737316 1.9941626-.3244459.0720991-.3244459-.0720991-8.97373161-1.9941626-.92909522-.2064656-.2064656-.9290952-1.99416257-8.9737316-.0720991-.3244459.0720991-.3244459 1.99416257-8.97373161.2064656-.92909522.92909522-.2064656 8.97373161-1.99416257z" fill="#fff"/><path d="m3.53659074 3.53659074 8.99999996-2 9 2 2 8.99999996-2 9-9 2-8.99999996-2-2-9z" fill="#309302"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 673 B |
@@ -195,7 +195,7 @@ m2::PointF GetOffset(int offsetX, int offsetY)
|
|||||||
|
|
||||||
bool IsSymbolRoadShield(ftypes::RoadShield const & shield)
|
bool IsSymbolRoadShield(ftypes::RoadShield const & shield)
|
||||||
{
|
{
|
||||||
return shield.m_type == ftypes::RoadShieldType::US_Interstate || shield.m_type == ftypes::RoadShieldType::US_Highway;
|
return shield.m_type == ftypes::RoadShieldType::US_Interstate || shield.m_type == ftypes::RoadShieldType::US_Highway || shield.m_type == ftypes::RoadShieldType::Italy_Autostrada;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetRoadShieldSymbolName(ftypes::RoadShield const & shield, double fontScale)
|
std::string GetRoadShieldSymbolName(ftypes::RoadShield const & shield, double fontScale)
|
||||||
@@ -206,6 +206,8 @@ std::string GetRoadShieldSymbolName(ftypes::RoadShield const & shield, double fo
|
|||||||
result = shield.m_name.size() <= 2 ? "shield-us-i-thin" : "shield-us-i-wide";
|
result = shield.m_name.size() <= 2 ? "shield-us-i-thin" : "shield-us-i-wide";
|
||||||
else if (shield.m_type == ftypes::RoadShieldType::US_Highway)
|
else if (shield.m_type == ftypes::RoadShieldType::US_Highway)
|
||||||
result = shield.m_name.size() <= 2 ? "shield-us-hw-thin" : "shield-us-hw-wide";
|
result = shield.m_name.size() <= 2 ? "shield-us-hw-thin" : "shield-us-hw-wide";
|
||||||
|
else if (shield.m_type == ftypes::RoadShieldType::Italy_Autostrada)
|
||||||
|
result = "shield-it-a";
|
||||||
else
|
else
|
||||||
ASSERT(false, ("This shield type doesn't support symbols:", shield.m_type));
|
ASSERT(false, ("This shield type doesn't support symbols:", shield.m_type));
|
||||||
|
|
||||||
@@ -301,7 +303,8 @@ dp::Color GetRoadShieldTextColor(dp::Color const & baseColor, ftypes::RoadShield
|
|||||||
{RoadShieldType::Generic_Pill_Orange_Bordered, kRoadShieldBlackTextColor},
|
{RoadShieldType::Generic_Pill_Orange_Bordered, kRoadShieldBlackTextColor},
|
||||||
{RoadShieldType::US_Interstate, kRoadShieldWhiteTextColor},
|
{RoadShieldType::US_Interstate, kRoadShieldWhiteTextColor},
|
||||||
{RoadShieldType::US_Highway, kRoadShieldBlackTextColor},
|
{RoadShieldType::US_Highway, kRoadShieldBlackTextColor},
|
||||||
{RoadShieldType::UK_Highway, kRoadShieldUKYellowTextColor}};
|
{RoadShieldType::UK_Highway, kRoadShieldUKYellowTextColor},
|
||||||
|
{RoadShieldType::Italy_Autostrada, kRoadShieldWhiteTextColor}};
|
||||||
|
|
||||||
if (auto const * cl = kColors.Find(shield.m_type); cl)
|
if (auto const * cl = kColors.Find(shield.m_type); cl)
|
||||||
return df::GetColorConstant(*cl);
|
return df::GetColorConstant(*cl);
|
||||||
|
|||||||
@@ -473,7 +473,7 @@ class ItalyRoadShieldParser : public SimpleRoadShieldParser
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ItalyRoadShieldParser(std::string const & baseRoadNumber)
|
explicit ItalyRoadShieldParser(std::string const & baseRoadNumber)
|
||||||
: SimpleRoadShieldParser(baseRoadNumber, {{"A", RoadShieldType::Generic_Green},
|
: SimpleRoadShieldParser(baseRoadNumber, {{"A", RoadShieldType::Italy_Autostrada},
|
||||||
{"SS", RoadShieldType::Generic_Blue},
|
{"SS", RoadShieldType::Generic_Blue},
|
||||||
{"SR", RoadShieldType::Generic_Blue},
|
{"SR", RoadShieldType::Generic_Blue},
|
||||||
{"SP", RoadShieldType::Generic_Blue}})
|
{"SP", RoadShieldType::Generic_Blue}})
|
||||||
@@ -877,6 +877,7 @@ std::string DebugPrint(RoadShieldType shieldType)
|
|||||||
case RoadShieldType::US_Interstate: return "US interstate";
|
case RoadShieldType::US_Interstate: return "US interstate";
|
||||||
case RoadShieldType::US_Highway: return "US highway";
|
case RoadShieldType::US_Highway: return "US highway";
|
||||||
case RoadShieldType::UK_Highway: return "UK highway";
|
case RoadShieldType::UK_Highway: return "UK highway";
|
||||||
|
case RoadShieldType::Italy_Autostrada: return "Italy autostrada";
|
||||||
case RoadShieldType::Hidden: return "hidden";
|
case RoadShieldType::Hidden: return "hidden";
|
||||||
case RoadShieldType::Count: CHECK(false, ("RoadShieldType::Count is not to be used as a type"));
|
case RoadShieldType::Count: CHECK(false, ("RoadShieldType::Count is not to be used as a type"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ enum class RoadShieldType
|
|||||||
US_Interstate,
|
US_Interstate,
|
||||||
US_Highway,
|
US_Highway,
|
||||||
UK_Highway,
|
UK_Highway,
|
||||||
|
Italy_Autostrada,
|
||||||
Hidden,
|
Hidden,
|
||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user