相关代码:
像素格式:PIXEL_FORMAT_RGB_888
#if 0
//GUI层半透明
/* 3.set alpha */
stAlpha.bAlphaEnable = HI_FALSE;
stAlpha.bAlphaChannel = HI_FALSE;
stAlpha.u8Alpha0 = 0xff;
stAlpha.u8Alpha1 = 0x8f;
stAlpha.u8GlobalAlpha = 0x80;
if (ioctl(console_fd, FBIOPUT_ALPHA_HIFB, &stAlpha) < 0)
{
printf("Set alpha failed!\n");
close(console_fd);
return -1;
}
#endif
stColorKey.bKeyEnable = HI_TRUE;
stColorKey.u32Key = 0x0;
if (ioctl(console_fd, FBIOPUT_COLORKEY_HIFB, &stColorKey) < 0)
{
printf("FBIOPUT_COLORKEY_HIFB!\n");
close(console_fd);
return HI_NULL;
}
stColorKey.u32Key = 0xFF0000;效果也是黑色字体透明。