|
![]() |
| Latest News : | Date: | Bookmark |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| API function | Without memory device | With memory device |
| Step 0: Initial state | ![]() |
![]() |
| Step 1: GUI_Clear | ![]() |
![]() |
| Step 2: GUI_DrawPolygon | ![]() |
![]() |
| Step 3: GUI_DispString | ![]() |
![]() |
| Step 4: GUI_MEMDEV_CopyToLCD(only when using memory device) | ![]() |
The following routines are those that are typically used with memory devices. Basic usage is rather simple:
Memory devices are enabled by default. In order to optimize performance of the software, support for memory devices can be switched off in the configuration file GUIConf.h with the following line:
#define GUI_SUPPORT_MEMDEV 0
If this line is in the configuration file and you want to use memory devices, either delete the line or change the define to 1.
The table below lists the available routines of the emWin memory device
API.
All functions are listed in alphabetical order within their respective
categories. Detailed descriptions of the routines can be found in the
sections that follow.
| Routine | Explanation |
| Basic functions | |
| GUI_MEMDEV_Create | Create the memory device (first step). |
| GUI_MEMDEV_CopyToLCD | Copy contents of memory device to LCD. |
| GUI_MEMDEV_Delete | Free the memory used by the memory device. |
| GUI_MEMDEV_Select | Select a memory device as target for drawing operations. |
| Advanced features | |
| GUI_MEMDEV_Clear | Mark the memory device contents as unchanged. |
| GUI_MEMDEV_CopyFromLCD | Copy contents of LCD to memory device. |
| GUI_MEMDEV_CopyToLCDAA | Copy the contents of memory device antialiased. |
| GUI_MEMDEV_GetYSize | Return the Y-size of memory device. |
| GUI_MEMDEV_ReduceYSize | Reduce Y-size of memory device. |
| GUI_MEMDEV_SetOrg | Change the origin of the memory device on the LCD. |
| Banding memory device | |
| GUI_MEMDEV_Draw | Use a memory device for drawing. |
| Auto device object functions | |
| GUI_MEMDEV_CreateAuto | Create an auto device object. |
| GUI_MEMDEV_DeleteAuto | Delete an auto device object. |
| GUI_MEMDEV_DrawAuto | Use a GUI_AUTODEV object for drawing. |
The size of available memory is normally not enough to cover the whole drawing area. A banding memory device divides the drawing area into bands. One band covers as many lines as possible with the currently available memory.
Take a look at the c-code and
download the demo file here.
An auto device object is often preferred for applications such as moving pointers, in which only a small part of the display is updated at a time. The device automatically distinguishes which parts of the display consist of fixed items and which parts consist of moving or changing items. When the drawing function for the auto device object is called for the first time, it draws all items. Each further call updates only the space used by the moving or changing objects. The actual drawing operation uses the banding memory device, but only within the necessary area. The main advantage of using an auto device object is that it saves computation time, since it does not keep updating the entire display.
Take a look at the c-code and download
the demo file here.
Return to main emWin page...
You can download an evaluation
version of emWin from our Literature/Download section....
Abatron | Adeneo
Embedded | ADI
Engineering | Blackhawk | Corelis | Domain
Technologies | e-con
Systems
EMA
TimingDesigner | Embedded
Planet | Entrek | EPI/Mentor |
FlatOak |
Intel
Software | IntervalZero
Microcross | Microsoft
Embedded | Segger | Signum | Sophia | SwiftModule | Tasking | TRITON
Modules
Products
by Processor | Products
by Supplier | Boards & Modules
| Segger News |
| NEWS: Tools |
| 30-day free evaluation |
| Literature Centre |
|
| << Backward | Forward >> | Top of Page |
|
Copyright
© 2001 -
Direct Insight Ltd |