Hunted down hardcoded pixel size thresholds for drawing

Dynamic contrast for netname and pin numbers ('halo' text)
Handle netname drawing even on diagonal tracks
This commit is contained in:
Lorenzo Marcantonio
2013-04-09 19:16:53 +02:00
parent b525e3be55
commit 20eaf66d5b
12 changed files with 185 additions and 85 deletions
+8
View File
@@ -1512,6 +1512,14 @@ EDA_COLOR_T ColorByName( const wxChar *aName )
return UNSPECIFIED_COLOR;
}
bool ColorIsLight( EDA_COLOR_T aColor )
{
const StructColors &c = g_ColorRefs[ColorGetBase( aColor )];
int r = c.m_Red;
int g = c.m_Green;
int b = c.m_Blue;
return ((r * r) + (g * g) + (b * b)) > (128 * 128 * 3);
}
EDA_COLOR_T ColorFindNearest( const wxColour &aColor )
{