Draw Acceleration for Anti Aliased Text - mchpgfx/legato.docs GitHub Wiki

Microchip Technology Draw Acceleration for Anti-Aliased Text

Introduction - Scheme Acceleration

Scheme Acceleration feature is introduced as of gfx-v3.11.x. The feature lets Schemes to generate with a look-up table of pre-calculated alpha-blended foreground and background colors. This look-up table is used to render text on Label widgets and eliminates the need for run-time alpha-blending.

This improves draw performance for anti-aliased text. It works even when alpha-blending is disabled in the library.

NOTE: As of gfx-v3.11.1, Scheme Acceleration only works for Button and Label widgets.

Setting Up

  1. Select a scheme to accelerate in Composer, click the Accelerate Scheme button

Accelerate Scheme Button

  1. In the Scheme Acceleration Table Configuration Dialog box, check Base for Background and Text for Foreground. This will tell composer to generate a LUT that has the alpha-blended values for the Text color over the Base background color.

Scheme Acceleration Configuration Table

  1. Use this accelerate scheme in the Label widgets and enable Background Fill.

Scheme Acceleration Label Widget

With this feature, alpha-blending is not required in the Renderer settings for anti-aliased text. If you are using RGB565 RAW images and do not need alpha blending for your widgets, you can disable alpha blending in Composer to accelerate rendering overall.

Scheme Acceleration Project Renderer Settings