📄 sdrv_draw3drect.c
字号:
/*
********************************************************************************
* ACTOS
* ui dirver show picture
*
* (c) Copyright 2002-2003, Actions Co,Ld.
* All Right Reserved
*
* File : UI_Draw3DRect.c
* By : Rcmai
* Version: 1> v1.00 first version 10/17/2003 10:46PM
********************************************************************************
*/
#include "display.h"
#include "Drv_S6B33B0A.h"
#pragma memory=constseg(BAS_DW2)
#pragma memory=default
#pragma memory=dataseg(BAD_DW2)
//SD_RW sdrw;
//extern unsigned char BufPage;
#pragma memory=default
#pragma codeseg(BAC_DW2)
////*******************************************************************************/
///* 把指定区域填充成画笔颜色
//** FUNCTION: Draw3DRect
//**
//** Description:
//**
//** input
//** region_t * D3region: 要画3D区域的区域大小
//**
//** output
//** none
//********************************************************************************/
void Sdrv_Draw3DRect (region_t * D3region, unsigned char type)
{
COLORREF PenColor_bak;
PenColor_bak = dc.PenColor;//保存当前画笔颜色
switch (type)
{
case D3Normalframe_def://加选中框
dc.PenColor = SelectedColor_def;
BAPI_DrawRectFrame(D3region);
break;
case D3KeyUp_def://加突出效果
//先画两条背光边
dc.PenColor = BackLightColor_def;
region = *D3region;
region.height = 1;
region.y = D3region->y + D3region->height;
BAPI_FillRect(®ion);
region = *D3region;
region.width = 1;
region.x = D3region->x + D3region->width;
BAPI_FillRect(®ion);
//再画两条向光边
dc.PenColor = FaceLightColor_def;
region = *D3region;
region.height = 1;
BAPI_FillRect(®ion);
region = *D3region;
region.width = 1;
BAPI_FillRect(®ion);
break;
case D3KeyDown_def://加凹进效果
//先画两条背光边
dc.PenColor = BackLightColor_def;
region = *D3region;
region.height = 1;
BAPI_FillRect(®ion);
region = *D3region;
region.width = 1;
BAPI_FillRect(®ion);
//再画两条向光边
dc.PenColor = FaceLightColor_def;
region = *D3region;
region.height = 1;
region.y = D3region->y + D3region->height;
BAPI_FillRect(®ion);
region = *D3region;
region.width = 1;
region.x = D3region->x + D3region->width;
BAPI_FillRect(®ion);
break;
default:
break;
}
dc.PenColor = PenColor_bak;//恢复画笔颜色
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -