本文整理汇总了C++中GrContextBackgroundSet函数的典型用法代码示例。如果您正苦于以下问题:C++ GrContextBackgroundSet函数的具体用法?C++ GrContextBackgroundSet怎么用?C++ GrContextBackgroundSet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GrContextBackgroundSet函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ClearRightButton
void ClearRightButton( tContext *context ){
GrContextForegroundSet( context, ClrWhite);
GrContextBackgroundSet( context, ClrBlack);
GrRectFill( context, &myRectangleBotRight);
GrContextForegroundSet( context, ClrBlack);
GrContextBackgroundSet( context, ClrWhite);
}
开发者ID:GevenM,项目名称:giip,代码行数:7,代码来源:Buttons.c
示例2: window_drawtime
void window_drawtime(tContext *pContext, long y, uint8_t times[3], uint8_t selected)
{
char data[3];
data[0] = data[1] = '0';
data[2] = ':';
#define SPACING 3
uint8_t height = GrStringHeightGet(pContext);
uint8_t width_all = GrStringWidthGet(pContext, data, 3) + 10;
uint8_t width_digit = GrStringWidthGet(pContext, data, 2) + 4;
long startx = (LCD_WIDTH - width_all - width_all - width_digit) / 2;
if (startx < 0) startx = 0;
for(int i = 0; i < 3; i++)
{
data[0] = '0' + times[i] / 10;
data[1] = '0' + times[i] % 10;
GrContextForegroundSet(pContext, ClrWhite);
GrContextBackgroundSet(pContext, ClrBlack);
if (selected & (1 << i))
window_selecttext(pContext, data, 2, startx + SPACING + i * width_all, y);
else
GrStringDraw(pContext, data, 2, startx + SPACING + i * width_all, y, 0);
if (i != 2)
{
GrContextForegroundSet(pContext, ClrWhite);
GrContextBackgroundSet(pContext, ClrBlack);
GrStringDraw(pContext, ":", 1, startx + SPACING + width_digit + i * width_all, y, 0);
}
}
}
开发者ID:Sowhat2112,项目名称:KreyosFirmware,代码行数:35,代码来源:controls.c
示例3: PrintReminder
void PrintReminder(tContext *context, y_menus f_menuChoice){
char outString[32] = "";
unsigned char text_start = 18;
// Draw top and bottom banner and buttons
LoadLeftButton( context , "BACK");
LoadMiddleButton( context , "SEL");
//LoadRightButton("");
// Menu options
GrStringDraw( context, "Create Reminder", AUTO_STRING_LENGTH, 5, 18, OPAQUE_TEXT);
GrStringDraw( context, "Remove Reminder", AUTO_STRING_LENGTH, 5, 31, OPAQUE_TEXT);
// Highlight selected item
switch (f_menuChoice) {
case Reminder_Create:
text_start = 18;
strcpy(outString, "Create Reminder");
break;
case Reminder_Remove:
text_start = 31;
strcpy(outString, "Remove Reminder");
break;
default: break;
}
GrContextForegroundSet(context, ClrWhite); //ClrBlack this affects the highlight color
GrContextBackgroundSet(context, ClrBlack); //ClrWhite this affects the text color in the highlight
GrStringDraw(context, outString, AUTO_STRING_LENGTH, 5, text_start, OPAQUE_TEXT);
GrContextForegroundSet(context, ClrBlack);
GrContextBackgroundSet(context, ClrWhite);
}
开发者ID:GevenM,项目名称:giip,代码行数:35,代码来源:PrintReminder.c
示例4: UpdateWindow
//*****************************************************************************
//
// This function updates the contents of the directory text window.
//
// \param None.
//
// This function is will update the state of the directory window. This can
// be the result of a DirUpdate() call which completely changed the contents
// of the window, or a selection changed and the screen needs to be updated.
//
// \return None.
//
//*****************************************************************************
void
UpdateWindow(void)
{
int iIdx;
int iLine;
//
// Set the first line of the directory text window.
//
iLine = TOP_HEIGHT;
//
// Clear out the text area for the entries.
//
ClearTextBox();
//
// Display all valid values.
//
for(iIdx = 0; iIdx < g_DirData.ulValidValues; iIdx++)
{
//
// Change the backgound for the selected item.
//
if(g_DirData.ulSelectIndex == iIdx)
{
GrContextBackgroundSet(&g_sContext, ClrGray);
}
else
{
GrContextBackgroundSet(&g_sContext, ClrBlack);
}
//
// Change the color for directories.
//
if (g_DirData.FileInfo[iIdx].fattrib & AM_DIR)
{
GrContextForegroundSet(&g_sContext, DIR_COLOR);
GrStringDraw(&g_sContext, g_DirData.FileInfo[iIdx].fname,
100, 0, iLine, 1);
}
//
// Change the color for files.
//
else
{
GrContextForegroundSet(&g_sContext, FILE_COLOR);
GrStringDraw(&g_sContext, g_DirData.FileInfo[iIdx].fname,
100, 0, iLine, 1);
}
//
// Move down by the height of the characters used.
//
iLine += g_sFontFixed6x8.ucHeight;
}
}
开发者ID:fejerson108,项目名称:Stellarisware,代码行数:71,代码来源:usb_host_msc.c
示例5: LoadLeftButton
void LoadLeftButton( tContext *context, const char * text){
GrRectFill( context, &myRectangleBotLeft);
GrContextForegroundSet( context, ClrWhite);
GrContextBackgroundSet( context, ClrBlack);
GrStringDrawCentered( context, text, AUTO_STRING_LENGTH, 14, 88, TRANSPARENT_TEXT);
GrContextForegroundSet( context, ClrBlack);
GrContextBackgroundSet( context, ClrWhite);
}
开发者ID:GevenM,项目名称:giip,代码行数:9,代码来源:Buttons.c
示例6: BlankScreen
// Needed since the TivaWare Graphics Library seems to not have a function
// for clearing the display.
void BlankScreen(void)
{
GrContextForegroundSet(&g_sContext, ClrWhite);
GrContextBackgroundSet(&g_sContext, ClrBlack);
GrRectFill(&g_sContext, &(g_sContext.sClipRegion));
GrFlush(&g_sContext);
GrContextForegroundSet(&g_sContext, ClrBlack);
GrContextBackgroundSet(&g_sContext, ClrWhite);
}
开发者ID:DonaldRich,项目名称:Tiva-Sharp-LCD-Interface,代码行数:11,代码来源:main.c
示例7: SystemInit
/**********************************************************************//**
* @brief Initializes the System
*
* @param none
*
* @return none
*************************************************************************/
void SystemInit(void)
{
// Set the DCO to 8MHz (it's also the device's power-on setting). Do not change this frequency!
// It impacts the cap touch scan window.
CS_setDCOFreq(__MSP430_BASEADDRESS_CS__, CS_DCORSEL_0, CS_DCOFSEL_6);
// Configure clock source and clock dividers. After this the clock configuration will be as follows:
// ACLK=LFXT1/1=32,768Hz; SMCLK=DCOCLK/1=8MHz; and MCLK=DCOCLK/1=8MHz.
CS_clockSignalInit(__MSP430_BASEADDRESS_CS__, CS_ACLK, CS_LFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
CS_clockSignalInit(__MSP430_BASEADDRESS_CS__, CS_SMCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1);
CS_clockSignalInit(__MSP430_BASEADDRESS_CS__, CS_MCLK, CS_DCOCLK_SELECT, CS_CLOCK_DIVIDER_1);
// Set all GPIO to output low to minimize current draw by eliminating floating pins.
GPIO_setOutputLowOnPin(GPIO_PORT_PA, GPIO_PIN0 | GPIO_PIN1 | GPIO_PIN2 | GPIO_PIN3 | GPIO_PIN4 | GPIO_PIN5 | GPIO_PIN6 | GPIO_PIN7 | GPIO_PIN8 | GPIO_PIN9 | GPIO_PIN10 | GPIO_PIN11 | GPIO_PIN12 | GPIO_PIN13 | GPIO_PIN14 | GPIO_PIN15);
GPIO_setOutputLowOnPin(GPIO_PORT_PB, GPIO_PIN0 | GPIO_PIN1 | GPIO_PIN2 | GPIO_PIN3 | GPIO_PIN4 | GPIO_PIN5 | GPIO_PIN6 | GPIO_PIN7 | GPIO_PIN8 | GPIO_PIN9 | GPIO_PIN10 | GPIO_PIN11 | GPIO_PIN12 | GPIO_PIN13 | GPIO_PIN14 | GPIO_PIN15);
GPIO_setOutputLowOnPin(GPIO_PORT_PJ, GPIO_PIN0 | GPIO_PIN1 | GPIO_PIN2 | GPIO_PIN3 | GPIO_PIN6 | GPIO_PIN7 | GPIO_PIN8 | GPIO_PIN9 | GPIO_PIN10 | GPIO_PIN11 | GPIO_PIN12 | GPIO_PIN13 | GPIO_PIN14 | GPIO_PIN15);
GPIO_setAsOutputPin(GPIO_PORT_PA, GPIO_PIN0 | GPIO_PIN1 | GPIO_PIN2 | GPIO_PIN3 | GPIO_PIN4 | GPIO_PIN5 | GPIO_PIN6 | GPIO_PIN7 | GPIO_PIN8 | GPIO_PIN9 | GPIO_PIN10 | GPIO_PIN11 | GPIO_PIN12 | GPIO_PIN13 | GPIO_PIN14 | GPIO_PIN15);
GPIO_setAsOutputPin(GPIO_PORT_PB, GPIO_PIN0 | GPIO_PIN1 | GPIO_PIN2 | GPIO_PIN3 | GPIO_PIN4 | GPIO_PIN5 | GPIO_PIN6 | GPIO_PIN7 | GPIO_PIN8 | GPIO_PIN9 | GPIO_PIN10 | GPIO_PIN11 | GPIO_PIN12 | GPIO_PIN13 | GPIO_PIN14 | GPIO_PIN15);
GPIO_setAsOutputPin(GPIO_PORT_PJ, GPIO_PIN0 | GPIO_PIN1 | GPIO_PIN2 | GPIO_PIN3 | GPIO_PIN6 | GPIO_PIN7 | GPIO_PIN8 | GPIO_PIN9 | GPIO_PIN10 | GPIO_PIN11 | GPIO_PIN12 | GPIO_PIN13 | GPIO_PIN14 | GPIO_PIN15);
// Configure the left button (S2) connected to P4.6. For this enable the internal pull-up resistor and
// setup the pin interrupt to trigger on rising edges.
GPIO_setAsInputPinWithPullUpresistor(GPIO_PORT_P4, GPIO_PIN5);
GPIO_interruptEdgeSelect(GPIO_PORT_P4, GPIO_PIN5, GPIO_LOW_TO_HIGH_TRANSITION);
GPIO_clearInterruptFlag(GPIO_PORT_P4, GPIO_PIN5);
GPIO_enableInterrupt(GPIO_PORT_P4, GPIO_PIN5);
// Configure the right button (S3) connected to P1.1. For this enable the internal pull-up resistor and
// setup the pin interrupt to trigger on rising edges.
GPIO_setAsInputPinWithPullUpresistor(GPIO_PORT_P1, GPIO_PIN1);
GPIO_interruptEdgeSelect(GPIO_PORT_P1, GPIO_PIN1, GPIO_LOW_TO_HIGH_TRANSITION);
GPIO_clearInterruptFlag(GPIO_PORT_P1, GPIO_PIN1);
GPIO_enableInterrupt(GPIO_PORT_P1, GPIO_PIN1);
// CapSense Setup. GPIO pins P1.3-1.5 and P3.4-3.6 are used for capacitive touch so let's
// switch them to inputs.
// GPIO_setAsInputPin(GPIO_PORT_P1, GPIO_PIN3 | GPIO_PIN4 | GPIO_PIN5);
GPIO_setAsInputPin(GPIO_PORT_P3, GPIO_PIN4 | GPIO_PIN5 | GPIO_PIN6);
// Enable LFXT functionality on PJ.4 and PJ.5. For this we only need to configure PJ.4 to
// LFXIN and the port module logic takes care of the rest.
GPIO_setAsPeripheralModuleFunctionInputPin(GPIO_PORT_PJ, GPIO_PIN4, GPIO_PRIMARY_MODULE_FUNCTION);
// Disable the GPIO power-on default high-impedance mode to activate previously configured port settings
PMM_unlockLPM5(__MSP430_BASEADDRESS_PMM_FRAM__);
// Perform the required LFXT startup procedure now that all of the port pins are configured.
CS_setExternalClockSource(__MSP430_BASEADDRESS_CS__, 32768, 0);
CS_LFXTStart(__MSP430_BASEADDRESS_CS__, CS_LFXT_DRIVE0);
// Initialize LCD driver and the context for the LCD
Sharp96x96_LCDInit();
TA0_enableVCOMToggle();
GrContextInit(&sContext, &g_sharp96x96LCD);
GrContextForegroundSet(&sContext, ClrBlack);
GrContextBackgroundSet(&sContext, ClrWhite);
onLED(); //blink LED1
}
开发者ID:Michael-DeSando,项目名称:BMS,代码行数:67,代码来源:FR59xx_EXP.c
示例8: vApplicationStackOverflowHook
//*****************************************************************************
//
// This hook is called by FreeRTOS when an stack overflow error is detected.
//
//*****************************************************************************
void
vApplicationStackOverflowHook(xTaskHandle *pxTask, signed char *pcTaskName)
{
tContext sContext;
//
// A fatal FreeRTOS error was detected, so display an error message.
//
GrContextInit(&sContext, &g_sKentec320x240x16_SSD2119);
GrContextForegroundSet(&sContext, ClrRed);
GrContextBackgroundSet(&sContext, ClrBlack);
GrContextFontSet(&sContext, g_psFontCm20);
GrStringDrawCentered(&sContext, "Fatal FreeRTOS error!", -1,
GrContextDpyWidthGet(&sContext) / 2,
(((GrContextDpyHeightGet(&sContext) - 24) / 2) +
24), 1);
//
// This function can not return, so loop forever. Interrupts are disabled
// on entry to this function, so no processor interrupts will interrupt
// this loop.
//
while(1)
{
}
}
开发者ID:RevaReva,项目名称:tiva-c,代码行数:31,代码来源:freertos_demo.c
示例9: SafeRTOSErrorHook
//*****************************************************************************
//
// This hook is called by SafeRTOS when an error is detected.
//
//*****************************************************************************
static void
SafeRTOSErrorHook(xTaskHandle xHandleOfTaskWithError,
signed portCHAR *pcNameOfTaskWithError,
portBASE_TYPE xErrorCode)
{
tContext sContext;
//
// A fatal SafeRTOS error was detected, so display an error message.
//
GrContextInit(&sContext, &g_sKitronix320x240x16_SSD2119);
GrContextForegroundSet(&sContext, ClrRed);
GrContextBackgroundSet(&sContext, ClrBlack);
GrContextFontSet(&sContext, g_pFontCm20);
GrStringDrawCentered(&sContext, "Fatal SafeRTOS error!", -1,
GrContextDpyWidthGet(&sContext) / 2,
(((GrContextDpyHeightGet(&sContext) - 24) / 2) +
24), 1);
//
// This function can not return, so loop forever. Interrupts are disabled
// on entry to this function, so no processor interrupts will interrupt
// this loop.
//
while(1)
{
}
}
开发者ID:Razofiter,项目名称:Luminary-Micro-Library,代码行数:33,代码来源:safertos_demo.c
示例10: lcd_init
void lcd_init(){
Dogs102x64_UC1701Init();
GrContextInit(&g_sContext, &g_sDogs102x64_UC1701);
GrContextForegroundSet(&g_sContext, ClrBlack);
GrContextBackgroundSet(&g_sContext, ClrWhite);
GrContextFontSet(&g_sContext, &g_sFontFixed6x8);
GrClearDisplay(&g_sContext);
}
开发者ID:ansonb,项目名称:CCS-codes-backup,代码行数:8,代码来源:main.c
示例11: DrawToggle
//*****************************************************************************
//
// Draws a toggle button.
//
//*****************************************************************************
void
DrawToggle(const tButtonToggle *psButton, bool bOn)
{
tRectangle sRect;
int16_t i16X, i16Y;
//
// Copy the data out of the bounds of the button.
//
sRect = psButton->sRectButton;
GrContextForegroundSet(&g_sContext, ClrLightGrey);
GrRectFill(&g_sContext, &psButton->sRectContainer);
//
// Copy the data out of the bounds of the button.
//
sRect = psButton->sRectButton;
GrContextForegroundSet(&g_sContext, ClrDarkGray);
GrRectFill(&g_sContext, &psButton->sRectButton);
if(bOn) {
sRect.i16XMin += 2;
sRect.i16YMin += 2;
sRect.i16XMax -= 15;
sRect.i16YMax -= 2;
} else {
sRect.i16XMin += 15;
sRect.i16YMin += 2;
sRect.i16XMax -= 2;
sRect.i16YMax -= 2;
}
GrContextForegroundSet(&g_sContext, ClrLightGrey);
GrRectFill(&g_sContext, &sRect);
GrContextFontSet(&g_sContext, &g_sFontCm16);
GrContextForegroundSet(&g_sContext, ClrBlack);
GrContextBackgroundSet(&g_sContext, ClrLightGrey);
i16X = sRect.i16XMin + ((sRect.i16XMax - sRect.i16XMin) / 2);
i16Y = sRect.i16YMin + ((sRect.i16YMax - sRect.i16YMin) / 2);
if(bOn) {
GrStringDrawCentered(&g_sContext, psButton->pcOn, -1, i16X, i16Y,
true);
} else {
GrStringDrawCentered(&g_sContext, psButton->pcOff, -1, i16X, i16Y,
true);
}
if(psButton->pcLabel) {
GrStringDraw(&g_sContext, psButton->pcLabel, -1,
psButton->sRectButton.i16XMax + 2,
psButton->sRectButton.i16YMin + 6,
true);
}
}
开发者ID:peterliu2,项目名称:tivaWare,代码行数:63,代码来源:screen.c
示例12: print_string
void print_string(int column,int row,char *s){
GrContextForegroundSet(&g_sContext, ClrBlack);
GrContextBackgroundSet(&g_sContext, ClrWhite);
GrStringDraw(&g_sContext,
s,
AUTO_STRING_LENGTH,
column,
row,OPAQUE_TEXT);
}
开发者ID:ansonb,项目名称:CCS-codes-backup,代码行数:10,代码来源:main.c
示例13: print_char
void print_char(int column,int row,const char s){
GrContextForegroundSet(&g_sContext, ClrBlack);
GrContextBackgroundSet(&g_sContext, ClrWhite);
char S[2] = {s, 0};
GrStringDraw(&g_sContext,
S,
AUTO_STRING_LENGTH,
column,
row,OPAQUE_TEXT);
}
开发者ID:ansonb,项目名称:Msp430f5529-experimenter-board-function-library,代码行数:11,代码来源:ECW.c
示例14: PrintBasTmpActive
void PrintBasTmpActive(tContext *context, y_menus f_menuChoice){
char outString[32];
unsigned char text_start = 18;
// Draw top and bottom banner and buttons
LoadLeftButton( context , "BACK");
LoadMiddleButton( context , "SEL");
//LoadRightButton("");
// Menu options
GrStringDraw(context, "Start Profile", AUTO_STRING_LENGTH, 5, 18, OPAQUE_TEXT);
GrStringDraw(context, "Stop Temporary", AUTO_STRING_LENGTH, 5, 31, OPAQUE_TEXT);
GrStringDraw(context, "Manage Profiles", AUTO_STRING_LENGTH, 5, 44, OPAQUE_TEXT);
// Highlight selected item
switch (f_menuChoice) {
case Basal_StartProfile:
text_start = 18;
strcpy(outString, "Start Profile");
break;
case Basal_StopTmp:
text_start = 31;
strcpy(outString, "Stop Temporary");
break;
case Basal_Manage:
text_start = 44;
strcpy(outString, "Manage Profiles");
break;
default: break;
}
GrContextForegroundSet(context, ClrWhite); //ClrBlack this affects the highlight color
GrContextBackgroundSet(context, ClrBlack); //ClrWhite this affects the text color in the highlight
GrStringDraw(context, outString, AUTO_STRING_LENGTH, 5, text_start, OPAQUE_TEXT);
GrContextForegroundSet(context, ClrBlack);
GrContextBackgroundSet(context, ClrWhite);
}
开发者ID:GevenM,项目名称:giip,代码行数:39,代码来源:PrintBasal_TmpActive.c
示例15: print_int
void print_int(int column,int row,int n){
GrContextForegroundSet(&g_sContext, ClrBlack);
GrContextBackgroundSet(&g_sContext, ClrWhite);
char s[10];
snprintf(s,10,"%d",n);
GrStringDraw(&g_sContext,
s,
AUTO_STRING_LENGTH,
column,
row,TRANSPARENT_TEXT);
}
开发者ID:ansonb,项目名称:CCS-codes-backup,代码行数:13,代码来源:main.c
示例16: AnimateButtons
//*****************************************************************************
//
// Animate Buttons.
//
//*****************************************************************************
void
AnimateButtons(bool bInit)
{
if(bInit) {
g_sButtons.i32X = 0;
g_sButtons.i32Y = 0;
g_sButtons.bEnabled = true;
g_sButtons.bActive = false;
g_sButtons.ui32Delay = 0;
} else if(g_sButtons.bEnabled == false) {
//
// Just return if the buttons are not on screen.
//
return;
}
if(g_sButtons.ui32Delay == 0) {
g_sButtons.ui32Delay = 6;
GrContextForegroundSet(&g_sContext, ClrBlack);
GrContextBackgroundSet(&g_sContext, ClrGray);
if((bInit == false) || (g_sButtons.bActive == true)) {
//
// Update the buttons.
//
DrawButtons(g_sButtons.i32X - g_sButtons.i32Y, true);
if(g_sButtons.i32X < 3) {
g_sButtons.i32X++;
} else {
g_sButtons.i32Y++;
}
}
if(g_sButtons.bActive == false) {
//
// Update the buttons.
//
DrawButtons(g_sButtons.i32X - g_sButtons.i32Y, false);
if(g_sButtons.i32Y >= 3) {
g_sButtons.bActive = true;
g_sButtons.ui32Delay = 6;
}
} else if((g_i32ScreenIdx == SCREEN_SUMMARY) ||
(g_i32ScreenIdx == SCREEN_DETAILS)) {
ButtonsDisable();
}
}
}
开发者ID:peterliu2,项目名称:tivaWare,代码行数:56,代码来源:screen.c
示例17: configDisplay
void configDisplay(void)
{
// Enable use of external clock crystals
P5SEL |= (BIT5|BIT4|BIT3|BIT2);
// Set up LCD -- These function calls are part on a TI supplied library
Dogs102x64_UC1701Init();
GrContextInit(&g_sContext, &g_sDogs102x64_UC1701);
GrContextForegroundSet(&g_sContext, ClrBlack);
GrContextBackgroundSet(&g_sContext, ClrWhite);
GrContextFontSet(&g_sContext, &g_sFontFixed6x8);
GrClearDisplay(&g_sContext);
GrFlush(&g_sContext);
}
开发者ID:Lumbini,项目名称:MSP430_Hero,代码行数:14,代码来源:peripherals.c
示例18: UpdateStatus
//*****************************************************************************
//
// This function updates the status area of the screen. It uses the current
// state of the application to print the status bar.
//
//*****************************************************************************
void
UpdateStatus(char *pcString, tBoolean bClrBackground)
{
tRectangle sRect;
//
// Fill the bottom rows of the screen with blue to create the status area.
//
sRect.sXMin = 0;
sRect.sYMin = GrContextDpyHeightGet(&g_sContext) -
DISPLAY_BANNER_HEIGHT - 1;
sRect.sXMax = GrContextDpyWidthGet(&g_sContext) - 1;
sRect.sYMax = sRect.sYMin + DISPLAY_BANNER_HEIGHT;
//
//
//
GrContextBackgroundSet(&g_sContext, DISPLAY_BANNER_BG);
if(bClrBackground)
{
//
// Draw the background of the banner.
//
GrContextForegroundSet(&g_sContext, DISPLAY_BANNER_BG);
GrRectFill(&g_sContext, &sRect);
//
// Put a white box around the banner.
//
GrContextForegroundSet(&g_sContext, DISPLAY_BANNER_FG);
GrRectDraw(&g_sContext, &sRect);
}
//
// Write the current state to the left of the status area.
//
GrContextFontSet(&g_sContext, g_pFontFixed6x8);
//
// Update the status on the screen.
//
if(pcString != 0)
{
GrStringDraw(&g_sContext, pcString, -1, 4, sRect.sYMin + 4, 1);
}
}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:53,代码来源:usb_dev_msc.c
示例19: devpkLcdInvert
/*******************************************************************************
* @fn devpkLcdInvert
*
* @brief Inverts the foreground and background colours
*
* @return true if success
*/
bool devpkLcdInvert(void)
{
if (hLcdPin != NULL)
{
uint32_t tmp;
// Swap background and foreground
tmp = display.fg;
display.fg = display.bg;
display.bg = tmp;
GrContextForegroundSet(&g_sContext, display.fg);
GrContextBackgroundSet(&g_sContext, display.bg);
GrClearDisplay(&g_sContext);
GrFlush(&g_sContext);
}
return hLcdPin != 0;
}
开发者ID:ClarePhang,项目名称:ALL_SmartBatterySwitch_CC2640,代码行数:27,代码来源:devpk_lcd.c
示例20: ClearTextBox
//*****************************************************************************
//
// This function clears out the text area used to display the directory
// contents.
//
// \param None.
//
// This function is used to clear out the text area used to display the
// directory contents.
//
// \return None.
//
//*****************************************************************************
void
ClearTextBox(void)
{
tRectangle TextBox;
TextBox.sXMin = 0;
TextBox.sYMin = TOP_HEIGHT;
TextBox.sXMax = g_sFormike128x128x16.usWidth - 1;
TextBox.sYMax = g_sFormike128x128x16.usHeight - 1;
//
// Set the fill color.
//
GrContextForegroundSet(&g_sContext, BACKGROUND_COLOR);
//
// Fill the text area with the fill color.
//
GrRectFill(&g_sContext, &TextBox);
GrContextForegroundSet(&g_sContext, FILE_COLOR);
GrContextBackgroundSet(&g_sContext, ClrBlack);
}
开发者ID:fejerson108,项目名称:Stellarisware,代码行数:36,代码来源:usb_host_msc.c
注:本文中的GrContextBackgroundSet函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论