Project

General

Profile

Files » vdr-graphlcd-0.1.5_flat-edges.diff

http://vdr-portal.de/board/thread.php?threadid=91790 - randy, 02/28/2010 09:44 AM

View differences:

display.c 2009-12-20 22:52:40.000000000 +0100
bitmap->DrawRoundRectangle(FRAME_SPACE_X, yPos,
FRAME_SPACE_X + FrameWidth - 1,
yPos + normalFont->TotalHeight() + 2 * TEXT_OFFSET_Y_TIME - 1,
GLCD::clrBlack, true, (TEXT_OFFSET_Y_TIME >= 2) ? 4 : 1);
GLCD::clrBlack, false, (TEXT_OFFSET_Y_TIME >= 2) ? 1 : 1);
if (CurrTime == 0)
time(&CurrTime);
tm * tm = localtime_r(&CurrTime, &tm_r);
strncpy(month, (char *)(tr("JanFebMarAprMayJunJulAugSepOctNovDec") + 3 * tm->tm_mon), 3);
strncpy(month, (char *)(tr("JanFebMarAprMaiJunJulAugSepOktNovDez") + 3 * tm->tm_mon), 3);
month[3] = 0;
snprintf(buffer, sizeof(buffer), "%s %2d.%s %d:%02d", (const char *) WeekDayName(tm->tm_wday), tm->tm_mday, month, tm->tm_hour, tm->tm_min);
TextLen = normalFont->Width(buffer);
......
bitmap->DrawText(FRAME_SPACE_X + FrameWidth - TextLen - TEXT_OFFSET_X,
yPos + TEXT_OFFSET_Y_TIME,
FRAME_SPACE_X + FrameWidth - 1,
buffer, normalFont, GLCD::clrWhite);
buffer, normalFont, GLCD::clrBlack);
}
else
{
bitmap->DrawText(FRAME_SPACE_X + TEXT_OFFSET_X,
yPos + TEXT_OFFSET_Y_TIME,
FRAME_SPACE_X + FrameWidth - 1,
buffer, normalFont, GLCD::clrWhite);
buffer, normalFont, GLCD::clrBlack);
}
}
}
......
bitmap->DrawRoundRectangle(FRAME_SPACE_X, yPos,
FRAME_SPACE_X + FrameWidth - 1,
yPos + normalFont->TotalHeight() + 2 * TEXT_OFFSET_Y_CHANNEL - 1,
GLCD::clrBlack, true, (TEXT_OFFSET_Y_CHANNEL >= 4) ? 4 : 1);
GLCD::clrBlack, false, (TEXT_OFFSET_Y_CHANNEL >= 4) ? 1 : 1);
if (channel.strTmp.length() > 0)
{
bitmap->DrawText(FRAME_SPACE_X + TEXT_OFFSET_X,
yPos + TEXT_OFFSET_Y_CHANNEL,
FRAME_SPACE_X + FrameWidth - 1,
channel.strTmp, normalFont, GLCD::clrWhite);
channel.strTmp, normalFont, GLCD::clrBlack);
}
else if (channel.str.length() > 0)
{
bitmap->DrawText(FRAME_SPACE_X + TEXT_OFFSET_X,
yPos + TEXT_OFFSET_Y_CHANNEL,
FRAME_SPACE_X + FrameWidth - 1,
channel.str, normalFont, GLCD::clrWhite);
channel.str, normalFont, GLCD::clrBlack);
}
}
}
......
yPos,
FRAME_SPACE_X + FrameWidth - 1,
yPos + normalFont->TotalHeight() + 2 * TEXT_OFFSET_Y_TIME - 1,
GLCD::clrBlack, true, TEXT_OFFSET_Y_CHANNEL >= 4 ? 4 : 1);
GLCD::clrBlack, false, TEXT_OFFSET_Y_CHANNEL >= 4 ? 1 : 1);
bitmap->DrawText(FRAME_SPACE_X + TEXT_OFFSET_X,
yPos + TEXT_OFFSET_Y_TIME,
FRAME_SPACE_X + FrameWidth - 1,
osd.title, normalFont, GLCD::clrWhite);
osd.title, normalFont, GLCD::clrBlack);
}
if (!(textItemLines.size() > 0))
......
bitmap->DrawRoundRectangle(FRAME_SPACE_X, yPos + (i - menuTop) * iEntryHeight,
bitmap->Width() - 1 - FRAME_SPACE_X,
yPos + (i - menuTop + 1) * iEntryHeight - 1,
GLCD::clrBlack, true, TEXT_OFFSET_Y_CHANNEL >= 4 ? 3 : 1);
GLCD::clrBlack, false, TEXT_OFFSET_Y_CHANNEL >= 4 ? 1 : 1);
}
strncopy(buffer2, osd.items[i].c_str(), sizeof(buffer2));
pszTmp1 = buffer2;
......
bitmap->DrawText(FRAME_SPACE_X + TEXT_OFFSET_X + t,
yPos + (i - menuTop) * iEntryHeight + extra,
std::min(FRAME_SPACE_X + TEXT_OFFSET_X + t + tab[iAT + 1], bitmap->Width() - 1 - FRAME_SPACE_X),
pszTmp1, normalFont, (i == osd.currentItemIndex) ? GLCD::clrWhite : GLCD::clrBlack);
pszTmp1, normalFont, (i == osd.currentItemIndex) ? GLCD::clrBlack : GLCD::clrBlack);
pszTmp1 = pszTmp2+1;
pszTmp2 = strchr(pszTmp1, '\t');
t = t + tab[iAT + 1] + TEXT_OFFSET_X;
......
bitmap->DrawText(FRAME_SPACE_X + TEXT_OFFSET_X + t,
yPos + (i - menuTop) * iEntryHeight + extra,
bitmap->Width() - 1 - FRAME_SPACE_X,
pszTmp1, normalFont, (i == osd.currentItemIndex) ? GLCD::clrWhite : GLCD::clrBlack);
pszTmp1, normalFont, (i == osd.currentItemIndex) ? GLCD::clrBlack : GLCD::clrBlack);
}
}
mutex.Unlock();
......
bitmap->Height() - smallFont->TotalHeight() - 2 * extra - FRAME_SPACE_Y / 3,
i * (bitmap->Width() / 4) + FRAME_SPACE_X + buttonWidth - 1,
bitmap->Height() - 1 - FRAME_SPACE_Y / 3,
GLCD::clrBlack, true, std::max(1, (smallFont->TotalHeight() + 4) / 5));
GLCD::clrBlack, false, std::max(1, (smallFont->TotalHeight() + 1) / 5));
textLen = smallFont->Width(osd.colorButton[i]);
if (textLen <= buttonWidth - 2)
{
bitmap->DrawText(i * (bitmap->Width() / 4) + (bitmap->Width() / 8) - (textLen + 1) / 2,
bitmap->Height() - smallFont->TotalHeight() - extra - FRAME_SPACE_Y / 3,
i * (bitmap->Width() / 4) + FRAME_SPACE_X + buttonWidth - 1,
osd.colorButton[i], smallFont, GLCD::clrWhite);
osd.colorButton[i], smallFont, GLCD::clrBlack);
}
else
{
bitmap->DrawText(i * (bitmap->Width() / 4) + FRAME_SPACE_X + 1,
bitmap->Height() - smallFont->TotalHeight() - extra - FRAME_SPACE_Y / 3,
i * (bitmap->Width() / 4) + FRAME_SPACE_X + buttonWidth - 1,
osd.colorButton[i], smallFont, GLCD::clrWhite);
osd.colorButton[i], smallFont, GLCD::clrBlack);
}
}
}
(7-7/7)