Hi,
I have the problem, that drawing an antialiased object doesn't look good if i just draw it once.
I wrote a little test to compare the different level of AA in a state machine:
In the following picture you can see the different steps of AA. The left one is without while the one on the right is with the highest AA level.
You can see that the rounded rect on the right looks bad in comparison to the other AA circles. This happens when I remove the for loop in the code above and run GUI_AA_DrawRoundesRect just once.
In all examples if have seeen the AA objects get just written once. I have to write it several times. If the AA level is 6 I have to draw it 6 times in a for loop to look good. If the AA level is 2 I have to draw it 2 times in a for loop to look good.
The same thing happens if I use memory devices and DrawAuto and HiRes:
Display All
Here you can see the how the code above looks when the for loop is removed and GUI_AA_DrawRoundedRect is just done once for each rounded rect.
Are some of my settings wrong?
I use the FlexColor Driver, 565 Color, Cache enabled, GUI_NUM_LAYERS set to 1.
Drawing multiple times takes a long time. Using memory devices helps a lot but it still takes quite a bit of time.
Best regards
Lukas
I have the problem, that drawing an antialiased object doesn't look good if i just draw it once.
I wrote a little test to compare the different level of AA in a state machine:
C Source Code
- case 5:
- GUI_ClearRect(100, 17, 118, 37);
- GUI_ClearRect(radius + 75 - 1, 0, radius + 115, 15);
- GUI_AA_SetFactor(6); // 1 (no anti aliasing, default: 3; maximum: 6.
- for (int x = 0; x < y + 1; x++)
- {
- GUI_AA_DrawRoundedRect(100, 17, 118, 37, radius);
- }
- GUI_DispStringAt("AA factor 6.", 0 + 40, 0 + 40);
- break;
You can see that the rounded rect on the right looks bad in comparison to the other AA circles. This happens when I remove the for loop in the code above and run GUI_AA_DrawRoundesRect just once.
In all examples if have seeen the AA objects get just written once. I have to write it several times. If the AA level is 6 I have to draw it 6 times in a for loop to look good. If the AA level is 2 I have to draw it 2 times in a for loop to look good.
The same thing happens if I use memory devices and DrawAuto and HiRes:
C Source Code
- GUI_MEMDEV_DrawAuto(&aAuto[6], &Param.AutoInfo, _DrawRect, &Param);
- static void _DrawRect(void * p)
- {
- PARAM_testCase002 * pParam = (PARAM_testCase002 *) p;
- /* Fixed background */
- GUI_AA_DisableHiRes();
- if (pParam->AutoInfo.DrawFixed)
- {
- GUI_ClearRect(pParam->x1, pParam->y1, pParam->x2 + 1, pParam->y2 + 1);
- }
- /* Moving Part */
- GUI_AA_EnableHiRes();
- GUI_SetPenSize(1);
- for (int i = 0; i < pParam->factor; i++)
- {
- GUI_AA_DrawRoundedRect(pParam->x1 * pParam->factor, pParam->y1 * pParam->factor, pParam->x2 * pParam->factor, pParam->y2 * pParam->factor,
- pParam->radius * pParam->factor);
- }
- GUI_AA_DisableHiRes();
- }
Are some of my settings wrong?
I use the FlexColor Driver, 565 Color, Cache enabled, GUI_NUM_LAYERS set to 1.
Drawing multiple times takes a long time. Using memory devices helps a lot but it still takes quite a bit of time.
Best regards
Lukas