跳转到主要内容

配置视图

在“配置视图”中,包含工程的各种设置:常规, 屏显, 默认图像设置, 文本设置, 仿真器, 创建 以及 框架特性.

“配置视图”中的常规设置

常规设置

“配置视图”中的常规设置

Application Name

Application name is a readonly field, displaying the name that was chosen for the application when it was created.

TouchGFX Board Setup

This field shows the TouchGFX Board Setup the application was created with, if this information is not available 'N/A' will be displayed.
If this information is available, the name of the TouchGFX Board Setup will be displayed along with the version.

Selected Language

This dropdown contains the languages configured in the Texts View, and selects which language should be displayed at startup of the project.

Startup Screen

This dropdown contains all the screens that have been added to the project, and selects which screen to display at startup of the project.

屏显设置

该部分,可以配置屏显参数。

“配置视图”中的屏显设置

Dimensions

The size of the display can be set through the W(width) and H(height) properties. 但是,如果已经通过TouchGFX板设置配置了尺寸,此处的尺寸配置功能将会被禁用。

Display Orientation

The orientation of the display can be toggled between Landscape and Portrait orientations. 该属性会影响到工程中的所用图像转换为cpp文件的方式。

Color Depth

This dropdown contains the color depths that are available to a project. 这些设置取决于工程创建时使用的TouchGFX板级设置。

默认图像设置

在该部分,可以设置工程使用的图像默认设置。 这些设置将对工程中的所有图像生效,除非它们在图像视图中被覆盖

“配置视图”中的“默认图像设置”

Opaque Image Format

This dropdown sets which format images that have only opaque pixel data should be generated with. 此下拉列表中的可用图像格式取决于工程选定的色深参数。

Non Opaque Image Format

This dropdown sets which format images that have non-opaque pixel data should be generated with. 此下拉列表中的可用图像格式取决于工程选定的色深参数。

Section

This dropdown sets the location where image data should be stored on the target hardware. 此下拉列表中的可供选择的存储区取决于创建工程时使用的TouchGFX板设置。

Extra Section

When using L8 image formats you can choose to store the color table in a different section using this dropdown. 此下拉列表中的可供选择的存储区取决于创建工程时使用的TouchGFX板设置。

Dither Algorithm

This dropdown sets the dithering algorithm used for images.

  • 不抖色: 对图像不使用抖色算法, 由于不使用图像处理,所以该设置性能最高。 然而,当色深较低时可能会看到图像质量下降,这具体取决于图像本身。
  • 弗洛伊德-斯坦伯格算法: 将误差扩散于相邻像素,细粒度抖色,但会牺牲清晰度。
  • 贾维斯, 朱迪斯和尼克算法: 与弗洛伊德-斯坦伯格算法相比,会将误差进一步扩散到更远像素,因此抖色更粗糙,但图像更清晰。 是3种误差扩散抖色算法中最慢的一种。
  • 斯塔基算法:基于最小平均误差抖色,但更快更清晰。

Alpha Dither

This dropdown sets whether or not to use the dither algorithm through the alpha channel.

Layout Rotation

This dropdown specifies the rotation of the image data when generated. 如果屏显方向发生改变,使用此选项按新屏显方向正确渲染图像。

文本设置

该部分选项,以复选框形式展现,用户可以选择来设置文本渲染和存储形式。

“配置视图”中的“文本设置”

Remap texts

This option defines whether or not translations that are identical should be remapped. 重新映射文本将在所有语言,字符表以及对齐方式中将相同的翻译及后缀统一起来,这将缩减数据大小。
该选项与'二进制翻译文件'选项互斥。

A4

This option defines whether or not the horizontal pixel data of glyphs byte are aligned into an A4 format.
This only affects typographies that are configured as 4bpp

Binary translation files

This option defines whether or not the translations in a project should be moved into binary files that can be loaded at runtime.
This option is mutually exclusive with the option 'Remap texts'

Binary font files

This option defines whether or not the font files in a project should be moved into binary files that can be loaded at runtime.

Mapped storage format

This option defines if the font files in a project should be output in mapped storage format.

Unmapped storage format

This option defines if the font files in a project should be output in unmapped storage format.

Further reading

仿真器设置

在该部分,可以在运行仿真器时为其添加皮肤。 横屏和竖屏显示项目均可。 XY 属性决定仿真器在皮肤中的位置。

“配置视图”中的仿真器设置

下面就是一个带皮肤仿真器运行时的示例。
当带皮肤的仿真器运行时,标准窗口控件会被隐藏起来。 关闭仿真器请按 Esc键。

带皮肤的仿真器运行展示

创建设置

在这里,可以更改当点击“仿真器运行”“目标板运行”“生成代码”时执行的指令。

如需重写指令,可在文本框中写入。 如需复原,点击指令名称旁边的“重置”标签即可。

“配置视图”中的创建设置

Generate Assets Command

通常设置此指令来生成文本和图像资源,在TouchGFX Designer生成代码后执行。

Post Generate Command

This command is usually used to update various project files. 内置命令行工具touchgfx update_project支持更新以下项目文件:

  • Visual Studio (.vcxproj)
  • Keil (.uvprojx)
  • IAR (.ewp & .ipcf)
  • STM32CubeIDE (.project & .cproject)
  • STM32CubeMX (.ioc)

当然,在这里可以写入任何需要在生成代码后执行的指令。

Compile Simulator Command

This command executes the compilation of a project for the simulator, usually by executing the Makefile generated by the TouchGFX Designer.

Run Simulator Command

This command executes the startup of the simulator.exe.

Post Generate Target Command

This command is usually used to update various project files, mostly STM32CubeMX (.ioc) project files.

当然,在这里可以写入任何需要在生成代码后执行的指令。

Compile Target Command

This command executes the compilation of a project for the target hardware.

Flash Target Command

This command executes the flashing of a project to the target hardware.

Flash Target Internal Command

This command executes the flashing of a project to the target hardware when the Flash Internal option is enabled.

框架特性

在这里,可以启用/禁用框架中的特性,特别是纹理映射器控件支持的图像格式特性。 可用于优化目标硬件工程代码量。

这里显示出来的可用选项取决于为工程选择的色深。 下图显示了24位色深纹理映射器的图像格式。

“配置视图”中24bpp的框架特性设置