硬汉嵌入式论坛

 找回密码
 立即注册
查看: 4333|回复: 0
收起左侧

[ThreadX全家桶] ThreadX GUIX的画笔brush支持的样式

[复制链接]

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
115804
QQ
发表于 2020-9-13 17:42:07 | 显示全部楼层 |阅读模式


画笔结构体如下:
  1. typedef struct GX_BRUSH_STRUCT
  2. {
  3.     GX_PIXELMAP *gx_brush_pixelmap;            /* 用于位图       */
  4.     GX_FONT     *gx_brush_font;                /* 用于文本字体   */
  5.     ULONG        gx_brush_line_pattern;        /* 用于虚线绘制   */
  6.     ULONG        gx_brush_pattern_mask;        /* 用于虚线绘制   */
  7.     GX_COLOR     gx_brush_fill_color;          /* 填充颜色值     */
  8.     GX_COLOR     gx_brush_line_color;          /* 画线颜色值     */
  9.     UINT         gx_brush_style;               /* 画笔样式       */
  10.     GX_VALUE     gx_brush_width;               /* 画笔线宽       */
  11.     UCHAR        gx_brush_alpha;               /* 用于Alpha混合 */
  12. } GX_BRUSH;
复制代码


画笔支持的样式如下,这些样式可以或操作:


GX_BRUSH_OUTLINE
- Value: 0x0000
- Description: This brush style applies to shape drawing functions
such as gx_canvas_rectangle_draw or gx_canvas_polygon_draw.
This style indicateds the shape should be outlined, in addition to
optionally being fill. If the GX_BRUSH_OUTLINE style is set and the
GX_BRSUH_SOLID_FILL is cleared, the shape is only outlined.


GX_BRUSH_SOLID_FILL
- Value: 0x0001
- Description: This brush style applies to shape drawing functions,
and indicates that the requested shape should be filled with a solid
color using the current brush fill color.


GX_BRUSH_PIXELMAP_FILL
- Value: 0x0002
- Description: This brush style applies to shape drawing functions,
and indicates that the requested shape should be pattern filled with
the current brush pixelmap.


GX_BRUSH_ALIAS
- Value: 0x0004
- Description: This brush style applies to all line drawing and shape
outlines. If this flag is set, lines and outlines are drawing with the
more accurate but also more time consuming anti-aliased drawing
algorithms. This style flag is only used for 16-bpp color depths and
higher.


GX_BRUSH_UNDERLINE
- Value: 0x0008
- Description: This flag applies to text drawing, and indicates that
subsequent text drawn should be underlined.


GX_BRUSH_ROUND
- Value: 0x0010
- Description: This flag applies to line drawing, and indicates that line
ends are drawn with a round or circular shape, rather than the
default square shape.


GX_CANVAS_SIMPLE
- Value: 0x01
- Description: A memory canvas which is used to off-screen drawing.


GX_CANVAS_MANAGED
- Value: 0x02
- Description: A canvas which automatically flushed to the active
display, either as part of the composite building process or as part of
the buffer toggle operation for single-canvas architectures.


GX_CANVAS_VISIBLE
- Value: 0x04
- Description: This flag can be used to turn on and off a canvas,
without losing the canvas drawing contents.


GX_CANVAS_MODIFIED
- Value: 0x08
- Description: Reserved for future use.


GX_CANVAS_COMPOSITE
- Value: 0x20
- Description: This flag is used by the application when configuring a
multiple-canvas system which will composite multiple managed
canvases into the composite canvas, and the composite is the
driven to the hardware frame buffer.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2025-5-19 21:16 , Processed in 0.206461 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表