📄 aa_hirespixels.c
字号:
/*********************************************************************************************************** uC/GUI* Universal graphic software for embedded applications** (c) Copyright 2002, Micrium Inc., Weston, FL* (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH** 礐/GUI is protected by international copyright laws. Knowledge of the* source code may not be used to write a similar product. This file may* only be used in accordance with a license and should not be redistributed* in any way. We appreciate your understanding and fairness.*----------------------------------------------------------------------File : AA_HiResPixels.cPurpose : Demonstrates high resolution pixels----------------------------------------------------------------------*/#include "GUI.H"/********************************************************************* Show lines placed on high resolution pixels**********************************************************************/static void ShowHiResPixels(void) { int i, Factor = 5; GUI_SetBkColor(GUI_WHITE); GUI_SetColor(GUI_BLACK); GUI_Clear(); GUI_SetLBorder(50); GUI_DispStringAt("This sample uses high resolution pixels.\n", 50, 10); GUI_DispString ("Not only the physical pixels are used.\n"); GUI_DispString ("Enabling high resolution simulates more\n"); GUI_DispString ("pixels by using antialiasing.\n"); GUI_DispString ("Please take a look at the magnified output\n"); GUI_DispString ("to view the result.\n"); GUI_SetPenSize(2); GUI_SetPenShape(GUI_PS_FLAT); GUI_AA_EnableHiRes(); /* Enable high resolution */ GUI_AA_SetFactor(Factor); /* Set quality factor */ /* Drawing lines using high resolution pixels */ for (i = 0; i < Factor; i++) { int x = (i + 1) * 5 * Factor + i - 1; GUI_AA_DrawLine(x, 50, x, 199); }}/********************************************************************* main**********************************************************************/void main(void) { GUI_Init(); ShowHiResPixels(); while(1) { GUI_Delay(100); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -