Cookies info

This website uses Google cookies to analyse traffic. Information about your use of our site is shared with Google for that purpose. See details.

Drawing Context

API States [4]

OpenVG functions that perform drawing, or that modify or query drawing state make use of an implicit drawing context. A context is created, attached to a drawing surface, and bound to a running application thread outside the scope of the OpenVG API. OpenVG API calls are executed with respect to the context currently bound to the thread in which they are executed. When an image, paint, path, font, or mask handle is defined, it is permanently attached to the context that is current at that time. The context is responsible for maintaining the OpenVG API state, as shown in the table:

Drawing SurfaceSurface for drawing
Matrix ModeTransformation to be manipulated
Path user-to-surface TransformationAffine transformation for filled and stroked geometry
Image user-to-surface TransformationAffine or projective transformation for images
Paint-to-user TransformationsAffine transformations for paint applied to geometry
Glyph user-to-surface TransformationAffine transformation for glyphs
Glyph origin(X,Y) origin of a glyph to be drawn
Fill RuleRule for filling paths
Quality SettingsImage and rendering quality, pixel layout
Color TransformationColor transformation coefficients and enable/disable
Blend ModePixel blend function
Image ModeImage/paint combination function
ScissoringCurrent scissoring rectangles and enable/disable
StrokeStroke parameters
Pixel and Screen layoutPixel layout information
Tile fill colorColor for FILL tiling mode
Clear colorColor for fast clear
Filter ParametersImage filtering parameters
PaintPaint definitions
MaskCoverage mask and enable/disable
ErrorOldest unreported error code

Forcing Drawing to Complete API [4.3]

void vgFlush(void)

Ensure that all outstanding requests on the current context will complete in finite time. This function may return prior to the actual completion of all requests.

void vgFinish(void)

Force all outstanding requests on the current context to complete, returning only when the last request has completed.