[Horus] Main view continued

This commit is contained in:
Bertrand Songis
2015-10-17 11:12:35 +02:00
parent 4f5ce6b0f0
commit 8a3de9184b
5 changed files with 16 additions and 12 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

+7 -7
View File
@@ -820,7 +820,10 @@ void lcdDrawTransparentPixel(display_t * p, uint8_t opacity, uint16_t color)
{
ASSERT_IN_DISPLAY(p);
if (opacity != OPACITY_MAX) {
if (opacity == OPACITY_MAX) {
lcdDrawPixel(p, color);
}
else if (opacity != 0) {
uint8_t bgWeight = OPACITY_MAX - opacity;
COLOR_SPLIT(color, red, green, blue);
COLOR_SPLIT(*p, bgRed, bgGreen, bgBlue);
@@ -829,9 +832,6 @@ void lcdDrawTransparentPixel(display_t * p, uint8_t opacity, uint16_t color)
uint16_t b = (bgBlue * bgWeight + blue * opacity) / OPACITY_MAX;
lcdDrawPixel(p, COLOR_JOIN(r, g, b));
}
else if (opacity != 0) {
lcdDrawPixel(p, color);
}
}
void lcdDrawPoint(coord_t x, coord_t y, LcdFlags att)
@@ -850,11 +850,11 @@ void lcd_hlineStip(coord_t x, coord_t y, coord_t w, uint8_t pat, LcdFlags att)
display_t * p = PIXEL_PTR(x, y);
display_t color = lcdColorTable[COLOR_IDX(att)];
uint8_t opacity = 0x0F - (att >> 24);
while (w--) {
if (pat&1) {
*p = color;
// lcd_mask(p, mask, 0);
if (pat & 1) {
lcdDrawTransparentPixel(p, opacity, color);
pat = (pat >> 1) | 0x80;
}
else {
+9 -5
View File
@@ -331,6 +331,10 @@ void onMainViewMenu(const char *result)
void displayTelemetryScreen(int index, unsigned int evt);
const uint16_t LBM_MAINVIEW_BACKGROUND[] = {
#include "../../bitmaps/Horus/background.lbm"
};
const uint16_t LBM_MAINVIEW_FLAT[] = {
#include "../../bitmaps/Horus/mainview_flat.lbm"
};
@@ -393,6 +397,7 @@ void menuMainView(evt_t event)
break;
}
lcdDrawBitmap(0, 0, LBM_MAINVIEW_BACKGROUND);
// lcdDrawBitmap(0, 0, LBM_MAINVIEW_FLAT);
// Header
@@ -411,13 +416,12 @@ void menuMainView(evt_t event)
// Trims
displayTrims(mode);
// Model bitmap
lcdDrawBitmap(256, 104, LBM_CORSAIR);
// Model name
lcdDrawBitmapPattern(256, 62, LBM_MODEL_ICON, MENU_TITLE_COLOR);
// Model panel
lcdDrawFilledRectWithAttributes(248, 58, 188, 158, SOLID, TEXT_BGCOLOR | (5<<24));
lcdDrawBitmapPattern(256, 62, LBM_MODEL_ICON, TITLE_BGCOLOR);
lcd_putsAtt(293, 68, "MyPlane Name", SMLSIZE);
lcdDrawHorizontalLine(287, 85, 140, TITLE_BGCOLOR);
lcdDrawBitmap(256, 104, LBM_CORSAIR);
#if 0