|_ __ ___Extensions___ __ _|
OpenVG provides a drawing model similar to those of existing 2D drawing APIs and formats (Adobe PostScript and PDF, Sun Microsystems Java2D, MacroMedia Flash, SVG). It is specifically intended to support all drawing features required by a SVG Tiny 1.2 renderer, and additionally to support functions that may be of use for implementing an SVG Basic renderer. In addition to the base feature set, we introduce a new set of interesting extensions; developers and designers can take advantage of these new features to develop their OpenVG applications.
2. Conical gradients
Conical gradients interpolate the color keys counter-clockwise around a point. A conical gradient is defined through the center point, the direction point and the number of repeats. Those points identify the line where the first color key lies on. The number of repeats tells how many times the circle will be split; all the keys take place every slice, following the classic spread mode rules.
conGrad = center.x; conGrad = center.y;
conGrad = target.x; conGrad = target.y;
conGrad = repeats;
vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_CONICAL_GRADIENT);
vgSetParameterfv(paint, VG_PAINT_CONICAL_GRADIENT, 5, conGrad);
3. Advancend blend modes
This extension completes the OpenVG 1.0 blend modes to support a full extended Porter-Duff rendering model (the same rendering model used by SVG 1.2). Some of these new modes are available only if GLSL shaders are supported: Overlay, Color Dodge, Color Burn, Hard Light, Soft Light, Difference. When shaders aren't available a Src Over fallback will be used.
4. Separable blend modes
OpenVG 1.0 specifications provide a way to set a single blend mode, that will be used for both stroke and fill drawing. With this extension it is possible to independently specify a blend mode for the stroke and a blend mode for the fill.
5. Color ramp interpolation
According to OpenVG 1.0 specifications, color and alpha values at offset values between the values given by stops are defined by means of linear interpolation between the values defined at the nearest stops above and below the given offset value. Linear interpolation suffers of the so called 'key highlights' issue; it is very noticeable when large surfaces are filled with a poor of keys gradient. This behaviour could be changed by defining a new color ramp interpolation schema. This extension introduces a smooth color interpolation, based on the Hermite interpolant coupled with Catmull-Rom tangents calculation. The result is a much smoother transition.
6. Separable cap style
OpenVG 1.0 specifications provide a way to set a single cap style, that will be used for both start-cap and end-cap in a dashed stroke. With this extension it is possible to independently specify a different style for start-cap and end-cap.
7. Paint opacity
This extension introduces a new alpha factor (it lies in [0;1] range) that influences paint generation. It has the same behaviour as the alpha mask but it's not pixel based, it's global for the entire paint. The classic use is to do fading effects without the need to change color keys opacity (for gradients) nor pixels (for patterns and images).
vgSetParameterf(paint, VG_PAINT_OPACITY, 0.50f);
AmanithVG is a trademark of Mazatech S.r.l.
Copyright (c) 2005-2009 Mazatech s.r.l. - P.iva (VAT IT) 03498460405 - All rights reserved