|
画笔结构体如下:
- typedef struct GX_BRUSH_STRUCT
- {
- GX_PIXELMAP *gx_brush_pixelmap; /* 用于位图 */
- GX_FONT *gx_brush_font; /* 用于文本字体 */
- ULONG gx_brush_line_pattern; /* 用于虚线绘制 */
- ULONG gx_brush_pattern_mask; /* 用于虚线绘制 */
- GX_COLOR gx_brush_fill_color; /* 填充颜色值 */
- GX_COLOR gx_brush_line_color; /* 画线颜色值 */
- UINT gx_brush_style; /* 画笔样式 */
- GX_VALUE gx_brush_width; /* 画笔线宽 */
- UCHAR gx_brush_alpha; /* 用于Alpha混合 */
- } 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. |
|