メイン・コンテンツまでスキップ

VGShape

touchgfx/hal/VGData.hpp

Data structure for a vector shape (polygon, circle, path, etc.). Shapes can be linked in a list using the next member. Shapes are linked to by a VGObject. Which thereby consists of a number of Shapes. Each shape has attributes, e.g. strokeWidth, that is used when drawing the paths in the Shape.

All coordinates and sizes (e.g. strokeWidth) are not translated by any transform given in the svg. This has to be done when drawing.

Public Attributes​

floatboundingbox
Un-transformed bounding box for this Shape [xmin, ymin, xmax, ymax] excluding strokeWidth.
const uint8_t *commands
The paths commands.
VGFillModedrawingMode
Polygon fill mode for this shape.
uint8_tfillAlpha
Alpha of this shape's fill in the range [0;255].
VGColorModefillMode
Fill coloring mode for this shape.
const void *fillPaint
Filling painter object or null if not filled.
const VGShape *next
Pointer to the next Shape.
uint16_tnumCommands
Number of commands in the paths.
uint16_tnumPoints
Number of coordinate floats in the paths.
const float *points
The paths coordinates.
uint8_tstrokeAlpha
Alpha of this shape's stroke in the range [0;255].
VGStrokeLineCapstrokeLineCap
The stroke line cap visual.
VGStrokeLineJoinstrokeLineJoin
The stroke line join.
floatstrokeMiterLimit
The stroke miter limit.
VGColorModestrokeMode
Stroke coloring mode for this shape.
const void *strokePaint
Stroking painter object or null if not stroked.
floatstrokeWidth
Stroke width to use when drawing this shape.
floattransformation
The transformation matrix to apply before drawing.

Public Attributes Documentation​

boundingbox​

float boundingbox

Un-transformed bounding box for this Shape [xmin, ymin, xmax, ymax] excluding strokeWidth.

commands​

const uint8_t * commands

The paths commands.

drawingMode​

VGFillMode drawingMode

Polygon fill mode for this shape.

fillAlpha​

uint8_t fillAlpha

Alpha of this shape's fill in the range [0;255].

fillMode​

VGColorMode fillMode

Fill coloring mode for this shape.

fillPaint​

const void * fillPaint

Filling painter object or null if not filled.

next​

const VGShape * next

Pointer to the next Shape.

numCommands​

uint16_t numCommands

Number of commands in the paths.

numPoints​

uint16_t numPoints

Number of coordinate floats in the paths.

points​

const float * points

The paths coordinates.

strokeAlpha​

uint8_t strokeAlpha

Alpha of this shape's stroke in the range [0;255].

strokeLineCap​

VGStrokeLineCap strokeLineCap

The stroke line cap visual.

strokeLineJoin​

VGStrokeLineJoin strokeLineJoin

The stroke line join.

strokeMiterLimit​

float strokeMiterLimit

The stroke miter limit.

strokeMode​

VGColorMode strokeMode

Stroke coloring mode for this shape.

strokePaint​

const void * strokePaint

Stroking painter object or null if not stroked.

strokeWidth​

float strokeWidth

Stroke width to use when drawing this shape.

transformation​

float transformation

The transformation matrix to apply before drawing.