GUI_DrawPie() with Antialiasing ??

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • GUI_DrawPie() with Antialiasing ??

      Hi,

      When using GUI_DrawPie(), i noticed that the function does not use anti-aliasing.
      So, i was wondering if there is an anti-aliased function for drawing a pie like it's the case for drawing circles, lines ... ?
      If not, is it possible to implement one with basic drawing emWin function which support anti-aliasing ? (if someone got an idea how to do that, could you please share it).

      N.B : I am using STemWin v5.40 library in the binary format, so I don't have access to GUI_DrawPie() source code.
    • Hi,

      Unfortunately, there is no such function using anti aliasing.

      You could draw an anti aliased circle and the opposite of the pie over it (like cutting a piece out of it). Maybe like this:

      Source Code

      1. GUI_SetBkColor(GUI_BLACK);
      2. GUI_Clear();
      3. GUI_SetColor(GUI_WHITE);
      4. GUI_AA_FillCircle(100, 100, 50);
      5. GUI_SetColor(GUI_BLACK);
      6. GUI_DrawPie(100, 100, 53, 30 + 180, 200 + 180, 0);
      Now you have an anti aliased rounding. To get the straight part of the pie anti aliased draw some AA lines over it.

      Regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.