15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    NV_path_rendering
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_NV_path_rendering
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Mark Kilgard, NVIDIA (mjk 'at' nvidia.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Roger Allen, NVIDIA
165bd8deadSopenharmony_ci    Jeff Bolz, NVIDIA
175bd8deadSopenharmony_ci    Chris Dalton, NVIDIA
185bd8deadSopenharmony_ci    Pierre-Loup Griffais, NVIDIA
195bd8deadSopenharmony_ci    Chris Hebert, Samsung
205bd8deadSopenharmony_ci    Scott Nations, NVIDIA
215bd8deadSopenharmony_ci    David Chait, NVIDIA
225bd8deadSopenharmony_ci    Daniel Koch, NVIDIA
235bd8deadSopenharmony_ci    Bas Schouten, Mozilla
245bd8deadSopenharmony_ci    Sandeep Shinde, NVIDIA
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ciStatus
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ci    Released in NVIDIA Driver Release 275.33 (June 2011).
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    Substantially optimized in NVIDIA Driver Release 301.42 (May 2012).
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci    Further optimized in NVIDIA Driver Release 314.xx (February 2013).
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    Version 1.3 functionality shipping in NVIDIA Driver Release 337.88
355bd8deadSopenharmony_ci    and on (May, 27 2014).
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ciVersion
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ci    Last Modified Date:  September 9, 2014
405bd8deadSopenharmony_ci    Version:             35
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ciNumber
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    OpenGL Extension #410
455bd8deadSopenharmony_ci    OpenGL ES Extension #199
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ciDependencies
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    This extension is written against the OpenGL 3.2 Specification with
505bd8deadSopenharmony_ci    Compatibility Profile but can apply to OpenGL 1.1 and up.
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ci    When used with a Core profile or OpenGL ES context, certain
535bd8deadSopenharmony_ci    functionality is unavailable (see "Dependencies on Core Profile and
545bd8deadSopenharmony_ci    OpenGL ES" section).
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci    This extension depends on ARB_program_interface_query.
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ci    EXT_direct_state_access commands are used in specifying portions
595bd8deadSopenharmony_ci    of this extension but EXT_direct_state_access is not required to
605bd8deadSopenharmony_ci    implement this extension as long as the functionality implemented
615bd8deadSopenharmony_ci    is equivalent to the EXT_direct_state_access commands.
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    EXT_separate_shader_objects is recommended.
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    ARB_program_interface_query is recommended.
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ciOverview
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci    Conventional OpenGL supports rendering images (pixel rectangles and
705bd8deadSopenharmony_ci    bitmaps) and simple geometric primitives (points, lines, polygons).
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci    This extension adds a new rendering paradigm, known as path rendering,
735bd8deadSopenharmony_ci    for rendering filled and stroked paths.  Path rendering is not novel
745bd8deadSopenharmony_ci    but rather a standard part of most resolution-independent 2D rendering
755bd8deadSopenharmony_ci    systems such as Flash, PDF, Silverlight, SVG, Java 2D, Office
765bd8deadSopenharmony_ci    drawings, TrueType fonts, PostScript and its fonts, Quartz 2D, XML
775bd8deadSopenharmony_ci    Paper Specification (XPS), and OpenVG.  What is novel is the ability
785bd8deadSopenharmony_ci    to mix path rendering with arbitrary OpenGL 3D rendering and imaging.
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci    With this extension, path rendering becomes a first-class rendering
815bd8deadSopenharmony_ci    mode within the OpenGL graphics system that can be arbitrarily mixed
825bd8deadSopenharmony_ci    with existing OpenGL rendering and can take advantage of OpenGL's
835bd8deadSopenharmony_ci    existing mechanisms for texturing, programmability, and per-fragment
845bd8deadSopenharmony_ci    operations.
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci    Unlike geometric primitive rendering, paths are specified on a 2D
875bd8deadSopenharmony_ci    (non-projective) plane rather than in 3D (projective) space.
885bd8deadSopenharmony_ci    Even though the path is defined in a 2D plane, every path can
895bd8deadSopenharmony_ci    be transformed into 3D clip space allowing for 3D view frustum &
905bd8deadSopenharmony_ci    user-defined clipping, depth offset, and depth testing in the same
915bd8deadSopenharmony_ci    manner as geometric primitive rendering.
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci    Both geometric primitive rendering and path rendering support
945bd8deadSopenharmony_ci    rasterization of edges defined by line segments; however, path
955bd8deadSopenharmony_ci    rendering also allows path segments to be specified by Bezier (cubic
965bd8deadSopenharmony_ci    or quadratic) curves or partial elliptical arcs.  This allows path
975bd8deadSopenharmony_ci    rendering to define truly curved primitive boundaries unlike the
985bd8deadSopenharmony_ci    straight edges of line and polygon primitives.  Whereas geometric
995bd8deadSopenharmony_ci    primitive rendering requires convex polygons for well-defined
1005bd8deadSopenharmony_ci    rendering results, path rendering allows (and encourages!) concave
1015bd8deadSopenharmony_ci    and curved outlines to be specified.  These paths are even allowed
1025bd8deadSopenharmony_ci    to self-intersect.
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci    When filling closed paths, the winding of paths (counterclockwise
1055bd8deadSopenharmony_ci    or clockwise) determines whether pixels are inside or outside of
1065bd8deadSopenharmony_ci    the path.
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci    Paths can also be stroked whereby, conceptually, a fixed-width "brush"
1095bd8deadSopenharmony_ci    is pulled along the path such that the brush remains orthogonal to
1105bd8deadSopenharmony_ci    the gradient of each path segment.  Samples within the sweep of this
1115bd8deadSopenharmony_ci    brush are considered inside the stroke of the path.
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ci    This extension supports path rendering through a sequence of three
1145bd8deadSopenharmony_ci    operations:
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ci        1.  Path specification is the process of creating and updating
1175bd8deadSopenharmony_ci            a path object consisting of a set of path commands and a
1185bd8deadSopenharmony_ci            corresponding set of 2D vertices.
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci            Path commands can be specified explicitly from path command
1215bd8deadSopenharmony_ci            and coordinate data, parsed from a string based on standard
1225bd8deadSopenharmony_ci            grammars for representing paths, or specified by a particular
1235bd8deadSopenharmony_ci            glyph of standard font representations.  Also new paths can
1245bd8deadSopenharmony_ci            be specified by weighting one or more existing paths so long
1255bd8deadSopenharmony_ci            as all the weighted paths have consistent command sequences.
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci            Each path object contains zero or more subpaths specified
1285bd8deadSopenharmony_ci            by a sequence of line segments, partial elliptical arcs,
1295bd8deadSopenharmony_ci            and (cubic or quadratic) Bezier curve segments.  Each path
1305bd8deadSopenharmony_ci            may contain multiple subpaths that can be closed (forming
1315bd8deadSopenharmony_ci            a contour) or open.
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci        2.  Path stenciling is the process of updating the stencil buffer
1345bd8deadSopenharmony_ci            based on a path's coverage transformed into window space.
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ci            Path stenciling can determine either the filled or stroked
1375bd8deadSopenharmony_ci            coverage of a path.
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ci            The details of path stenciling are explained within the core
1405bd8deadSopenharmony_ci            of the specification.
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci            Stenciling a stroked path supports all the standard
1435bd8deadSopenharmony_ci            embellishments for path stroking such as end caps, join
1445bd8deadSopenharmony_ci            styles, miter limits, dashing, and dash caps.  These stroking
1455bd8deadSopenharmony_ci            properties specified are parameters of path objects.
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci        3.  Path covering is the process of emitting simple (convex &
1485bd8deadSopenharmony_ci            planar) geometry that (conservatively) "covers" the path's
1495bd8deadSopenharmony_ci            sample coverage in the stencil buffer.  During path covering,
1505bd8deadSopenharmony_ci            stencil testing can be configured to discard fragments not
1515bd8deadSopenharmony_ci            within the actual coverage of the path as determined by
1525bd8deadSopenharmony_ci            prior path stenciling.
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci            Path covering can cover either the filled or stroked coverage
1555bd8deadSopenharmony_ci            of a path.
1565bd8deadSopenharmony_ci
1575bd8deadSopenharmony_ci            The details of path covering are explained within the core
1585bd8deadSopenharmony_ci            of the specification.
1595bd8deadSopenharmony_ci
1605bd8deadSopenharmony_ci    To render a path object into the color buffer, an application specifies
1615bd8deadSopenharmony_ci    a path object and then uses a two-step rendering process.  First, the
1625bd8deadSopenharmony_ci    path object is stenciled whereby the path object's stroked or filled
1635bd8deadSopenharmony_ci    coverage is rasterized into the stencil buffer.  Second, the path object
1645bd8deadSopenharmony_ci    is covered whereby conservative bounding geometry for the path is
1655bd8deadSopenharmony_ci    transformed and rasterized with stencil testing configured to test against
1665bd8deadSopenharmony_ci    the coverage information written to the stencil buffer in the first step
1675bd8deadSopenharmony_ci    so that only fragments covered by the path are written during this second
1685bd8deadSopenharmony_ci    step.  Also during this second step written pixels typically have
1695bd8deadSopenharmony_ci    their stencil value reset (so there's no need for clearing the
1705bd8deadSopenharmony_ci    stencil buffer between rendering each path).
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci    Here is an example of specifying and then rendering a five-point
1735bd8deadSopenharmony_ci    star and a heart as a path using Scalable Vector Graphics (SVG)
1745bd8deadSopenharmony_ci    path description syntax:
1755bd8deadSopenharmony_ci
1765bd8deadSopenharmony_ci        GLuint pathObj = 42;
1775bd8deadSopenharmony_ci        const char *svgPathString =
1785bd8deadSopenharmony_ci          // star
1795bd8deadSopenharmony_ci          "M100,180 L40,10 L190,120 L10,120 L160,10 z"
1805bd8deadSopenharmony_ci          // heart
1815bd8deadSopenharmony_ci          "M300 300 C 100 400,100 200,300 100,500 200,500 400,300 300Z";
1825bd8deadSopenharmony_ci        glPathStringNV(pathObj, GL_PATH_FORMAT_SVG_NV,
1835bd8deadSopenharmony_ci                       (GLsizei)strlen(svgPathString), svgPathString);
1845bd8deadSopenharmony_ci
1855bd8deadSopenharmony_ci    Alternatively applications oriented around the PostScript imaging
1865bd8deadSopenharmony_ci    model can use the PostScript user path syntax instead:
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ci        const char *psPathString =
1895bd8deadSopenharmony_ci          // star
1905bd8deadSopenharmony_ci          "100 180 moveto"
1915bd8deadSopenharmony_ci          " 40 10 lineto 190 120 lineto 10 120 lineto 160 10 lineto closepath"
1925bd8deadSopenharmony_ci          // heart
1935bd8deadSopenharmony_ci          " 300 300 moveto"
1945bd8deadSopenharmony_ci          " 100 400 100 200 300 100 curveto"
1955bd8deadSopenharmony_ci          " 500 200 500 400 300 300 curveto closepath";
1965bd8deadSopenharmony_ci        glPathStringNV(pathObj, GL_PATH_FORMAT_PS_NV,
1975bd8deadSopenharmony_ci                       (GLsizei)strlen(psPathString), psPathString);
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci    The PostScript path syntax also supports compact and precise binary
2005bd8deadSopenharmony_ci    encoding and includes PostScript-style circular arcs.
2015bd8deadSopenharmony_ci
2025bd8deadSopenharmony_ci    Or the path's command and coordinates can be specified explicitly:
2035bd8deadSopenharmony_ci
2045bd8deadSopenharmony_ci        static const GLubyte pathCommands[10] =
2055bd8deadSopenharmony_ci          { GL_MOVE_TO_NV, GL_LINE_TO_NV, GL_LINE_TO_NV, GL_LINE_TO_NV,
2065bd8deadSopenharmony_ci            GL_LINE_TO_NV, GL_CLOSE_PATH_NV,
2075bd8deadSopenharmony_ci            'M', 'C', 'C', 'Z' };  // character aliases
2085bd8deadSopenharmony_ci        static const GLshort pathCoords[12][2] =
2095bd8deadSopenharmony_ci          { {100, 180}, {40, 10}, {190, 120}, {10, 120}, {160, 10},
2105bd8deadSopenharmony_ci            {300,300}, {100,400}, {100,200}, {300,100},
2115bd8deadSopenharmony_ci            {500,200}, {500,400}, {300,300} };
2125bd8deadSopenharmony_ci        glPathCommandsNV(pathObj, 10, pathCommands, 24, GL_SHORT, pathCoords);
2135bd8deadSopenharmony_ci
2145bd8deadSopenharmony_ci    Before rendering to a window with a stencil buffer, clear the stencil
2155bd8deadSopenharmony_ci    buffer to zero and the color buffer to black:
2165bd8deadSopenharmony_ci
2175bd8deadSopenharmony_ci        glClearStencil(0);
2185bd8deadSopenharmony_ci        glClearColor(0,0,0,0);
2195bd8deadSopenharmony_ci        glStencilMask(~0);
2205bd8deadSopenharmony_ci        glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
2215bd8deadSopenharmony_ci
2225bd8deadSopenharmony_ci    Use an orthographic path-to-clip-space transform to map the
2235bd8deadSopenharmony_ci    [0..500]x[0..400] range of the star's path coordinates to the [-1..1]
2245bd8deadSopenharmony_ci    clip space cube:
2255bd8deadSopenharmony_ci
2265bd8deadSopenharmony_ci        glMatrixLoadIdentityEXT(GL_PROJECTION);
2275bd8deadSopenharmony_ci        glMatrixLoadIdentityEXT(GL_MODELVIEW);
2285bd8deadSopenharmony_ci        glMatrixOrthoEXT(GL_MODELVIEW, 0, 500, 0, 400, -1, 1);
2295bd8deadSopenharmony_ci
2305bd8deadSopenharmony_ci    Stencil the path:
2315bd8deadSopenharmony_ci
2325bd8deadSopenharmony_ci        glStencilFillPathNV(pathObj, GL_COUNT_UP_NV, 0x1F);
2335bd8deadSopenharmony_ci
2345bd8deadSopenharmony_ci    The 0x1F mask means the counting uses modulo-32 arithmetic. In
2355bd8deadSopenharmony_ci    principle the star's path is simple enough (having a maximum winding
2365bd8deadSopenharmony_ci    number of 2) that modulo-4 arithmetic would be sufficient so the mask
2375bd8deadSopenharmony_ci    could be 0x3.  Or a mask of all 1's (~0) could be used to count with
2385bd8deadSopenharmony_ci    all available stencil bits.
2395bd8deadSopenharmony_ci
2405bd8deadSopenharmony_ci    Now that the coverage of the star and the heart have been rasterized
2415bd8deadSopenharmony_ci    into the stencil buffer, cover the path with a non-zero fill style
2425bd8deadSopenharmony_ci    (indicated by the GL_NOTEQUAL stencil function with a zero reference
2435bd8deadSopenharmony_ci    value):
2445bd8deadSopenharmony_ci
2455bd8deadSopenharmony_ci        glEnable(GL_STENCIL_TEST);
2465bd8deadSopenharmony_ci        glStencilFunc(GL_NOTEQUAL, 0, 0x1F);
2475bd8deadSopenharmony_ci        glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);
2485bd8deadSopenharmony_ci        glColor3f(1,1,0); // yellow
2495bd8deadSopenharmony_ci        glCoverFillPathNV(pathObj, GL_BOUNDING_BOX_NV);
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci    The result is a yellow star (with a filled center) to the left of
2525bd8deadSopenharmony_ci    a yellow heart.
2535bd8deadSopenharmony_ci
2545bd8deadSopenharmony_ci    The GL_ZERO stencil operation ensures that any covered samples
2555bd8deadSopenharmony_ci    (meaning those with non-zero stencil values) are zero'ed when
2565bd8deadSopenharmony_ci    the path cover is rasterized. This allows subsequent paths to be
2575bd8deadSopenharmony_ci    rendered without clearing the stencil buffer again.
2585bd8deadSopenharmony_ci
2595bd8deadSopenharmony_ci    A similar two-step rendering process can draw a white outline
2605bd8deadSopenharmony_ci    over the star and heart.
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ci    Before rendering, configure the path object with desirable path
2635bd8deadSopenharmony_ci    parameters for stroking.  Specify a wider 6.5-unit stroke and
2645bd8deadSopenharmony_ci    the round join style:
2655bd8deadSopenharmony_ci
2665bd8deadSopenharmony_ci        glPathParameteriNV(pathObj, GL_PATH_JOIN_STYLE_NV, GL_ROUND_NV);
2675bd8deadSopenharmony_ci        glPathParameterfNV(pathObj, GL_PATH_STROKE_WIDTH_NV, 6.5);
2685bd8deadSopenharmony_ci
2695bd8deadSopenharmony_ci     Now stencil the path's stroked coverage into the stencil buffer,
2705bd8deadSopenharmony_ci     setting the stencil to 0x1 for all stencil samples within the
2715bd8deadSopenharmony_ci     transformed path.
2725bd8deadSopenharmony_ci
2735bd8deadSopenharmony_ci        glStencilStrokePathNV(pathObj, 0x1, ~0);
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci     Cover the path's stroked coverage (with a hull this time instead
2765bd8deadSopenharmony_ci     of a bounding box; the choice doesn't really matter here) while
2775bd8deadSopenharmony_ci     stencil testing that writes white to the color buffer and again
2785bd8deadSopenharmony_ci     zero the stencil buffer.
2795bd8deadSopenharmony_ci
2805bd8deadSopenharmony_ci        glColor3f(1,1,1); // white
2815bd8deadSopenharmony_ci        glCoverStrokePathNV(pathObj, GL_CONVEX_HULL_NV);
2825bd8deadSopenharmony_ci
2835bd8deadSopenharmony_ci     In this example, constant color shading is used but the application
2845bd8deadSopenharmony_ci     can specify their own arbitrary shading and/or blending operations,
2855bd8deadSopenharmony_ci     whether with Cg compiled to fragment program assembly, GLSL, or
2865bd8deadSopenharmony_ci     fixed-function fragment processing.
2875bd8deadSopenharmony_ci
2885bd8deadSopenharmony_ci     More complex path rendering is possible such as clipping one path to
2895bd8deadSopenharmony_ci     another arbitrary path.  This is because stencil testing (as well
2905bd8deadSopenharmony_ci     as depth testing, depth bound test, clip planes, and scissoring)
2915bd8deadSopenharmony_ci     can restrict path stenciling.
2925bd8deadSopenharmony_ci
2935bd8deadSopenharmony_ci     Now let's render the word "OpenGL" atop the star and heart.
2945bd8deadSopenharmony_ci
2955bd8deadSopenharmony_ci     First create a sequence of path objects for the glyphs for the
2965bd8deadSopenharmony_ci     characters in "OpenGL":
2975bd8deadSopenharmony_ci
2985bd8deadSopenharmony_ci        GLuint glyphBase = glGenPathsNV(6);
2995bd8deadSopenharmony_ci        const unsigned char *word = "OpenGL";
3005bd8deadSopenharmony_ci        const GLsizei wordLen = (GLsizei)strlen(word);
3015bd8deadSopenharmony_ci        const GLfloat emScale = 2048;  // match TrueType convention
3025bd8deadSopenharmony_ci        GLuint templatePathObject = ~0;  // Non-existent path object
3035bd8deadSopenharmony_ci        glPathGlyphsNV(glyphBase,
3045bd8deadSopenharmony_ci                       GL_SYSTEM_FONT_NAME_NV, "Helvetica", GL_BOLD_BIT_NV,
3055bd8deadSopenharmony_ci                       wordLen, GL_UNSIGNED_BYTE, word,
3065bd8deadSopenharmony_ci                       GL_SKIP_MISSING_GLYPH_NV, ~0, emScale);
3075bd8deadSopenharmony_ci        glPathGlyphsNV(glyphBase,
3085bd8deadSopenharmony_ci                       GL_SYSTEM_FONT_NAME_NV, "Arial", GL_BOLD_BIT_NV,
3095bd8deadSopenharmony_ci                       wordLen, GL_UNSIGNED_BYTE, word,
3105bd8deadSopenharmony_ci                       GL_SKIP_MISSING_GLYPH_NV, ~0, emScale);
3115bd8deadSopenharmony_ci        glPathGlyphsNV(glyphBase,
3125bd8deadSopenharmony_ci                       GL_STANDARD_FONT_NAME_NV, "Sans", GL_BOLD_BIT_NV,
3135bd8deadSopenharmony_ci                       wordLen, GL_UNSIGNED_BYTE, word,
3145bd8deadSopenharmony_ci                       GL_USE_MISSING_GLYPH_NV, ~0, emScale);
3155bd8deadSopenharmony_ci
3165bd8deadSopenharmony_ci    Glyphs are loaded for three different fonts in priority order:
3175bd8deadSopenharmony_ci    Helvetica first, then Arial, and if neither of those loads, use the
3185bd8deadSopenharmony_ci    standard sans-serif font.  If a prior glPathGlyphsNV is successful
3195bd8deadSopenharmony_ci    and specifies the path object range, the subsequent glPathGlyphsNV
3205bd8deadSopenharmony_ci    commands silently avoid re-specifying the already existent path
3215bd8deadSopenharmony_ci    objects.
3225bd8deadSopenharmony_ci
3235bd8deadSopenharmony_ci    Now query the (kerned) separations for the word "OpenGL" and build
3245bd8deadSopenharmony_ci    a set of horizontal translations advancing each successive glyph by
3255bd8deadSopenharmony_ci    its kerning distance with the following glyph.
3265bd8deadSopenharmony_ci
3275bd8deadSopenharmony_ci        GLfloat xtranslate[6+1];  // wordLen+1
3285bd8deadSopenharmony_ci        glGetPathSpacingNV(GL_ACCUM_ADJACENT_PAIRS_NV,
3295bd8deadSopenharmony_ci                           wordLen+1, GL_UNSIGNED_BYTE,
3305bd8deadSopenharmony_ci                           "\000\001\002\003\004\005\005",  // repeat last letter twice
3315bd8deadSopenharmony_ci                           glyphBase,
3325bd8deadSopenharmony_ci                           1.0f, 1.0f,
3335bd8deadSopenharmony_ci                           GL_TRANSLATE_X_NV,
3345bd8deadSopenharmony_ci                           xtranslate);
3355bd8deadSopenharmony_ci
3365bd8deadSopenharmony_ci    Next determine the font-wide vertical minimum and maximum for the
3375bd8deadSopenharmony_ci    font face by querying the per-font metrics of any one of the glyphs
3385bd8deadSopenharmony_ci    from the font face.
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci        GLfloat yMinMax[2];
3415bd8deadSopenharmony_ci        glGetPathMetricRangeNV(GL_FONT_Y_MIN_BOUNDS_BIT_NV|GL_FONT_Y_MAX_BOUNDS_BIT_NV,
3425bd8deadSopenharmony_ci                               glyphBase, /*count*/1,
3435bd8deadSopenharmony_ci                               2*sizeof(GLfloat),
3445bd8deadSopenharmony_ci                               yMinMax);
3455bd8deadSopenharmony_ci
3465bd8deadSopenharmony_ci    Use an orthographic path-to-clip-space transform to map the
3475bd8deadSopenharmony_ci    word's bounds to the [-1..1] clip space cube:
3485bd8deadSopenharmony_ci
3495bd8deadSopenharmony_ci        glMatrixLoadIdentityEXT(GL_PROJECTION);
3505bd8deadSopenharmony_ci        glMatrixOrthoEXT(GL_MODELVIEW,
3515bd8deadSopenharmony_ci                         0, xtranslate[6], yMinMax[0], yMinMax[1],
3525bd8deadSopenharmony_ci                         -1, 1);
3535bd8deadSopenharmony_ci
3545bd8deadSopenharmony_ci    Stencil the filled paths of the sequence of glyphs for "OpenGL",
3555bd8deadSopenharmony_ci    each transformed by the appropriate 2D translations for spacing.
3565bd8deadSopenharmony_ci
3575bd8deadSopenharmony_ci        glStencilFillPathInstancedNV(6, GL_UNSIGNED_BYTE,
3585bd8deadSopenharmony_ci                                     "\000\001\002\003\004\005",
3595bd8deadSopenharmony_ci                                     glyphBase,
3605bd8deadSopenharmony_ci                                     GL_PATH_FILL_MODE_NV, 0xFF,
3615bd8deadSopenharmony_ci                                     GL_TRANSLATE_X_NV, xtranslate);
3625bd8deadSopenharmony_ci
3635bd8deadSopenharmony_ci     Cover the bounding box union of the glyphs with 50% gray.
3645bd8deadSopenharmony_ci
3655bd8deadSopenharmony_ci        glEnable(GL_STENCIL_TEST);
3665bd8deadSopenharmony_ci        glStencilFunc(GL_NOTEQUAL, 0, 0xFF);
3675bd8deadSopenharmony_ci        glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);
3685bd8deadSopenharmony_ci        glColor3f(0.5,0.5,0.5); // 50% gray
3695bd8deadSopenharmony_ci        glCoverFillPathInstancedNV(6, GL_UNSIGNED_BYTE,
3705bd8deadSopenharmony_ci                                   "\000\001\002\003\004\005",
3715bd8deadSopenharmony_ci                                   glyphBase,
3725bd8deadSopenharmony_ci                                   GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV,
3735bd8deadSopenharmony_ci                                   GL_TRANSLATE_X_NV, xtranslate);
3745bd8deadSopenharmony_ci
3755bd8deadSopenharmony_ci    Voila, the word "OpenGL" in gray is now stenciled into the framebuffer.
3765bd8deadSopenharmony_ci
3775bd8deadSopenharmony_ci    Instead of solid 50% gray, the cover operation can apply a linear
3785bd8deadSopenharmony_ci    gradient that changes from green (RGB=0,1,0) at the top of the word
3795bd8deadSopenharmony_ci    "OpenGL" to blue (RGB=0,0,1) at the bottom of "OpenGL":
3805bd8deadSopenharmony_ci
3815bd8deadSopenharmony_ci        GLfloat rgbGen[3][3] = {
3825bd8deadSopenharmony_ci          0, 0, 0,  // red   = constant zero
3835bd8deadSopenharmony_ci          0, 1, 0,  // green = varies with y from bottom (0) to top (1)
3845bd8deadSopenharmony_ci          0, -1, 1  // blue  = varies with y from bottom (1) to top (0)
3855bd8deadSopenharmony_ci        };
3865bd8deadSopenharmony_ci        glPathColorGenNV(GL_PRIMARY_COLOR, GL_PATH_OBJECT_BOUNDING_BOX_NV,
3875bd8deadSopenharmony_ci                         GL_RGB, &rgbGen[0][0]);
3885bd8deadSopenharmony_ci
3895bd8deadSopenharmony_ci    Instead of loading just the glyphs for the characters in "OpenGL",
3905bd8deadSopenharmony_ci    the entire character set could be loaded.  This allows the characters
3915bd8deadSopenharmony_ci    of the string to be mapped (offset by the glyphBase) to path object names.
3925bd8deadSopenharmony_ci    A range of glyphs can be loaded like this:
3935bd8deadSopenharmony_ci
3945bd8deadSopenharmony_ci        const int numChars = 256;  // ISO/IEC 8859-1 8-bit character range
3955bd8deadSopenharmony_ci        GLuint glyphBase = glGenPathsNV(numChars);
3965bd8deadSopenharmony_ci        glPathGlyphRangeNV(glyphBase,
3975bd8deadSopenharmony_ci                           GL_SYSTEM_FONT_NAME_NV, "Helvetica", GL_BOLD_BIT_NV,
3985bd8deadSopenharmony_ci                           0, numChars,
3995bd8deadSopenharmony_ci                           GL_SKIP_MISSING_GLYPH_NV, ~0, emScale);
4005bd8deadSopenharmony_ci        glPathGlyphRangeNV(glyphBase,
4015bd8deadSopenharmony_ci                           GL_SYSTEM_FONT_NAME_NV, "Arial", GL_BOLD_BIT_NV,
4025bd8deadSopenharmony_ci                           0, numChars,
4035bd8deadSopenharmony_ci                           GL_SKIP_MISSING_GLYPH_NV, ~0, emScale);
4045bd8deadSopenharmony_ci        glPathGlyphRangeNV(glyphBase,
4055bd8deadSopenharmony_ci                           GL_STANDARD_FONT_NAME_NV, "Sans", GL_BOLD_BIT_NV,
4065bd8deadSopenharmony_ci                           0, numChars,
4075bd8deadSopenharmony_ci                           GL_USE_MISSING_GLYPH_NV, ~0, emScale);
4085bd8deadSopenharmony_ci
4095bd8deadSopenharmony_ci    Given a range of glyphs loaded as path objects, (kerned) spacing
4105bd8deadSopenharmony_ci    information can now be queried for the string:
4115bd8deadSopenharmony_ci
4125bd8deadSopenharmony_ci        glGetPathSpacingNV(GL_ACCUM_ADJACENT_PAIRS_NV,
4135bd8deadSopenharmony_ci                           7, GL_UNSIGNED_BYTE, "OpenGLL", // repeat L to get final spacing
4145bd8deadSopenharmony_ci                           glyphBase,
4155bd8deadSopenharmony_ci                           1.0f, 1.0f,
4165bd8deadSopenharmony_ci                           GL_TRANSLATE_X_NV,
4175bd8deadSopenharmony_ci                           kerning);
4185bd8deadSopenharmony_ci
4195bd8deadSopenharmony_ci    Using the range of glyphs, stenciling and covering the instanced
4205bd8deadSopenharmony_ci    paths for "OpenGL" can be done this way:
4215bd8deadSopenharmony_ci
4225bd8deadSopenharmony_ci        glStencilFillPathInstancedNV(6, GL_UNSIGNED_BYTE, "OpenGL",
4235bd8deadSopenharmony_ci                                     glyphBase,
4245bd8deadSopenharmony_ci                                     GL_PATH_FILL_MODE_NV, 0xFF,
4255bd8deadSopenharmony_ci                                     GL_TRANSLATE_X_NV, xtranslate);
4265bd8deadSopenharmony_ci
4275bd8deadSopenharmony_ci        glCoverFillPathInstancedNV(6, GL_UNSIGNED_BYTE, "OpenGL",
4285bd8deadSopenharmony_ci                                   glyphBase,
4295bd8deadSopenharmony_ci                                   GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV,
4305bd8deadSopenharmony_ci                                   GL_TRANSLATE_X_NV, xtranslate);
4315bd8deadSopenharmony_ci
4325bd8deadSopenharmony_ci    The "stencil" and "cover" steps can be combined in a single command:
4335bd8deadSopenharmony_ci
4345bd8deadSopenharmony_ci        glStencilThenCoverFillPathInstancedNV(6, GL_UNSIGNED_BYTE, "OpenGL",
4355bd8deadSopenharmony_ci                                              glyphBase,
4365bd8deadSopenharmony_ci                                              GL_PATH_FILL_MODE_NV, 0xFF,
4375bd8deadSopenharmony_ci                                              GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV
4385bd8deadSopenharmony_ci                                              GL_TRANSLATE_X_NV, xtranslate);
4395bd8deadSopenharmony_ci
4405bd8deadSopenharmony_ci    XXX add path clipping example to demonstrate glPathStencilFuncNV.
4415bd8deadSopenharmony_ci
4425bd8deadSopenharmony_ciNew Procedures and Functions
4435bd8deadSopenharmony_ci
4445bd8deadSopenharmony_ci    PATH SPECIFICATION COMMANDS
4455bd8deadSopenharmony_ci
4465bd8deadSopenharmony_ci        EXPLICIT PATH DATA
4475bd8deadSopenharmony_ci
4485bd8deadSopenharmony_ci        void PathCommandsNV(uint path,
4495bd8deadSopenharmony_ci                            sizei numCommands, const ubyte *commands,
4505bd8deadSopenharmony_ci                            sizei numCoords, enum coordType,
4515bd8deadSopenharmony_ci                            const void *coords);
4525bd8deadSopenharmony_ci        void PathCoordsNV(uint path,
4535bd8deadSopenharmony_ci                          sizei numCoords, enum coordType,
4545bd8deadSopenharmony_ci                          const void *coords);
4555bd8deadSopenharmony_ci
4565bd8deadSopenharmony_ci        void PathSubCommandsNV(uint path,
4575bd8deadSopenharmony_ci                               sizei commandStart, sizei commandsToDelete,
4585bd8deadSopenharmony_ci                               sizei numCommands, const ubyte *commands,
4595bd8deadSopenharmony_ci                               sizei numCoords, enum coordType,
4605bd8deadSopenharmony_ci                               const void *coords);
4615bd8deadSopenharmony_ci        void PathSubCoordsNV(uint path,
4625bd8deadSopenharmony_ci                             sizei coordStart,
4635bd8deadSopenharmony_ci                             sizei numCoords, enum coordType,
4645bd8deadSopenharmony_ci                             const void *coords);
4655bd8deadSopenharmony_ci
4665bd8deadSopenharmony_ci        STRING PATH DESCRIPTION
4675bd8deadSopenharmony_ci
4685bd8deadSopenharmony_ci        void PathStringNV(uint path, enum format,
4695bd8deadSopenharmony_ci                          sizei length, const void *pathString);
4705bd8deadSopenharmony_ci
4715bd8deadSopenharmony_ci        PATHS FROM FONT GLYPHS BY UNICODE CHARACTER POINT
4725bd8deadSopenharmony_ci
4735bd8deadSopenharmony_ci        void PathGlyphsNV(uint firstPathName,
4745bd8deadSopenharmony_ci                          enum fontTarget,
4755bd8deadSopenharmony_ci                          const void *fontName,
4765bd8deadSopenharmony_ci                          bitfield fontStyle,
4775bd8deadSopenharmony_ci                          sizei numGlyphs, enum type,
4785bd8deadSopenharmony_ci                          const void *charcodes,
4795bd8deadSopenharmony_ci                          enum handleMissingGlyphs,
4805bd8deadSopenharmony_ci                          uint pathParameterTemplate,
4815bd8deadSopenharmony_ci                          float emScale);
4825bd8deadSopenharmony_ci        void PathGlyphRangeNV(uint firstPathName,
4835bd8deadSopenharmony_ci                              enum fontTarget,
4845bd8deadSopenharmony_ci                              const void *fontName,
4855bd8deadSopenharmony_ci                              bitfield fontStyle,
4865bd8deadSopenharmony_ci                              uint firstGlyph,
4875bd8deadSopenharmony_ci                              sizei numGlyphs,
4885bd8deadSopenharmony_ci                              enum handleMissingGlyphs,
4895bd8deadSopenharmony_ci                              uint pathParameterTemplate,
4905bd8deadSopenharmony_ci                              float emScale);
4915bd8deadSopenharmony_ci
4925bd8deadSopenharmony_ci        PATHS FROM FONT GLYPHS BY PER-FONT GLYPH INDEX
4935bd8deadSopenharmony_ci
4945bd8deadSopenharmony_ci        enum PathGlyphIndexArrayNV(uint firstPathName,
4955bd8deadSopenharmony_ci                                   enum fontTarget,
4965bd8deadSopenharmony_ci                                   const void *fontName,
4975bd8deadSopenharmony_ci                                   bitfield fontStyle,
4985bd8deadSopenharmony_ci                                   uint firstGlyphIndex,
4995bd8deadSopenharmony_ci                                   sizei numGlyphs,
5005bd8deadSopenharmony_ci                                   uint pathParameterTemplate,
5015bd8deadSopenharmony_ci                                   float emScale);
5025bd8deadSopenharmony_ci        enum PathMemoryGlyphIndexArrayNV(uint firstPathName,
5035bd8deadSopenharmony_ci                                         enum fontTarget,
5045bd8deadSopenharmony_ci                                         sizeiptr fontSize,
5055bd8deadSopenharmony_ci                                         const void *fontData,
5065bd8deadSopenharmony_ci                                         sizei faceIndex,
5075bd8deadSopenharmony_ci                                         uint firstGlyphIndex,
5085bd8deadSopenharmony_ci                                         sizei numGlyphs,
5095bd8deadSopenharmony_ci                                         uint pathParameterTemplate,
5105bd8deadSopenharmony_ci                                         float emScale);
5115bd8deadSopenharmony_ci        enum PathGlyphIndexRangeNV(enum fontTarget,
5125bd8deadSopenharmony_ci                                   const void *fontName,
5135bd8deadSopenharmony_ci                                   bitfield fontStyle,
5145bd8deadSopenharmony_ci                                   uint pathParameterTemplate,
5155bd8deadSopenharmony_ci                                   float emScale,
5165bd8deadSopenharmony_ci                                   uint* baseAndCount);
5175bd8deadSopenharmony_ci
5185bd8deadSopenharmony_ci        PATH SPECIFICATION WITH EXISTING PATHS
5195bd8deadSopenharmony_ci
5205bd8deadSopenharmony_ci        void WeightPathsNV(uint resultPath,
5215bd8deadSopenharmony_ci                           sizei numPaths,
5225bd8deadSopenharmony_ci                           const uint paths[], const float weights[]);
5235bd8deadSopenharmony_ci        void CopyPathNV(uint resultPath, uint srcPath);
5245bd8deadSopenharmony_ci        void InterpolatePathsNV(uint resultPath,
5255bd8deadSopenharmony_ci                                uint pathA, uint pathB,
5265bd8deadSopenharmony_ci                                float weight);
5275bd8deadSopenharmony_ci        void TransformPathNV(uint resultPath,
5285bd8deadSopenharmony_ci                             uint srcPath,
5295bd8deadSopenharmony_ci                             enum transformType,
5305bd8deadSopenharmony_ci                             const float *transformValues);
5315bd8deadSopenharmony_ci
5325bd8deadSopenharmony_ci    PATH PARAMETER SPECIFICATION COMMANDS
5335bd8deadSopenharmony_ci
5345bd8deadSopenharmony_ci        void PathParameterivNV(uint path, enum pname, const int *value);
5355bd8deadSopenharmony_ci        void PathParameteriNV(uint path, enum pname, int value);
5365bd8deadSopenharmony_ci        void PathParameterfvNV(uint path, enum pname, const float *value);
5375bd8deadSopenharmony_ci        void PathParameterfNV(uint path, enum pname, float value);
5385bd8deadSopenharmony_ci
5395bd8deadSopenharmony_ci        void PathDashArrayNV(uint path,
5405bd8deadSopenharmony_ci                             sizei dashCount, const float *dashArray);
5415bd8deadSopenharmony_ci
5425bd8deadSopenharmony_ci    PATH NAME MANAGEMENT
5435bd8deadSopenharmony_ci
5445bd8deadSopenharmony_ci        uint GenPathsNV(sizei range);
5455bd8deadSopenharmony_ci        void DeletePathsNV(uint path, sizei range);
5465bd8deadSopenharmony_ci        boolean IsPathNV(uint path);
5475bd8deadSopenharmony_ci
5485bd8deadSopenharmony_ci    PATH STENCILING
5495bd8deadSopenharmony_ci
5505bd8deadSopenharmony_ci        void PathStencilFuncNV(enum func, int ref, uint mask);
5515bd8deadSopenharmony_ci        void PathStencilDepthOffsetNV(float factor, float units);
5525bd8deadSopenharmony_ci
5535bd8deadSopenharmony_ci        void StencilFillPathNV(uint path,
5545bd8deadSopenharmony_ci                               enum fillMode, uint mask);
5555bd8deadSopenharmony_ci
5565bd8deadSopenharmony_ci        void StencilStrokePathNV(uint path,
5575bd8deadSopenharmony_ci                                 int reference, uint mask);
5585bd8deadSopenharmony_ci
5595bd8deadSopenharmony_ci        void StencilFillPathInstancedNV(sizei numPaths,
5605bd8deadSopenharmony_ci                                        enum pathNameType, const void *paths,
5615bd8deadSopenharmony_ci                                        uint pathBase,
5625bd8deadSopenharmony_ci                                        enum fillMode, uint mask,
5635bd8deadSopenharmony_ci                                        enum transformType,
5645bd8deadSopenharmony_ci                                        const float *transformValues);
5655bd8deadSopenharmony_ci
5665bd8deadSopenharmony_ci        void StencilStrokePathInstancedNV(sizei numPaths,
5675bd8deadSopenharmony_ci                                          enum pathNameType, const void *paths,
5685bd8deadSopenharmony_ci                                          uint pathBase,
5695bd8deadSopenharmony_ci                                          int reference, uint mask,
5705bd8deadSopenharmony_ci                                          enum transformType,
5715bd8deadSopenharmony_ci                                          const float *transformValues);
5725bd8deadSopenharmony_ci
5735bd8deadSopenharmony_ci    PATH COVERING
5745bd8deadSopenharmony_ci
5755bd8deadSopenharmony_ci        void PathCoverDepthFuncNV(enum zfunc);
5765bd8deadSopenharmony_ci
5775bd8deadSopenharmony_ci        void PathColorGenNV(enum color,
5785bd8deadSopenharmony_ci                            enum genMode,
5795bd8deadSopenharmony_ci                            enum colorFormat, const float *coeffs);
5805bd8deadSopenharmony_ci        void PathTexGenNV(enum texCoordSet,
5815bd8deadSopenharmony_ci                          enum genMode,
5825bd8deadSopenharmony_ci                          int components, const float *coeffs);
5835bd8deadSopenharmony_ci        void PathFogGenNV(enum genMode);
5845bd8deadSopenharmony_ci
5855bd8deadSopenharmony_ci        void CoverFillPathNV(uint path, enum coverMode);
5865bd8deadSopenharmony_ci
5875bd8deadSopenharmony_ci        void CoverStrokePathNV(uint path, enum coverMode);
5885bd8deadSopenharmony_ci
5895bd8deadSopenharmony_ci        void CoverFillPathInstancedNV(sizei numPaths,
5905bd8deadSopenharmony_ci                                      enum pathNameType, const void *paths,
5915bd8deadSopenharmony_ci                                      uint pathBase,
5925bd8deadSopenharmony_ci                                      enum coverMode,
5935bd8deadSopenharmony_ci                                      enum transformType,
5945bd8deadSopenharmony_ci                                      const float *transformValues);
5955bd8deadSopenharmony_ci
5965bd8deadSopenharmony_ci        void CoverStrokePathInstancedNV(sizei numPaths,
5975bd8deadSopenharmony_ci                                        enum pathNameType, const void *paths,
5985bd8deadSopenharmony_ci                                        uint pathBase,
5995bd8deadSopenharmony_ci                                        enum coverMode,
6005bd8deadSopenharmony_ci                                        enum transformType,
6015bd8deadSopenharmony_ci                                        const float *transformValues);
6025bd8deadSopenharmony_ci
6035bd8deadSopenharmony_ci    PATH STENCILING THEN COVERING
6045bd8deadSopenharmony_ci
6055bd8deadSopenharmony_ci        void StencilThenCoverFillPathNV(uint path, enum fillMode,
6065bd8deadSopenharmony_ci                                        uint mask, enum coverMode);
6075bd8deadSopenharmony_ci        void StencilThenCoverStrokePathNV(uint path, int reference,
6085bd8deadSopenharmony_ci                                          uint mask, enum coverMode);
6095bd8deadSopenharmony_ci        void StencilThenCoverFillPathInstancedNV(sizei numPaths,
6105bd8deadSopenharmony_ci                                                 enum pathNameType,
6115bd8deadSopenharmony_ci                                                 const void *paths,
6125bd8deadSopenharmony_ci                                                 uint pathBase,
6135bd8deadSopenharmony_ci                                                 enum fillMode, uint mask,
6145bd8deadSopenharmony_ci                                                 enum coverMode,
6155bd8deadSopenharmony_ci                                                 enum transformType,
6165bd8deadSopenharmony_ci                                                 const float *transformValues);
6175bd8deadSopenharmony_ci        void StencilThenCoverStrokePathInstancedNV(sizei numPaths,
6185bd8deadSopenharmony_ci                                                   enum pathNameType,
6195bd8deadSopenharmony_ci                                                   const void *paths,
6205bd8deadSopenharmony_ci                                                   uint pathBase,
6215bd8deadSopenharmony_ci                                                   int reference, uint mask,
6225bd8deadSopenharmony_ci                                                   enum coverMode,
6235bd8deadSopenharmony_ci                                                   enum transformType,
6245bd8deadSopenharmony_ci                                                   const float *transformValues);
6255bd8deadSopenharmony_ci
6265bd8deadSopenharmony_ci    PATH COVERING OF GLSL FRAGMENT INPUTS
6275bd8deadSopenharmony_ci
6285bd8deadSopenharmony_ci        void ProgramPathFragmentInputGenNV(uint program,
6295bd8deadSopenharmony_ci                                           int location,
6305bd8deadSopenharmony_ci                                           enum genMode,
6315bd8deadSopenharmony_ci                                           int components,
6325bd8deadSopenharmony_ci                                           const float *coeffs);
6335bd8deadSopenharmony_ci
6345bd8deadSopenharmony_ci    PATH QUERIES
6355bd8deadSopenharmony_ci
6365bd8deadSopenharmony_ci        void GetPathParameterivNV(uint path, enum pname, int *value);
6375bd8deadSopenharmony_ci        void GetPathParameterfvNV(uint path, enum pname, float *value);
6385bd8deadSopenharmony_ci
6395bd8deadSopenharmony_ci        void GetPathCommandsNV(uint path, ubyte *commands);
6405bd8deadSopenharmony_ci        void GetPathCoordsNV(uint path, float *coords);
6415bd8deadSopenharmony_ci        void GetPathDashArrayNV(uint path, float *dashArray);
6425bd8deadSopenharmony_ci
6435bd8deadSopenharmony_ci        void GetPathMetricsNV(bitfield metricQueryMask,
6445bd8deadSopenharmony_ci                              sizei numPaths,
6455bd8deadSopenharmony_ci                              enum pathNameType, const void *paths,
6465bd8deadSopenharmony_ci                              uint pathBase,
6475bd8deadSopenharmony_ci                              sizei stride,
6485bd8deadSopenharmony_ci                              float *metrics);
6495bd8deadSopenharmony_ci        void GetPathMetricRangeNV(bitfield metricQueryMask,
6505bd8deadSopenharmony_ci                                  uint firstPathName,
6515bd8deadSopenharmony_ci                                  sizei numPaths,
6525bd8deadSopenharmony_ci                                  sizei stride,
6535bd8deadSopenharmony_ci                                  float *metrics);
6545bd8deadSopenharmony_ci
6555bd8deadSopenharmony_ci        void GetPathSpacingNV(enum pathListMode,
6565bd8deadSopenharmony_ci                              sizei numPaths,
6575bd8deadSopenharmony_ci                              enum pathNameType, const void *paths,
6585bd8deadSopenharmony_ci                              uint pathBase,
6595bd8deadSopenharmony_ci                              float advanceScale,
6605bd8deadSopenharmony_ci                              float kerningScale,
6615bd8deadSopenharmony_ci                              enum transformType,
6625bd8deadSopenharmony_ci                              float *returnedSpacing);
6635bd8deadSopenharmony_ci
6645bd8deadSopenharmony_ci        void GetPathColorGenivNV(enum color, enum pname, int *value);
6655bd8deadSopenharmony_ci        void GetPathColorGenfvNV(enum color, enum pname, float *value);
6665bd8deadSopenharmony_ci        void GetPathTexGenivNV(enum texCoordSet, enum pname, int *value);
6675bd8deadSopenharmony_ci        void GetPathTexGenfvNV(enum texCoordSet, enum pname, float *value);
6685bd8deadSopenharmony_ci
6695bd8deadSopenharmony_ci        boolean IsPointInFillPathNV(uint path,
6705bd8deadSopenharmony_ci                                    uint mask, float x, float y);
6715bd8deadSopenharmony_ci        boolean IsPointInStrokePathNV(uint path,
6725bd8deadSopenharmony_ci                                      float x, float y);
6735bd8deadSopenharmony_ci
6745bd8deadSopenharmony_ci        float GetPathLengthNV(uint path,
6755bd8deadSopenharmony_ci                              sizei startSegment, sizei numSegments);
6765bd8deadSopenharmony_ci
6775bd8deadSopenharmony_ci        boolean PointAlongPathNV(uint path,
6785bd8deadSopenharmony_ci                                 sizei startSegment, sizei numSegments,
6795bd8deadSopenharmony_ci                                 float distance,
6805bd8deadSopenharmony_ci                                 float *x, float *y,
6815bd8deadSopenharmony_ci                                 float *tangentX, float *tangentY);
6825bd8deadSopenharmony_ci
6835bd8deadSopenharmony_ci    MATRIX SPECIFICATION
6845bd8deadSopenharmony_ci
6855bd8deadSopenharmony_ci        void MatrixLoad3x2fNV(enum matrixMode, const float *m);
6865bd8deadSopenharmony_ci        void MatrixLoad3x3fNV(enum matrixMode, const float *m);
6875bd8deadSopenharmony_ci        void MatrixLoadTranspose3x3fNV(enum matrixMode, const float *m);
6885bd8deadSopenharmony_ci
6895bd8deadSopenharmony_ci        void MatrixMult3x2fNV(enum matrixMode, const float *m);
6905bd8deadSopenharmony_ci        void MatrixMult3x3fNV(enum matrixMode, const float *m);
6915bd8deadSopenharmony_ci        void MatrixMultTranspose3x3fNV(enum matrixMode, const float *m);
6925bd8deadSopenharmony_ci
6935bd8deadSopenharmony_ci    FLOATING-POINT PROGRAM RESOURCE QUERY
6945bd8deadSopenharmony_ci
6955bd8deadSopenharmony_ci        void GetProgramResourcefvNV(uint program, enum programInterface,
6965bd8deadSopenharmony_ci                                    uint index, sizei propCount,
6975bd8deadSopenharmony_ci                                    const enum *props, sizei bufSize,
6985bd8deadSopenharmony_ci                                    sizei *length, float *params);
6995bd8deadSopenharmony_ci
7005bd8deadSopenharmony_ciNew Tokens
7015bd8deadSopenharmony_ci
7025bd8deadSopenharmony_ci    Accepted in elements of the <commands> array parameter of
7035bd8deadSopenharmony_ci    PathCommandsNV and PathSubCommandsNV:
7045bd8deadSopenharmony_ci
7055bd8deadSopenharmony_ci        CLOSE_PATH_NV                                   0x00
7065bd8deadSopenharmony_ci        MOVE_TO_NV                                      0x02
7075bd8deadSopenharmony_ci        RELATIVE_MOVE_TO_NV                             0x03
7085bd8deadSopenharmony_ci        LINE_TO_NV                                      0x04
7095bd8deadSopenharmony_ci        RELATIVE_LINE_TO_NV                             0x05
7105bd8deadSopenharmony_ci        HORIZONTAL_LINE_TO_NV                           0x06
7115bd8deadSopenharmony_ci        RELATIVE_HORIZONTAL_LINE_TO_NV                  0x07
7125bd8deadSopenharmony_ci        VERTICAL_LINE_TO_NV                             0x08
7135bd8deadSopenharmony_ci        RELATIVE_VERTICAL_LINE_TO_NV                    0x09
7145bd8deadSopenharmony_ci        QUADRATIC_CURVE_TO_NV                           0x0A
7155bd8deadSopenharmony_ci        RELATIVE_QUADRATIC_CURVE_TO_NV                  0x0B
7165bd8deadSopenharmony_ci        CUBIC_CURVE_TO_NV                               0x0C
7175bd8deadSopenharmony_ci        RELATIVE_CUBIC_CURVE_TO_NV                      0x0D
7185bd8deadSopenharmony_ci        SMOOTH_QUADRATIC_CURVE_TO_NV                    0x0E
7195bd8deadSopenharmony_ci        RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV           0x0F
7205bd8deadSopenharmony_ci        SMOOTH_CUBIC_CURVE_TO_NV                        0x10
7215bd8deadSopenharmony_ci        RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV               0x11
7225bd8deadSopenharmony_ci        SMALL_CCW_ARC_TO_NV                             0x12
7235bd8deadSopenharmony_ci        RELATIVE_SMALL_CCW_ARC_TO_NV                    0x13
7245bd8deadSopenharmony_ci        SMALL_CW_ARC_TO_NV                              0x14
7255bd8deadSopenharmony_ci        RELATIVE_SMALL_CW_ARC_TO_NV                     0x15
7265bd8deadSopenharmony_ci        LARGE_CCW_ARC_TO_NV                             0x16
7275bd8deadSopenharmony_ci        RELATIVE_LARGE_CCW_ARC_TO_NV                    0x17
7285bd8deadSopenharmony_ci        LARGE_CW_ARC_TO_NV                              0x18
7295bd8deadSopenharmony_ci        RELATIVE_LARGE_CW_ARC_TO_NV                     0x19
7305bd8deadSopenharmony_ci        CONIC_CURVE_TO_NV                               0x1A
7315bd8deadSopenharmony_ci        RELATIVE_CONIC_CURVE_TO_NV                      0x1B
7325bd8deadSopenharmony_ci        ROUNDED_RECT_NV                                 0xE8
7335bd8deadSopenharmony_ci        RELATIVE_ROUNDED_RECT_NV                        0xE9
7345bd8deadSopenharmony_ci        ROUNDED_RECT2_NV                                0xEA
7355bd8deadSopenharmony_ci        RELATIVE_ROUNDED_RECT2_NV                       0xEB
7365bd8deadSopenharmony_ci        ROUNDED_RECT4_NV                                0xEC
7375bd8deadSopenharmony_ci        RELATIVE_ROUNDED_RECT4_NV                       0xED
7385bd8deadSopenharmony_ci        ROUNDED_RECT8_NV                                0xEE
7395bd8deadSopenharmony_ci        RELATIVE_ROUNDED_RECT8_NV                       0xEF
7405bd8deadSopenharmony_ci        RESTART_PATH_NV                                 0xF0
7415bd8deadSopenharmony_ci        DUP_FIRST_CUBIC_CURVE_TO_NV                     0xF2
7425bd8deadSopenharmony_ci        DUP_LAST_CUBIC_CURVE_TO_NV                      0xF4
7435bd8deadSopenharmony_ci        RECT_NV                                         0xF6
7445bd8deadSopenharmony_ci        RELATIVE_RECT_NV                                0xF7
7455bd8deadSopenharmony_ci        CIRCULAR_CCW_ARC_TO_NV                          0xF8
7465bd8deadSopenharmony_ci        CIRCULAR_CW_ARC_TO_NV                           0xFA
7475bd8deadSopenharmony_ci        CIRCULAR_TANGENT_ARC_TO_NV                      0xFC
7485bd8deadSopenharmony_ci        ARC_TO_NV                                       0xFE
7495bd8deadSopenharmony_ci        RELATIVE_ARC_TO_NV                              0xFF
7505bd8deadSopenharmony_ci
7515bd8deadSopenharmony_ci    Accepted by the <format> parameter of PathStringNV:
7525bd8deadSopenharmony_ci
7535bd8deadSopenharmony_ci        PATH_FORMAT_SVG_NV                              0x9070
7545bd8deadSopenharmony_ci        PATH_FORMAT_PS_NV                               0x9071
7555bd8deadSopenharmony_ci
7565bd8deadSopenharmony_ci    Accepted by the <fontTarget> parameter of PathGlyphsNV,
7575bd8deadSopenharmony_ci    PathGlyphRangeNV, and PathGlyphIndexRangeNV:
7585bd8deadSopenharmony_ci
7595bd8deadSopenharmony_ci        STANDARD_FONT_NAME_NV                           0x9072
7605bd8deadSopenharmony_ci        SYSTEM_FONT_NAME_NV                             0x9073
7615bd8deadSopenharmony_ci        FILE_NAME_NV                                    0x9074
7625bd8deadSopenharmony_ci
7635bd8deadSopenharmony_ci    Accepted by the <fontTarget> parameter of PathMemoryGlyphIndexArrayNV:
7645bd8deadSopenharmony_ci
7655bd8deadSopenharmony_ci        STANDARD_FONT_FORMAT_NV                         0x936C
7665bd8deadSopenharmony_ci
7675bd8deadSopenharmony_ci    Accepted by the <handleMissingGlyph> parameter of PathGlyphsNV and
7685bd8deadSopenharmony_ci    PathGlyphRangeNV:
7695bd8deadSopenharmony_ci
7705bd8deadSopenharmony_ci        SKIP_MISSING_GLYPH_NV                           0x90A9
7715bd8deadSopenharmony_ci        USE_MISSING_GLYPH_NV                            0x90AA
7725bd8deadSopenharmony_ci
7735bd8deadSopenharmony_ci    Returned by PathGlyphIndexRangeNV:
7745bd8deadSopenharmony_ci
7755bd8deadSopenharmony_ci        FONT_GLYPHS_AVAILABLE_NV                        0x9368
7765bd8deadSopenharmony_ci        FONT_TARGET_UNAVAILABLE_NV                      0x9369
7775bd8deadSopenharmony_ci        FONT_UNAVAILABLE_NV                             0x936A
7785bd8deadSopenharmony_ci        FONT_UNINTELLIGIBLE_NV                          0x936B  // once was FONT_CORRUPT_NV
7795bd8deadSopenharmony_ci        INVALID_ENUM
7805bd8deadSopenharmony_ci        INVALID_VALUE
7815bd8deadSopenharmony_ci        OUT_OF_MEMORY
7825bd8deadSopenharmony_ci
7835bd8deadSopenharmony_ci    Accepted by the <pname> parameter of PathParameterfNV,
7845bd8deadSopenharmony_ci    PathParameterfvNV, GetPathParameterfvNV, PathParameteriNV,
7855bd8deadSopenharmony_ci    PathParameterivNV, and GetPathParameterivNV:
7865bd8deadSopenharmony_ci
7875bd8deadSopenharmony_ci        PATH_STROKE_WIDTH_NV                            0x9075
7885bd8deadSopenharmony_ci        PATH_INITIAL_END_CAP_NV                         0x9077
7895bd8deadSopenharmony_ci        PATH_TERMINAL_END_CAP_NV                        0x9078
7905bd8deadSopenharmony_ci        PATH_JOIN_STYLE_NV                              0x9079
7915bd8deadSopenharmony_ci        PATH_MITER_LIMIT_NV                             0x907A
7925bd8deadSopenharmony_ci        PATH_INITIAL_DASH_CAP_NV                        0x907C
7935bd8deadSopenharmony_ci        PATH_TERMINAL_DASH_CAP_NV                       0x907D
7945bd8deadSopenharmony_ci        PATH_DASH_OFFSET_NV                             0x907E
7955bd8deadSopenharmony_ci        PATH_CLIENT_LENGTH_NV                           0x907F
7965bd8deadSopenharmony_ci        PATH_DASH_OFFSET_RESET_NV                       0x90B4
7975bd8deadSopenharmony_ci
7985bd8deadSopenharmony_ci        PATH_FILL_MODE_NV                               0x9080
7995bd8deadSopenharmony_ci        PATH_FILL_MASK_NV                               0x9081
8005bd8deadSopenharmony_ci        PATH_FILL_COVER_MODE_NV                         0x9082
8015bd8deadSopenharmony_ci        PATH_STROKE_COVER_MODE_NV                       0x9083
8025bd8deadSopenharmony_ci        PATH_STROKE_MASK_NV                             0x9084
8035bd8deadSopenharmony_ci        PATH_STROKE_BOUND_NV                            0x9086
8045bd8deadSopenharmony_ci
8055bd8deadSopenharmony_ci    Accepted by the <pname> parameter of PathParameterfNV and
8065bd8deadSopenharmony_ci    PathParameterfvNV:
8075bd8deadSopenharmony_ci
8085bd8deadSopenharmony_ci        PATH_END_CAPS_NV                                0x9076
8095bd8deadSopenharmony_ci        PATH_DASH_CAPS_NV                               0x907B
8105bd8deadSopenharmony_ci
8115bd8deadSopenharmony_ci    Accepted by the <fillMode> parameter of StencilFillPathNV and
8125bd8deadSopenharmony_ci    StencilFillPathInstancedNV:
8135bd8deadSopenharmony_ci
8145bd8deadSopenharmony_ci        INVERT
8155bd8deadSopenharmony_ci        COUNT_UP_NV                                     0x9088
8165bd8deadSopenharmony_ci        COUNT_DOWN_NV                                   0x9089
8175bd8deadSopenharmony_ci        PATH_FILL_MODE_NV                               see above
8185bd8deadSopenharmony_ci
8195bd8deadSopenharmony_ci    Accepted by the <color> parameter of PathColorGenNV,
8205bd8deadSopenharmony_ci    GetPathColorGenivNV, and GetPathColorGenfvNV:
8215bd8deadSopenharmony_ci
8225bd8deadSopenharmony_ci        PRIMARY_COLOR                                   0x8577  // from OpenGL 1.3
8235bd8deadSopenharmony_ci        PRIMARY_COLOR_NV                                0x852C  // from NV_register_combiners
8245bd8deadSopenharmony_ci        SECONDARY_COLOR_NV                              0x852D  // from NV_register_combiners
8255bd8deadSopenharmony_ci
8265bd8deadSopenharmony_ci    Accepted by the <genMode> parameter of PathColorGenNV, PathTexGenNV,
8275bd8deadSopenharmony_ci    ProgramPathFragmentInputGenNV:
8285bd8deadSopenharmony_ci
8295bd8deadSopenharmony_ci        NONE
8305bd8deadSopenharmony_ci        EYE_LINEAR
8315bd8deadSopenharmony_ci        OBJECT_LINEAR
8325bd8deadSopenharmony_ci        PATH_OBJECT_BOUNDING_BOX_NV                     0x908A
8335bd8deadSopenharmony_ci        CONSTANT
8345bd8deadSopenharmony_ci
8355bd8deadSopenharmony_ci    Accepted by the <coverMode> parameter of CoverFillPathNV and
8365bd8deadSopenharmony_ci    CoverFillPathInstancedNV:
8375bd8deadSopenharmony_ci
8385bd8deadSopenharmony_ci        CONVEX_HULL_NV                                  0x908B
8395bd8deadSopenharmony_ci        BOUNDING_BOX_NV                                 0x908D
8405bd8deadSopenharmony_ci        PATH_FILL_COVER_MODE_NV                         see above
8415bd8deadSopenharmony_ci
8425bd8deadSopenharmony_ci    Accepted by the <coverMode> parameter of CoverStrokePathNV and
8435bd8deadSopenharmony_ci    CoverStrokePathInstancedNV:
8445bd8deadSopenharmony_ci
8455bd8deadSopenharmony_ci        CONVEX_HULL_NV                                  see above
8465bd8deadSopenharmony_ci        BOUNDING_BOX_NV                                 see above
8475bd8deadSopenharmony_ci        PATH_STROKE_COVER_MODE_NV                       see above
8485bd8deadSopenharmony_ci
8495bd8deadSopenharmony_ci    Accepted by the <transformType> parameter of
8505bd8deadSopenharmony_ci    StencilFillPathInstancedNV, StencilStrokePathInstancedNV,
8515bd8deadSopenharmony_ci    CoverFillPathInstancedNV, and CoverStrokePathInstancedNV:
8525bd8deadSopenharmony_ci
8535bd8deadSopenharmony_ci        NONE
8545bd8deadSopenharmony_ci        TRANSLATE_X_NV                                  0x908E
8555bd8deadSopenharmony_ci        TRANSLATE_Y_NV                                  0x908F
8565bd8deadSopenharmony_ci        TRANSLATE_2D_NV                                 0x9090
8575bd8deadSopenharmony_ci        TRANSLATE_3D_NV                                 0x9091
8585bd8deadSopenharmony_ci        AFFINE_2D_NV                                    0x9092
8595bd8deadSopenharmony_ci        AFFINE_3D_NV                                    0x9094
8605bd8deadSopenharmony_ci        TRANSPOSE_AFFINE_2D_NV                          0x9096
8615bd8deadSopenharmony_ci        TRANSPOSE_AFFINE_3D_NV                          0x9098
8625bd8deadSopenharmony_ci
8635bd8deadSopenharmony_ci    Accepted by the <transformType> parameter of TransformPathNV:
8645bd8deadSopenharmony_ci
8655bd8deadSopenharmony_ci        NONE
8665bd8deadSopenharmony_ci        TRANSLATE_X_NV                                  see above
8675bd8deadSopenharmony_ci        TRANSLATE_Y_NV                                  see above
8685bd8deadSopenharmony_ci        TRANSLATE_2D_NV                                 see above
8695bd8deadSopenharmony_ci        TRANSLATE_3D_NV                                 see above
8705bd8deadSopenharmony_ci        AFFINE_2D_NV                                    see above
8715bd8deadSopenharmony_ci        AFFINE_3D_NV                                    see above
8725bd8deadSopenharmony_ci        TRANSPOSE_AFFINE_2D_NV                          see above
8735bd8deadSopenharmony_ci        TRANSPOSE_AFFINE_3D_NV                          see above
8745bd8deadSopenharmony_ci
8755bd8deadSopenharmony_ci    Accepted by the <type> or <pathNameType> parameter of
8765bd8deadSopenharmony_ci    StencilFillPathInstancedNV, StencilStrokePathInstancedNV,
8775bd8deadSopenharmony_ci    CoverFillPathInstancedNV, CoverStrokePathInstancedNV,
8785bd8deadSopenharmony_ci    GetPathMetricsNV, and GetPathSpacingNV:
8795bd8deadSopenharmony_ci
8805bd8deadSopenharmony_ci        UTF8_NV                                         0x909A
8815bd8deadSopenharmony_ci        UTF16_NV                                        0x909B
8825bd8deadSopenharmony_ci
8835bd8deadSopenharmony_ci    Accepted by the <coverMode> parameter of CoverFillPathInstancedNV:
8845bd8deadSopenharmony_ci
8855bd8deadSopenharmony_ci        CONVEX_HULL_NV                                  see above
8865bd8deadSopenharmony_ci        BOUNDING_BOX_NV                                 see above
8875bd8deadSopenharmony_ci        BOUNDING_BOX_OF_BOUNDING_BOXES_NV               0x909C
8885bd8deadSopenharmony_ci        PATH_FILL_COVER_MODE_NV                         see above
8895bd8deadSopenharmony_ci
8905bd8deadSopenharmony_ci    Accepted by the <coverMode> parameter of CoverStrokePathInstancedNV:
8915bd8deadSopenharmony_ci
8925bd8deadSopenharmony_ci        CONVEX_HULL_NV                                  see above
8935bd8deadSopenharmony_ci        BOUNDING_BOX_NV                                 see above
8945bd8deadSopenharmony_ci        BOUNDING_BOX_OF_BOUNDING_BOXES_NV               see above
8955bd8deadSopenharmony_ci        PATH_STROKE_COVER_MODE_NV                       see above
8965bd8deadSopenharmony_ci
8975bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetPathParameterfvNV and
8985bd8deadSopenharmony_ci    GetPathParameterivNV:
8995bd8deadSopenharmony_ci
9005bd8deadSopenharmony_ci        PATH_COMMAND_COUNT_NV                           0x909D
9015bd8deadSopenharmony_ci        PATH_COORD_COUNT_NV                             0x909E
9025bd8deadSopenharmony_ci        PATH_DASH_ARRAY_COUNT_NV                        0x909F
9035bd8deadSopenharmony_ci
9045bd8deadSopenharmony_ci        PATH_COMPUTED_LENGTH_NV                         0x90A0
9055bd8deadSopenharmony_ci
9065bd8deadSopenharmony_ci        PATH_OBJECT_BOUNDING_BOX_NV                     see above
9075bd8deadSopenharmony_ci        PATH_FILL_BOUNDING_BOX_NV                       0x90A1
9085bd8deadSopenharmony_ci        PATH_STROKE_BOUNDING_BOX_NV                     0x90A2
9095bd8deadSopenharmony_ci
9105bd8deadSopenharmony_ci    Accepted by the <value> parameter of PathParameterfNV,
9115bd8deadSopenharmony_ci    PathParameterfvNV, PathParameteriNV, and PathParameterivNV
9125bd8deadSopenharmony_ci    when <pname> is one of PATH_END_CAPS_NV, PATH_INTIAL_END_CAP_NV,
9135bd8deadSopenharmony_ci    PATH_TERMINAL_END_CAP_NV, PATH_DASH_CAPS_NV, PATH_INITIAL_DASH_CAP_NV,
9145bd8deadSopenharmony_ci    and PATH_TERMINAL_DASH_CAP_NV:
9155bd8deadSopenharmony_ci
9165bd8deadSopenharmony_ci        FLAT
9175bd8deadSopenharmony_ci        SQUARE_NV                                       0x90A3
9185bd8deadSopenharmony_ci        ROUND_NV                                        0x90A4
9195bd8deadSopenharmony_ci        TRIANGULAR_NV                                   0x90A5
9205bd8deadSopenharmony_ci
9215bd8deadSopenharmony_ci    Accepted by the <value> parameter of PathParameterfNV,
9225bd8deadSopenharmony_ci    PathParameterfvNV, PathParameteriNV, and PathParameterivNV
9235bd8deadSopenharmony_ci    when <pname> is PATH_JOIN_STYLE_NV:
9245bd8deadSopenharmony_ci
9255bd8deadSopenharmony_ci        NONE
9265bd8deadSopenharmony_ci        ROUND_NV                                        see above
9275bd8deadSopenharmony_ci        BEVEL_NV                                        0x90A6
9285bd8deadSopenharmony_ci        MITER_REVERT_NV                                 0x90A7
9295bd8deadSopenharmony_ci        MITER_TRUNCATE_NV                               0x90A8
9305bd8deadSopenharmony_ci
9315bd8deadSopenharmony_ci    Accepted by the <value> parameter of PathParameterfNV,
9325bd8deadSopenharmony_ci    PathParameterfvNV, PathParameteriNV, and PathParameterivNV when
9335bd8deadSopenharmony_ci    <pname> is PATH_DASH_OFFSET_RESET_NV:
9345bd8deadSopenharmony_ci
9355bd8deadSopenharmony_ci        MOVE_TO_RESETS_NV                               0x90B5
9365bd8deadSopenharmony_ci        MOVE_TO_CONTINUES_NV                            0x90B6
9375bd8deadSopenharmony_ci
9385bd8deadSopenharmony_ci    Accepted by the <fontStyle> parameter of PathGlyphsNV,
9395bd8deadSopenharmony_ci    PathGlyphRangeNV, and PathGlyphIndexRangeNV:
9405bd8deadSopenharmony_ci
9415bd8deadSopenharmony_ci        NONE
9425bd8deadSopenharmony_ci        BOLD_BIT_NV                                     0x01
9435bd8deadSopenharmony_ci        ITALIC_BIT_NV                                   0x02
9445bd8deadSopenharmony_ci
9455bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
9465bd8deadSopenharmony_ci    GetInteger64v, GetFloatv, and GetDoublev:
9475bd8deadSopenharmony_ci
9485bd8deadSopenharmony_ci        PATH_ERROR_POSITION_NV                          0x90AB
9495bd8deadSopenharmony_ci
9505bd8deadSopenharmony_ci        PATH_FOG_GEN_MODE_NV                            0x90AC
9515bd8deadSopenharmony_ci
9525bd8deadSopenharmony_ci        PATH_STENCIL_FUNC_NV                            0x90B7
9535bd8deadSopenharmony_ci        PATH_STENCIL_REF_NV                             0x90B8
9545bd8deadSopenharmony_ci        PATH_STENCIL_VALUE_MASK_NV                      0x90B9
9555bd8deadSopenharmony_ci
9565bd8deadSopenharmony_ci        PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV             0x90BD
9575bd8deadSopenharmony_ci        PATH_STENCIL_DEPTH_OFFSET_UNITS_NV              0x90BE
9585bd8deadSopenharmony_ci
9595bd8deadSopenharmony_ci        PATH_COVER_DEPTH_FUNC_NV                        0x90BF
9605bd8deadSopenharmony_ci
9615bd8deadSopenharmony_ci    Accepted as a bit within the <metricQueryMask> parameter of
9625bd8deadSopenharmony_ci    GetPathMetricRangeNV or GetPathMetricsNV:
9635bd8deadSopenharmony_ci
9645bd8deadSopenharmony_ci        // per-glyph metrics
9655bd8deadSopenharmony_ci        GLYPH_WIDTH_BIT_NV                              0x01
9665bd8deadSopenharmony_ci        GLYPH_HEIGHT_BIT_NV                             0x02
9675bd8deadSopenharmony_ci        GLYPH_HORIZONTAL_BEARING_X_BIT_NV               0x04
9685bd8deadSopenharmony_ci        GLYPH_HORIZONTAL_BEARING_Y_BIT_NV               0x08
9695bd8deadSopenharmony_ci        GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV         0x10
9705bd8deadSopenharmony_ci        GLYPH_VERTICAL_BEARING_X_BIT_NV                 0x20
9715bd8deadSopenharmony_ci        GLYPH_VERTICAL_BEARING_Y_BIT_NV                 0x40
9725bd8deadSopenharmony_ci        GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV           0x80
9735bd8deadSopenharmony_ci        GLYPH_HAS_KERNING_BIT_NV                        0x100
9745bd8deadSopenharmony_ci
9755bd8deadSopenharmony_ci        // per-font face metrics
9765bd8deadSopenharmony_ci        FONT_X_MIN_BOUNDS_BIT_NV                        0x00010000
9775bd8deadSopenharmony_ci        FONT_Y_MIN_BOUNDS_BIT_NV                        0x00020000
9785bd8deadSopenharmony_ci        FONT_X_MAX_BOUNDS_BIT_NV                        0x00040000
9795bd8deadSopenharmony_ci        FONT_Y_MAX_BOUNDS_BIT_NV                        0x00080000
9805bd8deadSopenharmony_ci        FONT_UNITS_PER_EM_BIT_NV                        0x00100000
9815bd8deadSopenharmony_ci        FONT_ASCENDER_BIT_NV                            0x00200000
9825bd8deadSopenharmony_ci        FONT_DESCENDER_BIT_NV                           0x00400000
9835bd8deadSopenharmony_ci        FONT_HEIGHT_BIT_NV                              0x00800000
9845bd8deadSopenharmony_ci        FONT_MAX_ADVANCE_WIDTH_BIT_NV                   0x01000000
9855bd8deadSopenharmony_ci        FONT_MAX_ADVANCE_HEIGHT_BIT_NV                  0x02000000
9865bd8deadSopenharmony_ci        FONT_UNDERLINE_POSITION_BIT_NV                  0x04000000
9875bd8deadSopenharmony_ci        FONT_UNDERLINE_THICKNESS_BIT_NV                 0x08000000
9885bd8deadSopenharmony_ci        FONT_HAS_KERNING_BIT_NV                         0x10000000
9895bd8deadSopenharmony_ci        FONT_NUM_GLYPH_INDICES_BIT_NV                   0x20000000
9905bd8deadSopenharmony_ci
9915bd8deadSopenharmony_ci    Accepted by the <pathListMode> parameter of GetPathSpacingNV:
9925bd8deadSopenharmony_ci
9935bd8deadSopenharmony_ci        ACCUM_ADJACENT_PAIRS_NV                         0x90AD
9945bd8deadSopenharmony_ci        ADJACENT_PAIRS_NV                               0x90AE
9955bd8deadSopenharmony_ci        FIRST_TO_REST_NV                                0x90AF
9965bd8deadSopenharmony_ci
9975bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetPathColorGenivNV,
9985bd8deadSopenharmony_ci    GetPathColorGenfvNV, GetPathTexGenivNV and GetPathTexGenfvNV:
9995bd8deadSopenharmony_ci
10005bd8deadSopenharmony_ci        PATH_GEN_MODE_NV                                0x90B0
10015bd8deadSopenharmony_ci        PATH_GEN_COEFF_NV                               0x90B1
10025bd8deadSopenharmony_ci
10035bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetPathColorGenivNV and
10045bd8deadSopenharmony_ci    GetPathColorGenfvNV:
10055bd8deadSopenharmony_ci
10065bd8deadSopenharmony_ci        PATH_GEN_COLOR_FORMAT_NV                        0x90B2
10075bd8deadSopenharmony_ci
10085bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetPathTexGenivNV and
10095bd8deadSopenharmony_ci    GetPathTexGenfvNV:
10105bd8deadSopenharmony_ci
10115bd8deadSopenharmony_ci        PATH_GEN_COMPONENTS_NV                          0x90B3
10125bd8deadSopenharmony_ci
10135bd8deadSopenharmony_ci    Accepted by the <programInterface> parameter of GetProgramInterfaceiv,
10145bd8deadSopenharmony_ci    GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv,
10155bd8deadSopenharmony_ci    GetProgramResourcefvNV, and GetProgramResourceLocation:
10165bd8deadSopenharmony_ci
10175bd8deadSopenharmony_ci        FRAGMENT_INPUT_NV                               0x936D
10185bd8deadSopenharmony_ci
10195bd8deadSopenharmony_ci    Accepted in the <props> array of GetProgramResourceiv:
10205bd8deadSopenharmony_ci
10215bd8deadSopenharmony_ci        PATH_GEN_MODE_NV                                see above
10225bd8deadSopenharmony_ci        PATH_GEN_COMPONENTS_NV                          see above
10235bd8deadSopenharmony_ci
10245bd8deadSopenharmony_ci    Accepted in the <props> array of GetProgramResourcefvNV:
10255bd8deadSopenharmony_ci
10265bd8deadSopenharmony_ci        PATH_GEN_COEFF_NV                               see above
10275bd8deadSopenharmony_ci
10285bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 3.2 (unabridged) Specification
10295bd8deadSopenharmony_ci(OpenGL Operation)
10305bd8deadSopenharmony_ci
10315bd8deadSopenharmony_ci    Add to the end of Section 2.12.1 (Matrices) with
10325bd8deadSopenharmony_ci    EXT_direct_state_access language applied...
10335bd8deadSopenharmony_ci
10345bd8deadSopenharmony_ci    "The command
10355bd8deadSopenharmony_ci
10365bd8deadSopenharmony_ci        void MatrixLoad3x2fNV(enum matrixMode, const float *m);
10375bd8deadSopenharmony_ci
10385bd8deadSopenharmony_ci    is equivalent to:
10395bd8deadSopenharmony_ci
10405bd8deadSopenharmony_ci        const float equiv_3x2matrix[16] = {
10415bd8deadSopenharmony_ci            m[0], m[2], 0, m[4],
10425bd8deadSopenharmony_ci            m[1], m[3], 0, m[5],
10435bd8deadSopenharmony_ci            0,    0,    1, 0,
10445bd8deadSopenharmony_ci            0,    0,    0, 1
10455bd8deadSopenharmony_ci        };
10465bd8deadSopenharmony_ci        MatrixLoadTransposefEXT(matrixMode, equiv_3x2matrix);
10475bd8deadSopenharmony_ci
10485bd8deadSopenharmony_ci    The command
10495bd8deadSopenharmony_ci
10505bd8deadSopenharmony_ci        void MatrixLoad3x3fNV(enum matrixMode, const float *m);
10515bd8deadSopenharmony_ci
10525bd8deadSopenharmony_ci    is equivalent to:
10535bd8deadSopenharmony_ci
10545bd8deadSopenharmony_ci        const float equiv_3x3matrix[16] = {
10555bd8deadSopenharmony_ci            m[0], m[3], 0, m[6],
10565bd8deadSopenharmony_ci            m[1], m[4], 0, m[7],
10575bd8deadSopenharmony_ci            0,    0,    1, 0,
10585bd8deadSopenharmony_ci            m[2], m[5], 0, m[8],
10595bd8deadSopenharmony_ci        };
10605bd8deadSopenharmony_ci        MatrixLoadTransposefEXT(matrixMode, equiv_3x3matrix);
10615bd8deadSopenharmony_ci
10625bd8deadSopenharmony_ci    The command
10635bd8deadSopenharmony_ci
10645bd8deadSopenharmony_ci        void MatrixLoadTranspose3x3fNV(enum matrixMode, const float *m);
10655bd8deadSopenharmony_ci
10665bd8deadSopenharmony_ci    is equivalent to:
10675bd8deadSopenharmony_ci
10685bd8deadSopenharmony_ci        const float equiv_3x3matrix[16] = {
10695bd8deadSopenharmony_ci            m[0], m[1], 0, m[2],
10705bd8deadSopenharmony_ci            m[3], m[4], 0, m[5],
10715bd8deadSopenharmony_ci            0,    0,    1, 0,
10725bd8deadSopenharmony_ci            m[6], m[7], 0, m[8],
10735bd8deadSopenharmony_ci        };
10745bd8deadSopenharmony_ci        MatrixLoadTransposefEXT(matrixMode, equiv_3x3matrix);
10755bd8deadSopenharmony_ci
10765bd8deadSopenharmony_ci    The command
10775bd8deadSopenharmony_ci
10785bd8deadSopenharmony_ci        void MatrixMult3x2fNV(enum matrixMode, const float *m);
10795bd8deadSopenharmony_ci
10805bd8deadSopenharmony_ci    is equivalent to:
10815bd8deadSopenharmony_ci
10825bd8deadSopenharmony_ci        const float equiv_3x2matrix[16] = {
10835bd8deadSopenharmony_ci            m[0], m[2], 0, m[4],
10845bd8deadSopenharmony_ci            m[1], m[3], 0, m[5],
10855bd8deadSopenharmony_ci            0,    0,    1, 0,
10865bd8deadSopenharmony_ci            0,    0,    0, 1
10875bd8deadSopenharmony_ci        };
10885bd8deadSopenharmony_ci        MatrixMultTransposefEXT(matrixMode, equiv_3x2matrix);
10895bd8deadSopenharmony_ci
10905bd8deadSopenharmony_ci    The command
10915bd8deadSopenharmony_ci
10925bd8deadSopenharmony_ci        void MatrixMult3x3fNV(enum matrixMode, const float *m);
10935bd8deadSopenharmony_ci
10945bd8deadSopenharmony_ci    is equivalent to:
10955bd8deadSopenharmony_ci
10965bd8deadSopenharmony_ci        const float equiv_3x3matrix[16] = {
10975bd8deadSopenharmony_ci            m[0], m[3], 0, m[6],
10985bd8deadSopenharmony_ci            m[1], m[4], 0, m[7],
10995bd8deadSopenharmony_ci            0,    0,    1, 0,
11005bd8deadSopenharmony_ci            m[2], m[5], 0, m[8],
11015bd8deadSopenharmony_ci        };
11025bd8deadSopenharmony_ci        MatrixMultTransposefEXT(matrixMode, equiv_3x3matrix);
11035bd8deadSopenharmony_ci
11045bd8deadSopenharmony_ci    The command
11055bd8deadSopenharmony_ci
11065bd8deadSopenharmony_ci        void MatrixMultTranspose3x3fNV(enum matrixMode, const float *m);
11075bd8deadSopenharmony_ci
11085bd8deadSopenharmony_ci    is equivalent to:
11095bd8deadSopenharmony_ci
11105bd8deadSopenharmony_ci        const float equiv_3x3matrix[16] = {
11115bd8deadSopenharmony_ci            m[0], m[1], 0, m[2],
11125bd8deadSopenharmony_ci            m[3], m[4], 0, m[5],
11135bd8deadSopenharmony_ci            0,    0,    1, 0,
11145bd8deadSopenharmony_ci            m[6], m[7], 0, m[8],
11155bd8deadSopenharmony_ci        };
11165bd8deadSopenharmony_ci        MatrixMultTransposefEXT(matrixMode, equiv_3x3matrix);"
11175bd8deadSopenharmony_ci
11185bd8deadSopenharmony_ci    Modify the ARB_program_interface_query language as follows...
11195bd8deadSopenharmony_ci
11205bd8deadSopenharmony_ci    Add to the "query properties of the interfaces of a program object"
11215bd8deadSopenharmony_ci    paragraph, so the "supported values of <programInterface>" includes:
11225bd8deadSopenharmony_ci
11235bd8deadSopenharmony_ci      * FRAGMENT_INPUT_NV corresponds to the set of active input variables
11245bd8deadSopenharmony_ci        used by the fragment shader stage of <program> (if a fragment
11255bd8deadSopenharmony_ci        stage exists).  (This may be different from PROGRAM_INPUT except
11265bd8deadSopenharmony_ci        when the first shader stage is the fragment stage when they will
11275bd8deadSopenharmony_ci        be identical.)
11285bd8deadSopenharmony_ci
11295bd8deadSopenharmony_ci    Change this sentence about when locations are assigned to include
11305bd8deadSopenharmony_ci    FRAGMENT_INPUT_NV so it reads:
11315bd8deadSopenharmony_ci
11325bd8deadSopenharmony_ci    "When a program is linked successfully, active variables in the
11335bd8deadSopenharmony_ci    UNIFORM, PROGRAM_INPUT, FRAGMENT_INPUT_NV, PROGRAM_OUTPUT interface,
11345bd8deadSopenharmony_ci    or in any of the subroutine uniform interfaces, are assigned one or
11355bd8deadSopenharmony_ci    more signed integer /locations/."
11365bd8deadSopenharmony_ci
11375bd8deadSopenharmony_ci    Amend Table X.1 "GetProgramResourceiv properties and supported
11385bd8deadSopenharmony_ci    interfaces" to add FRAGMENT_INPUT_NV to all the properties that
11395bd8deadSopenharmony_ci    allow PROGRAM_INPUT.  Specifically:
11405bd8deadSopenharmony_ci
11415bd8deadSopenharmony_ci      * NAME_LENGTH
11425bd8deadSopenharmony_ci      * TYPE
11435bd8deadSopenharmony_ci      * ARRAY_SIZE
11445bd8deadSopenharmony_ci      * REFERENCED_BY_*_SHADER
11455bd8deadSopenharmony_ci      * LOCATION
11465bd8deadSopenharmony_ci      * IS_PER_PATCH (will always be false for FRAGMENT_INPUT_NV)
11475bd8deadSopenharmony_ci
11485bd8deadSopenharmony_ci    Further amend Table X.1 "GetProgramResourceiv properties with two
11495bd8deadSopenharmony_ci    more properties for fragment input path generation state:
11505bd8deadSopenharmony_ci
11515bd8deadSopenharmony_ci      Property                     Supported Interfaces
11525bd8deadSopenharmony_ci      ---------------------------  ----------------------------------------
11535bd8deadSopenharmony_ci      PATH_GEN_MODE_NV             FRAGMENT_INPUT_NV
11545bd8deadSopenharmony_ci      PATH_GEN_COMPONENTS_NV       FRAGMENT_INPUT_NV
11555bd8deadSopenharmony_ci
11565bd8deadSopenharmony_ci    Amend the discussion of GetProgramResourceiv properties, adding:
11575bd8deadSopenharmony_ci
11585bd8deadSopenharmony_ci    "For the property PATH_GEN_MODE_NV, a single integer identifying
11595bd8deadSopenharmony_ci    the path generation mode of an active variable is written to
11605bd8deadSopenharmony_ci    <params>.  The integer returned is one of NONE, OBJECT_LINEAR,
11615bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV, or EYE_LINEAR based on how
11625bd8deadSopenharmony_ci    ProgramPathFragmentInputGenNV last specified the program resource's
11635bd8deadSopenharmony_ci    path generation mode.  The initial state is NONE.
11645bd8deadSopenharmony_ci
11655bd8deadSopenharmony_ci    For the property PATH_GEN_COMPONENTS_NV, a single integer identifying
11665bd8deadSopenharmony_ci    the number of generated path components an active variable is written
11675bd8deadSopenharmony_ci    to <params>.  The integer returned is between 0 and 4 based on how
11685bd8deadSopenharmony_ci    ProgramPathFragmentInputGenNV last specified the program resource's
11695bd8deadSopenharmony_ci    path generation number of components.  The initial state is 0."
11705bd8deadSopenharmony_ci
11715bd8deadSopenharmony_ci    Amend the list of tokens supported for the <programInterface> parameter of
11725bd8deadSopenharmony_ci    GetProgramResourceLocation to include FRAGMENT_INPUT_NV so the relevant
11735bd8deadSopenharmony_ci    sentence reads:
11745bd8deadSopenharmony_ci
11755bd8deadSopenharmony_ci    "For GetProgramResourceLocation, <programInterface> must be one
11765bd8deadSopenharmony_ci    of UNIFORM, PROGRAM_INPUT, FRAGMENT_INPUT_NV, PROGRAM_OUTPUT,
11775bd8deadSopenharmony_ci    VERTEX_SUBROUTINE_UNIFORM, TESS_CONTROL_SUBROUTINE_UNIFORM,
11785bd8deadSopenharmony_ci    TESS_EVALUATION_SUBROUTINE_UNIFORM, GEOMETRY_SUBROUTINE_UNIFORM,
11795bd8deadSopenharmony_ci    FRAGMENT_SUBROUTINE_UNIFORM, or COMPUTE_SUBROUTINE_UNIFORM."
11805bd8deadSopenharmony_ci
11815bd8deadSopenharmony_ci    After the discussion of GetProgramResourceiv, add:
11825bd8deadSopenharmony_ci
11835bd8deadSopenharmony_ci    "The command
11845bd8deadSopenharmony_ci
11855bd8deadSopenharmony_ci        void GetProgramResourcefvNV(uint program, enum programInterface,
11865bd8deadSopenharmony_ci                                    uint index, sizei propCount,
11875bd8deadSopenharmony_ci                                    const enum *props, sizei bufSize,
11885bd8deadSopenharmony_ci                                    sizei *length, float *params);
11895bd8deadSopenharmony_ci
11905bd8deadSopenharmony_ci    operates in the same manner as GetProgramResourceiv expect the
11915bd8deadSopenharmony_ci    returned parameters values are floating-point and the only valid
11925bd8deadSopenharmony_ci    value of <programInterface> is FRAGMENT_INPUT_NV and the only valid value
11935bd8deadSopenharmony_ci    for the elements of the <props> array is PATH_GEN_COEFF_NV; otherwise
11945bd8deadSopenharmony_ci    INVALID_ENUM is generated.
11955bd8deadSopenharmony_ci
11965bd8deadSopenharmony_ci    For the property PATH_GEN_COEFF_NV, sixteen floating-point values
11975bd8deadSopenharmony_ci    are written to <params> (limited to writing <bufSize> floating-point
11985bd8deadSopenharmony_ci    values)."
11995bd8deadSopenharmony_ci
12005bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 3.2 (unabridged) Specification
12015bd8deadSopenharmony_ci(Rasterization)
12025bd8deadSopenharmony_ci
12035bd8deadSopenharmony_ci    Append to the end of the "Shader Inputs" subsection of Section 3.12.2
12045bd8deadSopenharmony_ci    "Shader Execution":
12055bd8deadSopenharmony_ci
12065bd8deadSopenharmony_ci    The command
12075bd8deadSopenharmony_ci
12085bd8deadSopenharmony_ci        void ProgramPathFragmentInputGenNV(uint program,
12095bd8deadSopenharmony_ci                                           int location,
12105bd8deadSopenharmony_ci                                           enum genMode,
12115bd8deadSopenharmony_ci                                           int components,
12125bd8deadSopenharmony_ci                                           const float *coeffs);
12135bd8deadSopenharmony_ci
12145bd8deadSopenharmony_ci    controls how a user-defined (non-built-in) fragment input of a
12155bd8deadSopenharmony_ci    GLSL program object is computed for fragment shading operations that
12165bd8deadSopenharmony_ci    occur as a result of CoverFillPathNV or CoverStrokePathNV.
12175bd8deadSopenharmony_ci
12185bd8deadSopenharmony_ci    /program/ names a GLSL program object.  If /program/ has not been
12195bd8deadSopenharmony_ci    successfully linked, the error INVALID_OPERATION is generated.
12205bd8deadSopenharmony_ci
12215bd8deadSopenharmony_ci    The given fragment input generation state is loaded into the fragment
12225bd8deadSopenharmony_ci    input variable location identified by /location/.  This location
12235bd8deadSopenharmony_ci    is a value returned either by GetProgramResourceLocation with a
12245bd8deadSopenharmony_ci    /programInterface/ of FRAGMENT_INPUT_NV and a given fragment shader
12255bd8deadSopenharmony_ci    input variable name or by GetProgramResourceiv with FRAGMENT_INPUT_NV
12265bd8deadSopenharmony_ci    for the /programInterface/ and LOCATION for the property for a given
12275bd8deadSopenharmony_ci    fragment input resource index.
12285bd8deadSopenharmony_ci
12295bd8deadSopenharmony_ci    If the value of location is -1, the ProgramPathFragmentInputGenNV command
12305bd8deadSopenharmony_ci    will silently ignore the command, and the program's path fragment input
12315bd8deadSopenharmony_ci    generation state will not be changed.
12325bd8deadSopenharmony_ci
12335bd8deadSopenharmony_ci    If any of the following conditions occur, an INVALID_OPERATION error
12345bd8deadSopenharmony_ci    is generated by the ProgramPathFragmentInputGenNV, and no state is changed:
12355bd8deadSopenharmony_ci
12365bd8deadSopenharmony_ci        * if the size indicated in the /components/ of the
12375bd8deadSopenharmony_ci          ProgramPathFragmentInputGenNV command used does not match the
12385bd8deadSopenharmony_ci          size of the fragment input scalar or vector declared in the
12395bd8deadSopenharmony_ci          shader,
12405bd8deadSopenharmony_ci
12415bd8deadSopenharmony_ci        * if the fragment input declared in the shader is not
12425bd8deadSopenharmony_ci          single-precision floating-point, or
12435bd8deadSopenharmony_ci
12445bd8deadSopenharmony_ci        * if no fragment input variable with a location of /location/
12455bd8deadSopenharmony_ci          exists in the program object named by /program/ and location
12465bd8deadSopenharmony_ci          is not -1, or
12475bd8deadSopenharmony_ci
12485bd8deadSopenharmony_ci        * if the fragment input declared in the shader is a built-in
12495bd8deadSopenharmony_ci          variables (i.e. prefixed by "gl_").
12505bd8deadSopenharmony_ci
12515bd8deadSopenharmony_ci    When covering paths, fragment input variables are interpolated at
12525bd8deadSopenharmony_ci    each shaded fragment based on the corresponding fragment input
12535bd8deadSopenharmony_ci    generation state specified by ProgramPathFragmentInputGenNV for
12545bd8deadSopenharmony_ci    each respective fragment input.
12555bd8deadSopenharmony_ci
12565bd8deadSopenharmony_ci    The /genMode/, /components/, and /coeffs/ parameters are used to
12575bd8deadSopenharmony_ci    generate the fragment input variable values identically as the
12585bd8deadSopenharmony_ci    PathTexGenNV command's corresponding parameters except it is a
12595bd8deadSopenharmony_ci    fragment input that is generated rather than a texture coordinate set
12605bd8deadSopenharmony_ci    (see the "TEXTURE COORDINATE SET GENERATION FOR PATH COVER COMMANDS"
12615bd8deadSopenharmony_ci    discussion in section 5.X.2.2 "Path Covering").  Because there is
12625bd8deadSopenharmony_ci    no associated texture coordinate set, the sc, tc, rc, and qc values
12635bd8deadSopenharmony_ci    when discussing PathTexGenNV are always zero when generating fragment
12645bd8deadSopenharmony_ci    input variables.
12655bd8deadSopenharmony_ci
12665bd8deadSopenharmony_ci    When covering paths, if a fragment input variable has not had its
12675bd8deadSopenharmony_ci    path fragment input generation state successfully generated, it as
12685bd8deadSopenharmony_ci    if the values of this variable are always initialized to zero when
12695bd8deadSopenharmony_ci    the fragment shader is executing.
12705bd8deadSopenharmony_ci
12715bd8deadSopenharmony_ci    Also when covering paths, GLSL fragment shaders support the following
12725bd8deadSopenharmony_ci    built-in fragment input variables:
12735bd8deadSopenharmony_ci
12745bd8deadSopenharmony_ci        in vec4 gl_TexCoord[gl_MaxTextureCoords];
12755bd8deadSopenharmony_ci        in vec4 gl_Color
12765bd8deadSopenharmony_ci        in vec4 gl_FrontColor;
12775bd8deadSopenharmony_ci        in vec4 gl_BackColor;
12785bd8deadSopenharmony_ci        in vec4 gl_SecondaryColor;
12795bd8deadSopenharmony_ci        in vec4 gl_FrontSecondaryColor;
12805bd8deadSopenharmony_ci        in vec4 gl_BackSecondaryColor;
12815bd8deadSopenharmony_ci        in float gl_FogFragCoord;
12825bd8deadSopenharmony_ci
12835bd8deadSopenharmony_ci    These respectively are initialized to the fragment input generated
12845bd8deadSopenharmony_ci    coordinates of PathTexGenNV, PathColorGenNV for GL_PRIMARY_COLOR_NV
12855bd8deadSopenharmony_ci    (front or back), PathColorGenNV for GL_SECONDARY_COLOR_NV (front or
12865bd8deadSopenharmony_ci    back), and glPathFogGenNV."
12875bd8deadSopenharmony_ci
12885bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 3.2 (unabridged) Specification
12895bd8deadSopenharmony_ci(Per-Fragment Operations and the Frame Buffer)
12905bd8deadSopenharmony_ci
12915bd8deadSopenharmony_ci    None
12925bd8deadSopenharmony_ci
12935bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 3.2 (unabridged) Specification
12945bd8deadSopenharmony_ci(Special Functions)
12955bd8deadSopenharmony_ci
12965bd8deadSopenharmony_ci -- Insert section 5.X "Path Rendering" after 5.3 "Feedback"
12975bd8deadSopenharmony_ci
12985bd8deadSopenharmony_ci    5.X Path Rendering
12995bd8deadSopenharmony_ci
13005bd8deadSopenharmony_ci    5.X.1 Path Specification
13015bd8deadSopenharmony_ci
13025bd8deadSopenharmony_ci    PATH COMMANDS
13035bd8deadSopenharmony_ci
13045bd8deadSopenharmony_ci    Paths are specified as a sequence of path commands; each path command
13055bd8deadSopenharmony_ci    has an associated sequence of floating-point coordinates with the
13065bd8deadSopenharmony_ci    number of such coordinates depending on the specific path command.
13075bd8deadSopenharmony_ci    Coordinates are specified in a sequence independent from the path
13085bd8deadSopenharmony_ci    command sequence; coordinates from the coordinate sequence are matched
13095bd8deadSopenharmony_ci    up with (associated with) commands, in the order of the command,
13105bd8deadSopenharmony_ci    with coordinates extracted from the front of the coordinate sequence.
13115bd8deadSopenharmony_ci
13125bd8deadSopenharmony_ci    Valid path commands are listed in table 5.pathCommands.  Each path
13135bd8deadSopenharmony_ci    command is listed with its associated token, description, character
13145bd8deadSopenharmony_ci    alias, count of associated coordinates.
13155bd8deadSopenharmony_ci
13165bd8deadSopenharmony_ci    As an example of how path commands associated with path coordinates,
13175bd8deadSopenharmony_ci    if the command sequence was MOVE_TO_NV, LINE_TO_NV, CUBIC_CURVE_TO_NV,
13185bd8deadSopenharmony_ci    CLOSE_PATH_NV and the coordinates were 1, 2, 3, 4, 5, 6, 7, 8, 9,
13195bd8deadSopenharmony_ci    10, the MOVE_TO_NV command would be matched to coordinates 1 and 2,
13205bd8deadSopenharmony_ci    LINE_TO_NV would be matched to 3 and 4, CUBIC_CURVE_TO_NV would be
13215bd8deadSopenharmony_ci    matched to 5, 6, 7, 8, 9, 10, and CLOSE_PATH_NV would be matched to
13225bd8deadSopenharmony_ci    no coordinates.
13235bd8deadSopenharmony_ci
13245bd8deadSopenharmony_ci    Path commands are processed in their sequence order to generate the
13255bd8deadSopenharmony_ci    path's outline.  The outline generation process maintains three 2D
13265bd8deadSopenharmony_ci    (x,y) state variables for each path processed: the start position
13275bd8deadSopenharmony_ci    (sp), the current position (cp), and the prior end point (pep);
13285bd8deadSopenharmony_ci    /sp/, /cp/ and /pep/ are initially (0,0) when a path starts being
13295bd8deadSopenharmony_ci    processed.
13305bd8deadSopenharmony_ci
13315bd8deadSopenharmony_ci    Table 5.pathCommands: Path Commands
13325bd8deadSopenharmony_ci
13335bd8deadSopenharmony_ci                                                       Character   Coordinate
13345bd8deadSopenharmony_ci    Token                       Description            alias       count
13355bd8deadSopenharmony_ci    ==========================  =====================  ==========  ==========
13365bd8deadSopenharmony_ci    MOVE_TO_NV                  Absolute move          'M'         2
13375bd8deadSopenharmony_ci                                current point
13385bd8deadSopenharmony_ci    RELATIVE_MOVE_TO_NV         Relative move          'm'         2
13395bd8deadSopenharmony_ci                                current point
13405bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
13415bd8deadSopenharmony_ci    CLOSE_PATH_NV               Close path             'Z' or 'z'  0
13425bd8deadSopenharmony_ci    RESTART_PATH_NV             Reset the path         -           0
13435bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
13445bd8deadSopenharmony_ci    LINE_TO_NV                  Absolute line          'L'         2
13455bd8deadSopenharmony_ci    RELATIVE_LINE_TO_NV         Relative line          'l'         2
13465bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
13475bd8deadSopenharmony_ci    HORIZONTAL_LINE_TO_NV       Absolute horizontal    'H'         1
13485bd8deadSopenharmony_ci                                line
13495bd8deadSopenharmony_ci    RELATIVE_HORIZONTAL-        Relative horizontal    'h'         1
13505bd8deadSopenharmony_ci      _LINE_TO_NV               line
13515bd8deadSopenharmony_ci    VERTICAL_LINE_TO_NV         Absolute vertical      'V'         1
13525bd8deadSopenharmony_ci                                line
13535bd8deadSopenharmony_ci    RELATIVE_VERTICAL-          Relative vertical      'v'         1
13545bd8deadSopenharmony_ci      _LINE_TO_NV               line
13555bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
13565bd8deadSopenharmony_ci    QUADRATIC_CURVE_TO_NV       Absolute quadratic     'Q'         4
13575bd8deadSopenharmony_ci                                Bezier segment
13585bd8deadSopenharmony_ci    RELATIVE-                   Relative quadratic     'q'         4
13595bd8deadSopenharmony_ci      _QUADRATIC_CURVE_TO_NV    Bezier segment
13605bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
13615bd8deadSopenharmony_ci    CUBIC_CURVE_TO_NV           Absolute cubic         'C'         6
13625bd8deadSopenharmony_ci                                Bezier segment
13635bd8deadSopenharmony_ci    RELATIVE_CUBIC_CURVE_TO_NV  Relative cubic         'c'         6
13645bd8deadSopenharmony_ci                                Bezier segment
13655bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
13665bd8deadSopenharmony_ci    SMOOTH-                     Absolute smooth        'T'         2
13675bd8deadSopenharmony_ci      _QUADRATIC_CURVE_TO_NV    quadratic Bezier
13685bd8deadSopenharmony_ci                                segment
13695bd8deadSopenharmony_ci    RELATIVE_SMOOTH-            Relative smooth        't'         2
13705bd8deadSopenharmony_ci      _QUADRATIC_CURVE_TO_NV    quadratic Bezier
13715bd8deadSopenharmony_ci                                segment
13725bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
13735bd8deadSopenharmony_ci    SMOOTH-                     Absolute smooth        'S'         4
13745bd8deadSopenharmony_ci      _CUBIC_CURVE_TO_NV        cubic Bezier segment
13755bd8deadSopenharmony_ci    RELATIVE_SMOOTH-            Relative smooth        's'         4
13765bd8deadSopenharmony_ci      _CUBIC_CURVE_TO_NV        cubic Bezier segment
13775bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
13785bd8deadSopenharmony_ci    SMALL_CCW_ARC_TO_NV         Absolute small-sweep   -           5
13795bd8deadSopenharmony_ci                                counterclockwise
13805bd8deadSopenharmony_ci                                partial elliptical
13815bd8deadSopenharmony_ci                                arc segment
13825bd8deadSopenharmony_ci    RELATIVE-                   Relative small-sweep   -           5
13835bd8deadSopenharmony_ci      _SMALL_CCW_ARC_TO_NV      counterclockwise
13845bd8deadSopenharmony_ci                                partial elliptical
13855bd8deadSopenharmony_ci                                arc segment
13865bd8deadSopenharmony_ci    SMALL_CW_ARC_TO_NV          Absolute small-sweep   -           5
13875bd8deadSopenharmony_ci                                clockwise partial
13885bd8deadSopenharmony_ci                                elliptical arc
13895bd8deadSopenharmony_ci                                segment
13905bd8deadSopenharmony_ci    RELATIVE-                   Relative small-sweep   -           5
13915bd8deadSopenharmony_ci      _SMALL_CW_ARC_TO_NV       clockwise partial
13925bd8deadSopenharmony_ci                                elliptical arc
13935bd8deadSopenharmony_ci                                segment
13945bd8deadSopenharmony_ci    LARGE_CCW_ARC_TO_NV         Absolute large-sweep   -           5
13955bd8deadSopenharmony_ci                                counterclockwise
13965bd8deadSopenharmony_ci                                partial elliptical
13975bd8deadSopenharmony_ci                                arc segment
13985bd8deadSopenharmony_ci    RELATIVE-                   Relative large-sweep   -           5
13995bd8deadSopenharmony_ci      _LARGE_CCW_ARC_TO_NV      counterclockwise
14005bd8deadSopenharmony_ci                                partial elliptical
14015bd8deadSopenharmony_ci                                arc segment
14025bd8deadSopenharmony_ci    LARGE_CW_ARC_TO_NV          Absolute large-sweep   -           5
14035bd8deadSopenharmony_ci                                clockwise partial
14045bd8deadSopenharmony_ci                                elliptical arc
14055bd8deadSopenharmony_ci                                segment
14065bd8deadSopenharmony_ci    RELATIVE-                   Relative large-sweep   -           5
14075bd8deadSopenharmony_ci      _LARGE_CW_ARC_TO_NV       clockwise partial
14085bd8deadSopenharmony_ci                                elliptical arc
14095bd8deadSopenharmony_ci                                segment
14105bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
14115bd8deadSopenharmony_ci    CONIC_CURVE_TO_NV           Absolute conic         'W'         5
14125bd8deadSopenharmony_ci                                (rational Bezier)
14135bd8deadSopenharmony_ci                                segment
14145bd8deadSopenharmony_ci    RELATIVE-                   Relative conic         'w'         5
14155bd8deadSopenharmony_ci      _CONIC_CURVE_TO_NV        (rational Bezier)
14165bd8deadSopenharmony_ci                                segment
14175bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
14185bd8deadSopenharmony_ci    ROUNDED_RECT_NV             Absolute rounded       -           5
14195bd8deadSopenharmony_ci                                rectangle with
14205bd8deadSopenharmony_ci                                uniform circular
14215bd8deadSopenharmony_ci                                corners (1 radius)
14225bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT_NV    Relative rounded       -           5
14235bd8deadSopenharmony_ci                                rectangle with
14245bd8deadSopenharmony_ci                                uniform circular
14255bd8deadSopenharmony_ci                                corners (1 radius)
14265bd8deadSopenharmony_ci    ROUNDED_RECT2_NV            Absolute rounded       -           6
14275bd8deadSopenharmony_ci                                rectangle with
14285bd8deadSopenharmony_ci                                uniform elliptical
14295bd8deadSopenharmony_ci                                corners (2 x&y radii)
14305bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT2_NV   Relative rounded       -           6
14315bd8deadSopenharmony_ci                                rectangle with
14325bd8deadSopenharmony_ci                                uniform elliptical
14335bd8deadSopenharmony_ci                                corners (2 x&y radii)
14345bd8deadSopenharmony_ci    ROUNDED_RECT4_NV            Absolute rounded       -           8
14355bd8deadSopenharmony_ci                                rectangle with
14365bd8deadSopenharmony_ci                                varying circular
14375bd8deadSopenharmony_ci                                corners (4 radii)
14385bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT4_NV   Relative rounded       -           8
14395bd8deadSopenharmony_ci                                rectangle with
14405bd8deadSopenharmony_ci                                varying circular
14415bd8deadSopenharmony_ci                                corners (4 radii)
14425bd8deadSopenharmony_ci    ROUNDED_RECT8_NV            Absolute rounded       -           12
14435bd8deadSopenharmony_ci                                rectangle with
14445bd8deadSopenharmony_ci                                varying elliptical
14455bd8deadSopenharmony_ci                                corners (8 radii)
14465bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT8_NV   Relative rounded       -           12
14475bd8deadSopenharmony_ci                                rectangle with
14485bd8deadSopenharmony_ci                                varying elliptical
14495bd8deadSopenharmony_ci                                corners (8 radii)
14505bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
14515bd8deadSopenharmony_ci    DUP_FIRST_-                 Absolute cubic Bezier  -           4
14525bd8deadSopenharmony_ci      CUBIC_CURVE_TO_NV         segment, duplicating
14535bd8deadSopenharmony_ci                                first control point
14545bd8deadSopenharmony_ci    DUP_LAST_CUBIC_CURVE_TO_NV  Absolute cubic Bezier  -           4
14555bd8deadSopenharmony_ci                                segment, duplicating
14565bd8deadSopenharmony_ci                                last control point
14575bd8deadSopenharmony_ci    RECT_NV                     Closed absolute        -           4
14585bd8deadSopenharmony_ci                                rectangle
14595bd8deadSopenharmony_ci    RELATIVE_RECT_NV            Closed relative        -           4
14605bd8deadSopenharmony_ci                                rectangle
14615bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
14625bd8deadSopenharmony_ci    CIRCULAR_CCW_ARC_TO_NV      Absolute               -           5
14635bd8deadSopenharmony_ci                                counterclockwise
14645bd8deadSopenharmony_ci                                circular arc segment
14655bd8deadSopenharmony_ci    CIRCULAR_CW_ARC_TO_NV       Absolute clockwise     -           5
14665bd8deadSopenharmony_ci                                circular arc segment
14675bd8deadSopenharmony_ci    CIRCULAR_TANGENT_ARC_TO_NV  Absolute circular      -           5
14685bd8deadSopenharmony_ci                                tangential
14695bd8deadSopenharmony_ci                                arc segment
14705bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
14715bd8deadSopenharmony_ci    ARC_TO_NV                   Absolute general       'A'         7
14725bd8deadSopenharmony_ci                                elliptical arc
14735bd8deadSopenharmony_ci    RELATIVE_ARC_TO_NV          Relative general       'a'         7
14745bd8deadSopenharmony_ci                                elliptical arc
14755bd8deadSopenharmony_ci    --------------------------  ---------------------  ----------  ----------
14765bd8deadSopenharmony_ci
14775bd8deadSopenharmony_ci    Table 5.pathEquations provides for each path command, as relevant,
14785bd8deadSopenharmony_ci    the command's path segment parametric equation, equations for the
14795bd8deadSopenharmony_ci    updated current point (ncp) and equations for the updated prior
14805bd8deadSopenharmony_ci    end point (npep).  After each command in a path is processed in the
14815bd8deadSopenharmony_ci    sequence, the new current point, prior end point, and start point
14825bd8deadSopenharmony_ci    (if changed) update the current point, prior end point, and start
14835bd8deadSopenharmony_ci    point for the next path command to be processed in the sequence.  So:
14845bd8deadSopenharmony_ci
14855bd8deadSopenharmony_ci       cp = ncp
14865bd8deadSopenharmony_ci       pep = npep
14875bd8deadSopenharmony_ci
14885bd8deadSopenharmony_ci    Each path segment parametric equation is parameterized by a variable
14895bd8deadSopenharmony_ci    /t/ ranging from 0.0 to 1.0.  So the outline is traced by evaluating
14905bd8deadSopenharmony_ci    each path command's path segment parametric equation continuously
14915bd8deadSopenharmony_ci    as /t/ varies from 0.0 to 1.0.
14925bd8deadSopenharmony_ci
14935bd8deadSopenharmony_ci    With the exception of the MOVE_TO_NV, RELATIVE_MOVE_TO_NV,
14945bd8deadSopenharmony_ci    RESTART_PATH_NV, RECT_NV, RELATIVE_RECT_NV, ROUNDED_RECT_NV,
14955bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT_NV, ROUNDED_RECT2_NV, RELATIVE_ROUNDED_RECT2_NV,
14965bd8deadSopenharmony_ci    ROUNDED_RECT4_NV, RELATIVE_ROUNDED_RECT4_NV, ROUNDED_RECT8_NV,
14975bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT8_NV, CIRCULAR_CCW_ARC_TO_NV, and
14985bd8deadSopenharmony_ci    CIRCULAR_CW_ARC_TO_NV commands, the commands are specified such that
14995bd8deadSopenharmony_ci    C0 continuity of the outline is guaranteed at path command segment
15005bd8deadSopenharmony_ci    end-points.
15015bd8deadSopenharmony_ci
15025bd8deadSopenharmony_ci    The MOVE_TO_NV, RELATIVE_MOVE_TO_NV, RESTART_PATH_NV, RECT_NV,
15035bd8deadSopenharmony_ci    RELATIVE_RECT_NV, ROUNDED_RECT_NV, RELATIVE_ROUNDED_RECT_NV,
15045bd8deadSopenharmony_ci    ROUNDED_RECT2_NV, RELATIVE_ROUNDED_RECT2_NV,
15055bd8deadSopenharmony_ci    ROUNDED_RECT4_NV, RELATIVE_ROUNDED_RECT4_NV, ROUNDED_RECT8_NV,
15065bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT8_NV, CIRCULAR_CCW_ARC_TO_NV, and
15075bd8deadSopenharmony_ci    CIRCULAR_CW_ARC_TO_NV commands update the start position (sp) to
15085bd8deadSopenharmony_ci    the value of these command's new current point (ncp).
15095bd8deadSopenharmony_ci
15105bd8deadSopenharmony_ci    The MOVE_TO_NV, RELATIVE_MOVE_TO_NV, RECT_NV,
15115bd8deadSopenharmony_ci    RELATIVE_RECT_NV, ROUNDED_RECT_NV, RELATIVE_ROUNDED_RECT_NV,
15125bd8deadSopenharmony_ci    ROUNDED_RECT2_NV, RELATIVE_ROUNDED_RECT2_NV,
15135bd8deadSopenharmony_ci    ROUNDED_RECT4_NV, RELATIVE_ROUNDED_RECT4_NV, ROUNDED_RECT8_NV,
15145bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT8_NV, commands unconditionally change the start
15155bd8deadSopenharmony_ci    position (sp) to value of these command's new current point (ncp) so:
15165bd8deadSopenharmony_ci
15175bd8deadSopenharmony_ci        sp = ncp
15185bd8deadSopenharmony_ci
15195bd8deadSopenharmony_ci    The CIRCULAR_CCW_ARC_TO_NV and CIRCULAR_CW_ARC_TO_NV commands
15205bd8deadSopenharmony_ci    conditionally change sp to the command's ncp but only the sp has not
15215bd8deadSopenharmony_ci    been specified by any prior command other than CLOSE_PATH_NV in the
15225bd8deadSopenharmony_ci    path's command sequence since the beginning of the path's command
15235bd8deadSopenharmony_ci    sequence or last RESTART_PATH_NV.  When these circular arc commands
15245bd8deadSopenharmony_ci    change the sp to the command's ncp, it implies the initial implicit
15255bd8deadSopenharmony_ci    line these commands generate from sp to ncp will be zero length.
15265bd8deadSopenharmony_ci    (This behavior is to match the semantics of PostScript.)
15275bd8deadSopenharmony_ci
15285bd8deadSopenharmony_ci    Moving of the start position creates a discontinuity in the outline
15295bd8deadSopenharmony_ci    so starts a new subpath within the path.
15305bd8deadSopenharmony_ci
15315bd8deadSopenharmony_ci    Table 5.pathEquations: Path Equations
15325bd8deadSopenharmony_ci
15335bd8deadSopenharmony_ci                                Path segment                            new current         new prior end
15345bd8deadSopenharmony_ci    Token                       parametric equation                     point equation      point equation
15355bd8deadSopenharmony_ci    ==========================  ======================================  ==================  =======================
15365bd8deadSopenharmony_ci    MOVE_TO_NV                  -                                       ncp.x = c[0]        npep.x = c[0]
15375bd8deadSopenharmony_ci                                                                        ncp.y = c[1]        npep.y = c[1]
15385bd8deadSopenharmony_ci    RELATIVE_MOVE_TO_NV         -                                       ncp.x = cp.x+c[0]   npep.x = cp.x+c[0]
15395bd8deadSopenharmony_ci                                                                        ncp.y = cp.y+c[1]   npep.y = cp.y+c[1]
15405bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
15415bd8deadSopenharmony_ci    CLOSE_PATH_NV               x = (1-t)*cp.x + t*sp.x                 ncp.x = sp.x        npep.x = sp.x
15425bd8deadSopenharmony_ci                                y = (1-t)*cp.y + t*sp.y                 ncp.y = sp.y        npep.y = sp.y
15435bd8deadSopenharmony_ci    RESTART_PATH_NV             -                                       ncp.x = 0           npep.x = 0
15445bd8deadSopenharmony_ci                                                                        ncp.y = 0           npep.y = 0
15455bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
15465bd8deadSopenharmony_ci    LINE_TO_NV                  x = (1-t)*cp.x + t*c[0]                 ncp.x = c[0]        npep.x = c[0]
15475bd8deadSopenharmony_ci                                y = (1-t)*cp.y + t*c[1]                 ncp.y = c[1]        npep.y = c[1]
15485bd8deadSopenharmony_ci    RELATIVE_LINE_TO_NV         x = (1-t)*cp.x + t*(c[0]+cp.x)          ncp.x = cp.x+c[0]   npep.x = cp.x+c[0]
15495bd8deadSopenharmony_ci                                y = (1-t)*cp.y + t*(c[1]+cp.y)          ncp.y = cp.y+c[1]   npep.y = cp.y+c[1]
15505bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
15515bd8deadSopenharmony_ci    HORIZONTAL_LINE_TO_NV       x = (1-t)*cp.x + t*sp.x                 ncp.x = c[0]        npep.x = c[0]
15525bd8deadSopenharmony_ci                                y = cp.y                                ncp.y = cp.y        npep.y = cp.y
15535bd8deadSopenharmony_ci    RELATIVE_HORIZONTAL-        x = (1-t)*cp.x + t*(c[0]+cp.x)          ncp.x = cp.x+c[0]   npep.x = cp.x+c[0]
15545bd8deadSopenharmony_ci      _LINE_TO_NV               y = cp.y                                ncp.y = cp.y        npep.y = cp.y
15555bd8deadSopenharmony_ci    VERTICAL_LINE_TO_NV         x = cp.x                                ncp.x = cp.x        npep.x = cp.x
15565bd8deadSopenharmony_ci                                y = (1-t)*cp.y + t*sp.y                 ncp.y = c[0]        npep.y = c[0]
15575bd8deadSopenharmony_ci    RELATIVE_VERTICAL-          x = cp.x                                ncp.x = cp.x        npep.x = cp.x
15585bd8deadSopenharmony_ci      _LINE_TO_NV               y = (1-t)*cp.y + t*(c[0]+cp.y)          ncp.y = cp.y+c[0]   npep.y = cp.y+c[0]
15595bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
15605bd8deadSopenharmony_ci    QUADRATIC_CURVE_TO_NV       x = (1-t)^2*cp.x +                      ncp.x = c[2]        npep.x = c[0]
15615bd8deadSopenharmony_ci                                    2*(1-t)*t*c[0] +                    ncp.y = c[3]        npep.y = c[1]
15625bd8deadSopenharmony_ci                                    t^2*c[2]
15635bd8deadSopenharmony_ci                                y = (1-t)^2*cp.y +
15645bd8deadSopenharmony_ci                                    2*(1-t)*t*c[1] +
15655bd8deadSopenharmony_ci                                    t^2*c[3]
15665bd8deadSopenharmony_ci    RELATIVE-                   x = (1-t)^2*cp.x +                      ncp.x = cp.x+c[2]   npep.x = cp.x+c[0]
15675bd8deadSopenharmony_ci      _QUADRATIC_CURVE_TO_NV        2*(1-t)*t*(c[0]+cp.x) +             ncp.y = cp.x+c[3]   npep.y = cp.y+c[1]
15685bd8deadSopenharmony_ci                                    t^2*(c[2]+cp.x)
15695bd8deadSopenharmony_ci                                y = (1-t)^2*cp.y +
15705bd8deadSopenharmony_ci                                    2*(1-t)*t*(c[1]+cp.y) +
15715bd8deadSopenharmony_ci                                    t^2*(c[3]+cp.y)
15725bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
15735bd8deadSopenharmony_ci    CUBIC_CURVE_TO_NV           x = (1-t)^3*cp.x +                      ncp.x = c[4]        npep.x = c[2]
15745bd8deadSopenharmony_ci                                    3*(1-t)^2*t*c[0] +                  ncp.y = c[5]        npep.y = c[3]
15755bd8deadSopenharmony_ci                                    3*(1-t)*t^2*c[2] +
15765bd8deadSopenharmony_ci                                    t^3*c[4]
15775bd8deadSopenharmony_ci                                y = (1-t)^3*cp.y +
15785bd8deadSopenharmony_ci                                    3*(1-t)^2*t*c[1] +
15795bd8deadSopenharmony_ci                                    3*(1-t)*t^2*c[3] +
15805bd8deadSopenharmony_ci                                    t^3*c[5]
15815bd8deadSopenharmony_ci    RELATIVE_CUBIC_CURVE_TO_NV  x = (1-t)^3*cp.x +                      ncp.x = cp.x+c[4]   npep.x = cp.x+c[2]
15825bd8deadSopenharmony_ci                                    3*(1-t)^2*t*(c[0]+cp.x) +           ncp.y = cp.y+c[5]   npep.y = cp.y+c[3]
15835bd8deadSopenharmony_ci                                    3*(1-t)*t^2*(c[2]+cp.x) +
15845bd8deadSopenharmony_ci                                    t^3*(c[4]+cp.x)
15855bd8deadSopenharmony_ci                                y = (1-t)^3*cp.y +
15865bd8deadSopenharmony_ci                                    3*(1-t)^2*t*(c[1]+cp.y) +
15875bd8deadSopenharmony_ci                                    3*(1-t)*t^2*(c[3]+cp.y) +
15885bd8deadSopenharmony_ci                                    t^3*(c[5]+cp.y)
15895bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
15905bd8deadSopenharmony_ci    SMOOTH-                     x = (1-t)^2*cp.x +                      ncp.x = c[0]        npep.x = 2*cp.x-pep.x
15915bd8deadSopenharmony_ci      _QUADRATIC_CURVE_TO_NV        2*(1-t)*t*(2*cp.x-pep.x) +          ncp.y = c[1]        npep.y = 2*cp.y-pep.y
15925bd8deadSopenharmony_ci                                    t^2*c[0]
15935bd8deadSopenharmony_ci                                y = (1-t)^2*cp.y +
15945bd8deadSopenharmony_ci                                    2*(1-t)*t*(2*cp.y-pep.y) +
15955bd8deadSopenharmony_ci                                    t^2*c[1]
15965bd8deadSopenharmony_ci    RELATIVE_SMOOTH-            x = (1-t)^2*cp.x +                      ncp.x = cp.x+c[0]   npep.x = 2*cp.x-pep.x
15975bd8deadSopenharmony_ci      QUADRATIC_CURVE_TO_NV         2*(1-t)*t*(2*cp.x-pep.x) +          ncp.y = cp.y+c[1]   npep.y = 2*cp.y-pep.y
15985bd8deadSopenharmony_ci                                    t^2*(c[0]+cp.x)
15995bd8deadSopenharmony_ci                                y = (1-t)^2*cp.y +
16005bd8deadSopenharmony_ci                                    2*(1-t)*t*(2*cp.y-pep.y) +
16015bd8deadSopenharmony_ci                                    t^2*(c[1]+cp.y)
16025bd8deadSopenharmony_ci
16035bd8deadSopenharmony_ci    SMOOTH-                     x = (1-t)^3*cp.x +                      ncp.x = c[2]        npep.x = c[0]
16045bd8deadSopenharmony_ci      _CUBIC_CURVE_TO_NV            3*(1-t)^2*t*(2*cp.x-pep.x) +        ncp.y = c[3]        npep.y = c[1]
16055bd8deadSopenharmony_ci                                    3*(1-t)*t^2*c[0] +
16065bd8deadSopenharmony_ci                                    t^3*c[2]
16075bd8deadSopenharmony_ci                                y = (1-t)^3*cp.y +
16085bd8deadSopenharmony_ci                                    3*(1-t)^2*t*(2*cp.y-pep.y) +
16095bd8deadSopenharmony_ci                                    3*(1-t)*t^2*c[1] +
16105bd8deadSopenharmony_ci                                    t^3*c[3]
16115bd8deadSopenharmony_ci    RELATIVE_SMOOTH-            x = (1-t)^3*cp.x +                      ncp.x = cp.x+c[2]   npep.x = cp.x+c[0]
16125bd8deadSopenharmony_ci      _CUBIC_CURVE_TO_NV            3*(1-t)^2*t*(2*cp.x-pep.x) +        ncp.y = cp.y+c[3]   npep.y = cp.y+c[1]
16135bd8deadSopenharmony_ci                                    3*(1-t)*t^2*(c[0]+cp.x) +
16145bd8deadSopenharmony_ci                                    t^3*(c[2]+cp.x)
16155bd8deadSopenharmony_ci                                y = (1-t)^3*cp.y +
16165bd8deadSopenharmony_ci                                    3*(1-t)^2*t*(2*cp.y-pep.y) +
16175bd8deadSopenharmony_ci                                    3*(1-t)*t^2*(c[1]+cp.y) +
16185bd8deadSopenharmony_ci                                    t^3*(c[3]+cp.y)
16195bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
16205bd8deadSopenharmony_ci    SMALL_CCW_ARC_TO_NV         x = arc_x(c,rv,rh,phi,                  ncp.x = c[3]        npep.x = c[3]
16215bd8deadSopenharmony_ci                                          theta1,dtheta,t)              ncp.y = c[4]        npep.y = c[4]
16225bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
16235bd8deadSopenharmony_ci                                          theta1,dtheta,t)
16245bd8deadSopenharmony_ci    RELATIVE-                   x = arc_x(c,rv,rh,phi,                  ncp.x = c[3]        npep.x = cp.x+c[3]
16255bd8deadSopenharmony_ci      _SMALL_CCW_ARC_TO_NV                theta1,dtheta,t)              ncp.y = c[4]        npep.y = cp.y+c[4]
16265bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
16275bd8deadSopenharmony_ci                                          theta1,dtheta,t)
16285bd8deadSopenharmony_ci    SMALL_CW_ARC_TO_NV          x = arc_x(c,rv,rh,phi,                  ncp.x = c[3]        npep.x = c[3]
16295bd8deadSopenharmony_ci                                          theta1,dtheta,t)              ncp.y = c[4]        npep.y = c[4]
16305bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
16315bd8deadSopenharmony_ci                                          theta1,dtheta,t)
16325bd8deadSopenharmony_ci    RELATIVE-                   x = arc_x(c,rv,rh,phi,                  ncp.x = c[3]        npep.x = cp.x+c[3]
16335bd8deadSopenharmony_ci      _SMALL_CW_ARC_TO_NV                 theta1,dtheta,t)              ncp.y = c[4]        npep.y = cp.y+c[4]
16345bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
16355bd8deadSopenharmony_ci                                          theta1,dtheta,t)
16365bd8deadSopenharmony_ci    LARGE_CCW_ARC_TO_NV         x = arc_x(c,rv,rh,phi,                  ncp.x = c[3]        npep.x = c[3]
16375bd8deadSopenharmony_ci                                          theta1,dtheta,t)              ncp.y = c[4]        npep.y = c[4]
16385bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
16395bd8deadSopenharmony_ci                                          theta1,dtheta,t)
16405bd8deadSopenharmony_ci    RELATIVE-                   x = arc_x(c,rv,rh,phi,                  ncp.x = c[3]        npep.x = cp.x+c[3]
16415bd8deadSopenharmony_ci      _LARGE_CCW_ARC_TO_NV                theta1,dtheta,t)              ncp.y = c[4]        npep.y = cp.y+c[4]
16425bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
16435bd8deadSopenharmony_ci                                          theta1,dtheta,t)
16445bd8deadSopenharmony_ci    LARGE_CW_ARC_TO_NV          x = arc_x(c,rv,rh,phi,                  ncp.x = c[3]        npep.x = c[3]
16455bd8deadSopenharmony_ci                                          theta1,dtheta,t)              ncp.y = c[4]        npep.y = c[4]
16465bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
16475bd8deadSopenharmony_ci                                          theta1,dtheta,t)
16485bd8deadSopenharmony_ci    RELATIVE-                   x = arc_x(c,rv,rh,phi,                  ncp.x = c[3]        npep.x = cp.x+c[3]
16495bd8deadSopenharmony_ci      _SMALL_CW_ARC_TO_NV                 theta1,dtheta,t)              ncp.y = c[4]        npep.y = cp.y+c[4]
16505bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
16515bd8deadSopenharmony_ci                                          theta1,dtheta,t)
16525bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
16535bd8deadSopenharmony_ci    CONIC_CURVE_TO_NV           WHEN c[4] > 0:                          ncp.x = c[2]        npep.x = c[0]
16545bd8deadSopenharmony_ci                                x = ( (1-t)^2*cp.x +                    ncp.y = c[3]        npep.y = c[1]
16555bd8deadSopenharmony_ci                                      2*(1-t)*t*c[0]*c[4] +
16565bd8deadSopenharmony_ci                                      t^2*c[2] ) /
16575bd8deadSopenharmony_ci                                    ( (1-t)^2 +
16585bd8deadSopenharmony_ci                                      2*(1-t)*t*c[4] +
16595bd8deadSopenharmony_ci                                      t^2*c[2] )
16605bd8deadSopenharmony_ci                                y = ( 1-t)^2*cp.y +
16615bd8deadSopenharmony_ci                                      2*(1-t)*t*c[1]*w +
16625bd8deadSopenharmony_ci                                      t^2*c[3] ) /
16635bd8deadSopenharmony_ci                                    ( (1-t)^2 +
16645bd8deadSopenharmony_ci                                      2*(1-t)*t*c[4] +
16655bd8deadSopenharmony_ci                                      t^2*c[2] ),
16665bd8deadSopenharmony_ci                                OTHERWISE:
16675bd8deadSopenharmony_ci                                x = (1-t)*cp.x + t*c[2]
16685bd8deadSopenharmony_ci                                y = (1-t)*cp.y + t*c[3]
16695bd8deadSopenharmony_ci    RELATIVE-                   WHEN c[4] > 0:                          ncp.x = cp.x+c[2]   npep.x = cp.x+c[0]
16705bd8deadSopenharmony_ci      _CONIC_CURVE_TO_NV        x = ( (1-t)^2*cp.x +                    ncp.y = cp.y+c[3]   npep.y = cp.y+c[1]
16715bd8deadSopenharmony_ci                                      2*(1-t)*t*(c[0]+cp.x)*c[4] +
16725bd8deadSopenharmony_ci                                      t^2*(c[2]+cp.x) ) /
16735bd8deadSopenharmony_ci                                    ( (1-t)^2 +
16745bd8deadSopenharmony_ci                                      2*(1-t)*t*c[4] +
16755bd8deadSopenharmony_ci                                      t^2*c[2] )
16765bd8deadSopenharmony_ci                                y = ( 1-t)^2*cp.y +
16775bd8deadSopenharmony_ci                                      2*(1-t)*t*c[1]*w +
16785bd8deadSopenharmony_ci                                      t^2*c[3] ) /
16795bd8deadSopenharmony_ci                                    ( (1-t)^2 +
16805bd8deadSopenharmony_ci                                      2*(1-t)*t*c[4] +
16815bd8deadSopenharmony_ci                                      t^2*c[2] ),
16825bd8deadSopenharmony_ci                                OTHERWISE:
16835bd8deadSopenharmony_ci                                x = (1-t)*cp.x + t*(c[2]+cp.x)
16845bd8deadSopenharmony_ci                                y = (1-t)*cp.y + t*(c[3]+cp.y)
16855bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
16865bd8deadSopenharmony_ci    ROUNDED_RECT_NV             x = rrect(c[0], c[1], c[2], c[3],       ncp.x = C_ll.x      npep.x = C_ll.x
16875bd8deadSopenharmony_ci                                          c[4], c[4], c[4], c[4],       ncp.y = C_ll.y      npep.y = C_ll.y
16885bd8deadSopenharmony_ci                                          c[4], c[4], c[4], c[4], t).x
16895bd8deadSopenharmony_ci                                y = rrect(c[0], c[1], c[2], c[3],
16905bd8deadSopenharmony_ci                                          c[4], c[4], c[4], c[4],
16915bd8deadSopenharmony_ci                                          c[4], c[4], c[4], c[4], t).y
16925bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT_NV    x = rrect(c[0]+cp.x, c[1]+cp.y,         ncp.x = C_ll.x      npep.x = C_ll.x
16935bd8deadSopenharmony_ci                                          c[2], c[3],                   ncp.y = C_ll.y      npep.y = C_ll.y
16945bd8deadSopenharmony_ci                                          c[4], c[4], c[4], c[4],
16955bd8deadSopenharmony_ci                                          c[4], c[4], c[4], c[4], t).x
16965bd8deadSopenharmony_ci                                y = rrect(c[0]+cp.x, c[1]+cp.y,
16975bd8deadSopenharmony_ci                                          c[2], c[3],
16985bd8deadSopenharmony_ci                                          c[4], c[4], c[4], c[4],
16995bd8deadSopenharmony_ci                                          c[4], c[4], c[4], c[4], t).y
17005bd8deadSopenharmony_ci    ROUNDED_RECT2_NV            x = rrect(c[0], c[1], c[2], c[3],       ncp.x = C_ll.x      npep.x = C_ll.x
17015bd8deadSopenharmony_ci                                          c[4], c[5], c[4], c[5],       ncp.y = C_ll.y      npep.y = C_ll.y
17025bd8deadSopenharmony_ci                                          c[4], c[5], c[4], c[5], t).x
17035bd8deadSopenharmony_ci                                y = rrect(c[0], c[1], c[2], c[3],
17045bd8deadSopenharmony_ci                                          c[4], c[5], c[4], c[5],
17055bd8deadSopenharmony_ci                                          c[4], c[5], c[4], c[5], t).y
17065bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT2_NV   x = rrect(c[0]+cp.x, c[1]+cp.y,         ncp.x = C_ll.x      npep.x = C_ll.x
17075bd8deadSopenharmony_ci                                          c[2], c[3],                   ncp.y = C_ll.y      npep.y = C_ll.y
17085bd8deadSopenharmony_ci                                          c[4], c[5], c[4], c[5],
17095bd8deadSopenharmony_ci                                          c[4], c[5], c[4], c[5], t).x
17105bd8deadSopenharmony_ci                                y = rrect(c[0]+cp.x, c[1]+cp.y,
17115bd8deadSopenharmony_ci                                          c[2], c[3],
17125bd8deadSopenharmony_ci                                          c[4], c[5], c[4], c[5],
17135bd8deadSopenharmony_ci                                          c[4], c[5], c[4], c[5], t).y
17145bd8deadSopenharmony_ci    ROUNDED_RECT4_NV            x = rrect(c[0], c[1], c[2], c[3],       ncp.x = C_ll.x      npep.x = C_ll.x
17155bd8deadSopenharmony_ci                                          c[4], c[4], c[5], c[5],       ncp.y = C_ll.y      npep.y = C_ll.y
17165bd8deadSopenharmony_ci                                          c[6], c[6], c[7], c[7], t).x
17175bd8deadSopenharmony_ci                                y = rrect(c[0], c[1], c[2], c[3],
17185bd8deadSopenharmony_ci                                          c[4], c[4], c[5], c[5],
17195bd8deadSopenharmony_ci                                          c[6], c[6], c[7], c[7], t).y
17205bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT4_NV   x = rrect(c[0]+cp.x, c[1]+cp.y,         ncp.x = C_ll.x      npep.x = C_ll.x
17215bd8deadSopenharmony_ci                                          c[2], c[3],                   ncp.y = C_ll.y      npep.y = C_ll.y
17225bd8deadSopenharmony_ci                                          c[4], c[4], c[5], c[5],
17235bd8deadSopenharmony_ci                                          c[6], c[6], c[7], c[7], t).x
17245bd8deadSopenharmony_ci                                y = rrect(c[0]+cp.x, c[1]+cp.y,
17255bd8deadSopenharmony_ci                                          c[2], c[3],
17265bd8deadSopenharmony_ci                                          c[4], c[4], c[5], c[5],
17275bd8deadSopenharmony_ci                                          c[6], c[6], c[7], c[7], t).y
17285bd8deadSopenharmony_ci    ROUNDED_RECT8_NV            x = rrect(c[0], c[1], c[2], c[3],       ncp.x = C_ll.x      npep.x = C_ll.x
17295bd8deadSopenharmony_ci                                          c[4], c[5], c[6], c[7],       ncp.y = C_ll.y      npep.y = C_ll.y
17305bd8deadSopenharmony_ci                                          c[8], c[9],
17315bd8deadSopenharmony_ci                                          c[10], c[11], t).x
17325bd8deadSopenharmony_ci                                y = rrect(c[0], c[1], c[2], c[3],
17335bd8deadSopenharmony_ci                                          c[4], c[5], c[6], c[7],
17345bd8deadSopenharmony_ci                                          c[8], c[9],
17355bd8deadSopenharmony_ci                                          c[10], c[11], t).y
17365bd8deadSopenharmony_ci    RELATIVE_ROUNDED_RECT8_NV   x = rrect(c[0]+cp.x, c[1]+cp.y,         ncp.x = C_ll.x      npep.x = C_ll.x
17375bd8deadSopenharmony_ci                                          c[2], c[3],                   ncp.y = C_ll.y      npep.y = C_ll.y
17385bd8deadSopenharmony_ci                                          c[4], c[5], c[6], c[7],
17395bd8deadSopenharmony_ci                                          c[8], c[9],
17405bd8deadSopenharmony_ci                                          c[10], c[11], t).x
17415bd8deadSopenharmony_ci                                y = rrect(c[0]+cp.x, c[1]+cp.y,
17425bd8deadSopenharmony_ci                                          c[2], c[3],
17435bd8deadSopenharmony_ci                                          c[4], c[5], c[6], c[7],
17445bd8deadSopenharmony_ci                                          c[8], c[9],
17455bd8deadSopenharmony_ci                                          c[10], c[11], t).y
17465bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
17475bd8deadSopenharmony_ci    DUP_FIRST-                  x = (1-t)^3*cp.x +                      ncp.x = c[2]        npep.x = c[0]
17485bd8deadSopenharmony_ci      CUBIC_CURVE_TO_NV             3*(1-t)^2*t*cp.x +                  ncp.y = c[3]        npep.y = c[1]
17495bd8deadSopenharmony_ci                                    3*(1-t)*t^2*c[0] +
17505bd8deadSopenharmony_ci                                    t^3*c[2]
17515bd8deadSopenharmony_ci                                y = (1-t)^3*cp.y +
17525bd8deadSopenharmony_ci                                    3*(1-t)^2*t*cp.y +
17535bd8deadSopenharmony_ci                                    3*(1-t)*t^2*c[1] +
17545bd8deadSopenharmony_ci                                    t^3*c[3]
17555bd8deadSopenharmony_ci    DUP_LAST_CUBIC_CURVE_TO_NV  x = (1-t)^3*cp.x +                      ncp.x = c[2]        npep.x = c[2]
17565bd8deadSopenharmony_ci                                    3*(1-t)^2*t*c[0] +                  ncp.y = c[3]        npep.y = c[3]
17575bd8deadSopenharmony_ci                                    3*(1-t)*t^2*c[2] +
17585bd8deadSopenharmony_ci                                    t^3*c[2]
17595bd8deadSopenharmony_ci                                y = (1-t)^3*cp.y +
17605bd8deadSopenharmony_ci                                    3*(1-t)^2*t*c[1] +
17615bd8deadSopenharmony_ci                                    3*(1-t)*t^2*c[3] +
17625bd8deadSopenharmony_ci                                    t^3*c[3]
17635bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
17645bd8deadSopenharmony_ci    RECT_NV                         / (1-4*t)*c[0] +                    ncp.x = c[0]        npep.x = c[0]
17655bd8deadSopenharmony_ci                                    | 4*t*(c[0]+c[2]),         t<=0.25  ncp.y = c[1]        npep.y = c[1]
17665bd8deadSopenharmony_ci                                x = < c[0]+c[2],           0.25<t<=0.5
17675bd8deadSopenharmony_ci                                    | (1-4*t-2)*(c[0]+c[2]) +
17685bd8deadSopenharmony_ci                                    | (4*t-2)*c[0],       0.5 <t<=0.75
17695bd8deadSopenharmony_ci                                    \ c[0],                     0.75<t
17705bd8deadSopenharmony_ci                                    / c[1],                    t<=0.25
17715bd8deadSopenharmony_ci                                    | (1-4*t-1)*c[1] +
17725bd8deadSopenharmony_ci                                y = < (4*t-1)*(c[1]+c[3]), 0.25<t<=0.5
17735bd8deadSopenharmony_ci                                    | c[1]+c[3],          0.5 <t<=0.75
17745bd8deadSopenharmony_ci                                    | (1-4*t-3)*(c[1]+c[3]) +
17755bd8deadSopenharmony_ci                                    \ (4*t-3)*c[1],             0.75<t
17765bd8deadSopenharmony_ci    RELATIVE_RECT_NV                / (1-4*t)*(c[0]+cp.x) +             ncp.x = cp.x+c[0]   npep.x = cp.x+c[0]
17775bd8deadSopenharmony_ci                                    | 4*t*(c[0]+c[2]+cp.x),    t<=0.25  ncp.y = cp.y+c[1]   npep.y = cp.y+c[1]
17785bd8deadSopenharmony_ci                                x = < c[0]+c[2]+cp.x,      0.25<t<=0.5
17795bd8deadSopenharmony_ci                                    | (1-4*t-2)*(c[0]+c[2]+cp.x) +
17805bd8deadSopenharmony_ci                                    | (4*t-2)*(c[0]+cp.x), 0.5<t<=0.75
17815bd8deadSopenharmony_ci                                    \ c[0]+cp.x,                0.75<t
17825bd8deadSopenharmony_ci                                    / c[1]+cp.y,               t<=0.25
17835bd8deadSopenharmony_ci                                    | (1-4*t-1)*(c[1]+cp.y) +
17845bd8deadSopenharmony_ci                                y = < (4*t-1)*(c[1]+c[3]+cp.y),
17855bd8deadSopenharmony_ci                                    |                      0.25<t<=0.5
17865bd8deadSopenharmony_ci                                    | c[1]+c[3]+cp.y,      0.5<t<=0.75
17875bd8deadSopenharmony_ci                                    | (1-4*t-3)*(c[1]+c[3]+cp.y) +
17885bd8deadSopenharmony_ci                                    \ (4*t-3)*(c[1]+cp.y),      0.75<t
17895bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
17905bd8deadSopenharmony_ci    CIRCULAR_CCW_ARC_TO_NV           / (1-2*t)*cp.x + 2*t*A.x,  t<=0.5  ncp.x = B.x         npep.x = B.x
17915bd8deadSopenharmony_ci                                x = {                                   ncp.y = B.y         npep.x = B.y
17925bd8deadSopenharmony_ci                                     \ arc_x(c,rv,rh,phi,theta1,
17935bd8deadSopenharmony_ci                                      \      dtheta,t*2-1)      t>=0.5
17945bd8deadSopenharmony_ci                                     / (1-2*t)*cp.y + 2*t*A.y,  t<=0.5
17955bd8deadSopenharmony_ci                                y = {
17965bd8deadSopenharmony_ci                                     \ arc_y(c,rv,rh,phi,theta1,
17975bd8deadSopenharmony_ci                                      \      dtheta,t*2-1),     t>=0.5
17985bd8deadSopenharmony_ci    CIRCULAR_CW_ARC_TO_NV            / (1-2*t)*cp.x + 2*t*A.x,  t<=0.5  ncp.x = B.x         npep.x = B.x
17995bd8deadSopenharmony_ci                                x = {                                   ncp.y = B.y         npep.x = B.y
18005bd8deadSopenharmony_ci                                     \ arc_x(c,rv,rh,phi,theta1,
18015bd8deadSopenharmony_ci                                      \      dtheta,t*2-1)      t>=0.5
18025bd8deadSopenharmony_ci                                     / (1-2*t)*cp.y + 2*t*A.y,  t<=0.5
18035bd8deadSopenharmony_ci                                y = {
18045bd8deadSopenharmony_ci                                     \ arc_y(c,rv,rh,phi,theta1,
18055bd8deadSopenharmony_ci                                      \      dtheta,t*2-1),     t>=0.5
18065bd8deadSopenharmony_ci    CIRCULAR_TANGENT_ARC_TO_NV       / (1-2*t)*cp.x + 2*t*C.x,  t<=0.5  ncp.x = D.x         npep.x = D.x
18075bd8deadSopenharmony_ci                                x = {                                   ncp.y = D.y         npep.x = D.y
18085bd8deadSopenharmony_ci                                     \ arc_x(c,rv,rh,phi,theta1,
18095bd8deadSopenharmony_ci                                      \      dtheta,t*2-1),     t>=0.5
18105bd8deadSopenharmony_ci                                     / (1-2*t)*cp.y + 2*t*C.y,  t<=0.5
18115bd8deadSopenharmony_ci                                y = {
18125bd8deadSopenharmony_ci                                     \ arc_y(c,rv,rh,phi,theta1,
18135bd8deadSopenharmony_ci                                      \      dtheta,t*2-1),     t>=0.5
18145bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
18155bd8deadSopenharmony_ci    ARC_TO_NV                   x = arc_x(c,rv,rh,phi,                  ncp.x = c[5]        npep.x = c[5]
18165bd8deadSopenharmony_ci                                          theta1,dtheta,t)              ncp.y = c[6]        npep.y = c[6]
18175bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
18185bd8deadSopenharmony_ci                                          theta1,dtheta,t)
18195bd8deadSopenharmony_ci    RELATIVE_ARC_TO_NV          x = arc_x(c,rv,rh,phi,                  ncp.x = cp.x+c[5]   npep.x = cp.x+c[5]
18205bd8deadSopenharmony_ci                                          theta1,dtheta,t)              ncp.y = cp.y+c[6]   npep.y = cp.y+c[6]
18215bd8deadSopenharmony_ci                                y = arc_y(c,rv,rh,phi,
18225bd8deadSopenharmony_ci                                          theta1,dtheta,t)
18235bd8deadSopenharmony_ci    --------------------------  --------------------------------------  ------------------  -----------------------
18245bd8deadSopenharmony_ci
18255bd8deadSopenharmony_ci    In the equations in Table 5.pathEquations, c[i] is the /i/th (base
18265bd8deadSopenharmony_ci    zero) coordinate of the coordinate sequence for the command; /cp/
18275bd8deadSopenharmony_ci    is the 2D (x,y) current position from the prior command (for the
18285bd8deadSopenharmony_ci    first command of a path object, /cp/ is (0,0)); /sp/ is the 2D (x,y)
18295bd8deadSopenharmony_ci    start position for the current contour (for the first command of a
18305bd8deadSopenharmony_ci    path object, /sp/ is (0,0)); /pep/ is the 2D (x,y) prior end position
18315bd8deadSopenharmony_ci    from the prior end position (for the first command of a path object,
18325bd8deadSopenharmony_ci    /pep/ is (0,0)); and /ncp/ is the 2D (x,y) "new" current position
18335bd8deadSopenharmony_ci    that will become the current position for the subsequent command;
18345bd8deadSopenharmony_ci    /npep/ is the 2D (x,y) "new" prior end position for the subsequent
18355bd8deadSopenharmony_ci    command.  The values /c/, /theta1/, /dtheta/ are explained in the
18365bd8deadSopenharmony_ci    discussion of partial elliptical arc commands below.  The values
18375bd8deadSopenharmony_ci    of /rv/, /rh/, /phi/ come from Table 5.arcParameterSpecialization.
18385bd8deadSopenharmony_ci    The values of /A/, /B/, /C/, and /D/ are discussed in the context
18395bd8deadSopenharmony_ci    of Table 5.arcParameterSpecialization.  /C_ll/ is the lower-left
18405bd8deadSopenharmony_ci    end-point defined for Equation 5.roundedRectangleContour.
18415bd8deadSopenharmony_ci
18425bd8deadSopenharmony_ci    If a value specified for a coordinate (however the coordinate is
18435bd8deadSopenharmony_ci    specified) or a value computed from these coordinates (as specified
18445bd8deadSopenharmony_ci    in the discussion that follows) exceeds the implementation's maximum
18455bd8deadSopenharmony_ci    representable value for a single-precision floating-point number,
18465bd8deadSopenharmony_ci    the rendering behavior (discussed in section 5.X.2) of the specified
18475bd8deadSopenharmony_ci    path and the value of said coordinate if queried (section 6.X.2)
18485bd8deadSopenharmony_ci    is undefined.  This is relevant because coordinates can be specified
18495bd8deadSopenharmony_ci    explicitly but also relatively (by RELATIVE_* path commands) or
18505bd8deadSopenharmony_ci    encoded in a string of otherwise arbitrary precision and range or
18515bd8deadSopenharmony_ci    computed by weighting.
18525bd8deadSopenharmony_ci
18535bd8deadSopenharmony_ci    ROUNDED RECTANGLE COMMAND DETAILS
18545bd8deadSopenharmony_ci
18555bd8deadSopenharmony_ci    In all the rounded-rectangle path commands, the parametric segment
18565bd8deadSopenharmony_ci    path equations in Table 5.pathEquations are expressed in terms of
18575bd8deadSopenharmony_ci    the function /rrect/ that returns an (x,y) position on the rounded
18585bd8deadSopenharmony_ci    rectangle when evaluated over the parametric range t=0..1.  /rrect/
18595bd8deadSopenharmony_ci    is a spline of alternating rational quadratic Bezier segments and
18605bd8deadSopenharmony_ci    linear segments that forms a closed contour.
18615bd8deadSopenharmony_ci
18625bd8deadSopenharmony_ci    In addition to its parametric variable /t/, /rrect/ has 12
18635bd8deadSopenharmony_ci    parameters to which geometric properties can be ascribed when these
18645bd8deadSopenharmony_ci    values are positive.  (No restriction precludes these parameters
18655bd8deadSopenharmony_ci    to be non-positive; negative and zero values are allowed and
18665bd8deadSopenharmony_ci    supported.) (x,y) is the 2D location of the lower-left corner of the
18675bd8deadSopenharmony_ci    rectangle tightly bounding the rounded rectangle contour; /w/ and /h/
18685bd8deadSopenharmony_ci    are the respective width and height of the same bounding rectangle.
18695bd8deadSopenharmony_ci    /r_llx/, /r_lrx/, /r_urx/, and /r_ulx/ are the elliptical x-axis
18705bd8deadSopenharmony_ci    radii corresponding to the lower-left, lower-right, upper-right,
18715bd8deadSopenharmony_ci    and upper-left corners of the rounded rectangle; likewise /r_lly/,
18725bd8deadSopenharmony_ci    /r_lry/, /r_ury/, and /r_uly/ are the elliptical y-axis for the
18735bd8deadSopenharmony_ci    same corners.
18745bd8deadSopenharmony_ci
18755bd8deadSopenharmony_ci    Equation 5.roundedRectangleContour
18765bd8deadSopenharmony_ci
18775bd8deadSopenharmony_ci        rrect(x,y,             / (1-t_0)*C_ll + t_0*A_lr,                                   t=0/8..1/8
18785bd8deadSopenharmony_ci              w,h,             |
18795bd8deadSopenharmony_ci              r_llx,r_lly,     | (1-t_1)^2*A_lr + (1-t_1)*t_1*B_lr*sqrt(2) + t_1^2*C_lr)/
18805bd8deadSopenharmony_ci              r_lrx,r_lry,  =  < ((1-t_1)^2 + (1-t_1)*t_1*sqrt(2) + t_1^2),                 t=1/8..2/8
18815bd8deadSopenharmony_ci              r_urx,r_ury,     |
18825bd8deadSopenharmony_ci              r_ulx,r_uly,     | (1-t_2)*C_lr + t_2*A_ur,                                   t=2/8..3/8
18835bd8deadSopenharmony_ci              t)               |
18845bd8deadSopenharmony_ci                               | (1-t_3)^2*A_ur + (1-t_3)*t_3*B_ur*sqrt(2) + t_3^2*C_ur)/
18855bd8deadSopenharmony_ci                               | ((1-t_3)^2 + (1-t_3)*t_3*sqrt(2) + t_3^2),                 t=3/8..4/8
18865bd8deadSopenharmony_ci                               |
18875bd8deadSopenharmony_ci                               | (1-t_4)*C_ur + t_4*A_ul,                                   t=4/8..5/8
18885bd8deadSopenharmony_ci                               |
18895bd8deadSopenharmony_ci                               | (1-t_5)^2*A_ul + (1-t_5)*t_5*B_ul*sqrt(2) + t_5^2*C_ul)/
18905bd8deadSopenharmony_ci                               | ((1-t_5)^2 + (1-t_5)*t_5*sqrt(2) + t_5^2),                 t=5/8..6/8
18915bd8deadSopenharmony_ci                               |
18925bd8deadSopenharmony_ci                               | (1-t_6)*C_ul + t_6*A_ll,                                   t=6/8..7/8
18935bd8deadSopenharmony_ci                               |
18945bd8deadSopenharmony_ci                               | (1-t_7)^2*A_ll + (1-t_7)*t_7*B_ll*sqrt(2) + t_7^2*C_ll)/
18955bd8deadSopenharmony_ci                               \ ((1-t_7)^2 + (1-t_7)*t_7*sqrt(2) + t_7^2),                 t=7/8..1
18965bd8deadSopenharmony_ci
18975bd8deadSopenharmony_ci    where
18985bd8deadSopenharmony_ci
18995bd8deadSopenharmony_ci        t_i = 8*t - i
19005bd8deadSopenharmony_ci
19015bd8deadSopenharmony_ci        A_ll = (x,y-r_lly), h<0
19025bd8deadSopenharmony_ci               (x,y+r_lly), otherwise
19035bd8deadSopenharmony_ci        B_ll = (x,y)
19045bd8deadSopenharmony_ci        C_ll = (x-r_llx,y), w<0
19055bd8deadSopenharmony_ci               (x+r_llx,y), otherwise
19065bd8deadSopenharmony_ci
19075bd8deadSopenharmony_ci        A_lr = (x+w+r_lrx,y), w<0
19085bd8deadSopenharmony_ci               (x+w-r_lrx,y), otherwise
19095bd8deadSopenharmony_ci        B_lr = (x+w,y)
19105bd8deadSopenharmony_ci        C_lr = (x+w,y-r_lry), h<0
19115bd8deadSopenharmony_ci               (x+w,y+r_lry), otherwise
19125bd8deadSopenharmony_ci
19135bd8deadSopenharmony_ci        A_ur = (x+w,y+h-r_ury*sign(h)), h<0
19145bd8deadSopenharmony_ci               (x+w,y+h-r_ury*sign(h)), otherwise
19155bd8deadSopenharmony_ci        B_ur = (x+w,y+h)
19165bd8deadSopenharmony_ci        C_ur = (x+w+r_urx,y+h), w<0
19175bd8deadSopenharmony_ci               (x+w-r_urx,y+h), otherwise
19185bd8deadSopenharmony_ci
19195bd8deadSopenharmony_ci        A_ul = (x-r_ulx,y+h), w<0
19205bd8deadSopenharmony_ci               (x+r_ulx,y+h), otherwise
19215bd8deadSopenharmony_ci        B_ul = (x,y+h)
19225bd8deadSopenharmony_ci        C_ul = (x,y+h+r_uly), h<0
19235bd8deadSopenharmony_ci               (x,y+h-r_uly), otherwise
19245bd8deadSopenharmony_ci
19255bd8deadSopenharmony_ci    Consider /t_i/ to be a subparmetric range within /t/ where /t_i/
19265bd8deadSopenharmony_ci    ranges over 0..1 for each spline segment of /rrect/.  The 2D control
19275bd8deadSopenharmony_ci    points /A_ll/ through /C_ul/ are shown in Figure 5.roundedRectangle,
19285bd8deadSopenharmony_ci    where /ll/, /lr/, /ur/, and /ul/ correspond to lower-left,
19295bd8deadSopenharmony_ci    lower-right, upper-right, and upper-left respectively.
19305bd8deadSopenharmony_ci
19315bd8deadSopenharmony_ci    Figure 5.roundedRectangle:  Geometric interpretation of Equation
19325bd8deadSopenharmony_ci    5.roundedRectangleContour parameters.
19335bd8deadSopenharmony_ci
19345bd8deadSopenharmony_ci                   _ r_ulx                       _ r_urx
19355bd8deadSopenharmony_ci                  / \                           / \
19365bd8deadSopenharmony_ci                 /   \C_ul                A_ur /   \
19375bd8deadSopenharmony_ci           B_ul .-----.-----------------------.-----. B_ur     \
19385bd8deadSopenharmony_ci               /|                                   |\         |
19395bd8deadSopenharmony_ci        r_uly < |                                   | > r_ury  |
19405bd8deadSopenharmony_ci               \|                                   |/         |
19415bd8deadSopenharmony_ci           A_ul .                                   . C_ur     |
19425bd8deadSopenharmony_ci                |                                   |          \
19435bd8deadSopenharmony_ci                |                                   |           > h
19445bd8deadSopenharmony_ci                |                                   |          /
19455bd8deadSopenharmony_ci                |                                   |          |
19465bd8deadSopenharmony_ci           A_ll .                                   . C_rl     |
19475bd8deadSopenharmony_ci               /|                                   |\         |
19485bd8deadSopenharmony_ci        r_lly < |                                   | > r_rly  |
19495bd8deadSopenharmony_ci               \|                                   |/         |
19505bd8deadSopenharmony_ci           B_ll .-----.-----------------------.-----. B_rl     /
19515bd8deadSopenharmony_ci         & (x,y) \   /C_ll                A_rl \   /
19525bd8deadSopenharmony_ci                  \_/                           \_/
19535bd8deadSopenharmony_ci                    r_llx                         r_rlx
19545bd8deadSopenharmony_ci                 \______________  __________________/
19555bd8deadSopenharmony_ci                                \/
19565bd8deadSopenharmony_ci                                 w
19575bd8deadSopenharmony_ci
19585bd8deadSopenharmony_ci    Note that the ROUNDED_RECT*_NV commands degenerate to the RECT_NV
19595bd8deadSopenharmony_ci    command when all the radii are zero.
19605bd8deadSopenharmony_ci
19615bd8deadSopenharmony_ci    PARTIAL ELLIPTICAL ARC COMMAND DETAILS
19625bd8deadSopenharmony_ci
19635bd8deadSopenharmony_ci    In all the arc-based path commands, the parametric segment path
19645bd8deadSopenharmony_ci    equations in Table 5.pathEquations are expressed in terms of the
19655bd8deadSopenharmony_ci    functions /arc_x/ and /arc_y/.
19665bd8deadSopenharmony_ci
19675bd8deadSopenharmony_ci    Equation 5.generalParametricArc
19685bd8deadSopenharmony_ci
19695bd8deadSopenharmony_ci        arc_x(c,rv,rh,phi,theta1,dtheta,t) = cos(phi)*rh*cos(theta1+t*dtheta) -
19705bd8deadSopenharmony_ci                                             sin(phi)*rv*sin(theta1+t*dtheta) + c.x
19715bd8deadSopenharmony_ci        arc_y(c,rv,rh,phi,theta1,dtheta,t) = sin(phi)*rh*cos(theta1+t*dtheta) +
19725bd8deadSopenharmony_ci                                             cos(phi)*rv*sin(theta1+t*dtheta) + c.y
19735bd8deadSopenharmony_ci
19745bd8deadSopenharmony_ci    This general form of a parametric partial elliptical arc computes
19755bd8deadSopenharmony_ci    (x,y) 2D positions on the arc as /t/ ranges from 0.0 to 1.0 inclusive.
19765bd8deadSopenharmony_ci
19775bd8deadSopenharmony_ci    In addition to the varying /t/ parameter, these functions depend on
19785bd8deadSopenharmony_ci    a 2D (x,y) center position /c/, a horizontal ellipse radius /rh/,
19795bd8deadSopenharmony_ci    a vertical ellipse radius /rv/, a counterclockwise angle (in radians)
19805bd8deadSopenharmony_ci    of an ellipse with respect to the x-axis /phi/, /theta1/ is the angle
19815bd8deadSopenharmony_ci    (in radians) of the initial point on the partial arc, and /dtheta/
19825bd8deadSopenharmony_ci    is the difference between the angle (in radians) of the terminal
19835bd8deadSopenharmony_ci    point on the partial arc and /theta1/.  The larger of /rh/ and /rv/
19845bd8deadSopenharmony_ci    is the complete ellipse's major axis while the smaller of the two
19855bd8deadSopenharmony_ci    is the complete ellipse's minor axis.
19865bd8deadSopenharmony_ci
19875bd8deadSopenharmony_ci    How these additional dependent parameters for /arc_x/ and /arc_y/
19885bd8deadSopenharmony_ci    are determined depends on the specific arc path command as
19895bd8deadSopenharmony_ci    detailed in Table 5.arcParameterSpecialization.  Before explaining
19905bd8deadSopenharmony_ci    how specific arc commands determine these dependent parameters,
19915bd8deadSopenharmony_ci    the following discussion develops a general scheme for converting
19925bd8deadSopenharmony_ci    general end-point representations of arcs to the partial elliptical
19935bd8deadSopenharmony_ci    arc segment representation of Equation 5.generalParametricArc.
19945bd8deadSopenharmony_ci    All the arc commands supported are specializations of this general
19955bd8deadSopenharmony_ci    end-point representation.  The general scheme is developed, specific
19965bd8deadSopenharmony_ci    arc commands are specified as special cases of the general end-point
19975bd8deadSopenharmony_ci    representation scheme for arcs.
19985bd8deadSopenharmony_ci
19995bd8deadSopenharmony_ci    In general, consider seven scalar values (/x1/, /y1/, /x2/,
20005bd8deadSopenharmony_ci    /y2/, /phi/, /fA/, and /fS/) fully parameterizing a given partial
20015bd8deadSopenharmony_ci    elliptical arc:
20025bd8deadSopenharmony_ci
20035bd8deadSopenharmony_ci        *   a 2D position (x1,y1) at the start of a partial elliptical
20045bd8deadSopenharmony_ci            arc segment
20055bd8deadSopenharmony_ci
20065bd8deadSopenharmony_ci        *   a 2D position (x2,y2) at the end of a partial elliptical
20075bd8deadSopenharmony_ci            arc segment
20085bd8deadSopenharmony_ci
20095bd8deadSopenharmony_ci        *   /phi/ is the angle (in radians) from the x-axis of the path
20105bd8deadSopenharmony_ci            space coordinate system to the x-axis of the axis-aligned ellipse
20115bd8deadSopenharmony_ci
20125bd8deadSopenharmony_ci        *   /fA/ is a boolean (the "large arc" flag) that is true when
20135bd8deadSopenharmony_ci            the arc spans greater than 180 degrees; and otherwise false
20145bd8deadSopenharmony_ci            if the arc sweeps 180 degrees or less
20155bd8deadSopenharmony_ci
20165bd8deadSopenharmony_ci        *   /fS/ is a boolean (the "sweep" flag) that is true when the
20175bd8deadSopenharmony_ci            arc sweeps in a counterclockwise direction in path space
20185bd8deadSopenharmony_ci            (so sweeps with increasing angles); and otherwise false
20195bd8deadSopenharmony_ci            when the arc sweeps in a clockwise direction (so sweeps with
20205bd8deadSopenharmony_ci            decreasing angles)
20215bd8deadSopenharmony_ci
20225bd8deadSopenharmony_ci    Given this parameterization, the procedure below computes the /c/,
20235bd8deadSopenharmony_ci    /rv/, /rh/, /phi/, /theta1/, and /dtheta/ parameters to represent
20245bd8deadSopenharmony_ci    this same arc in the general parametric form of Equation
20255bd8deadSopenharmony_ci    5.generalParametricArc.
20265bd8deadSopenharmony_ci
20275bd8deadSopenharmony_ci    Step 1:
20285bd8deadSopenharmony_ci
20295bd8deadSopenharmony_ci       x1p =  cos(phi)*(x1-x2)/2 + sin(phi)*(y1-y2)/2
20305bd8deadSopenharmony_ci       y1p = -sin(phi)*(x1-x2)/2 + cos(phi)*(y1-y2)/2
20315bd8deadSopenharmony_ci
20325bd8deadSopenharmony_ci    If /rh/, /rv/, and /phi/ are such that there is no solution
20335bd8deadSopenharmony_ci    (basically, the ellipse is not big enough to reach from (x1,y1)
20345bd8deadSopenharmony_ci    to (x2,y2), then the ellipse is scaled up uniformly until there
20355bd8deadSopenharmony_ci    is exactly one solution (until the ellipse is just big enough)
20365bd8deadSopenharmony_ci    in this manner:
20375bd8deadSopenharmony_ci
20385bd8deadSopenharmony_ci       lambda = (x1p/rh)^2 + (y1p/rv)^2
20395bd8deadSopenharmony_ci
20405bd8deadSopenharmony_ci               / rh,               lambda<=1
20415bd8deadSopenharmony_ci       rp.x = {
20425bd8deadSopenharmony_ci               \ rh*sqrt(lambda),  lambda>1
20435bd8deadSopenharmony_ci
20445bd8deadSopenharmony_ci               / rv,               lambda<=1
20455bd8deadSopenharmony_ci       rp.y = {
20465bd8deadSopenharmony_ci               \ rv*sqrt(lambda),  lambda>1
20475bd8deadSopenharmony_ci
20485bd8deadSopenharmony_ci    Step 2:
20495bd8deadSopenharmony_ci
20505bd8deadSopenharmony_ci       cp.x = fsgn*sqrt((rp.x^2*rp.y^2 - rp.x^2*y1p^2 - rp.y^2*x1p^2) /
20515bd8deadSopenharmony_ci                        (rp.x^2*y1p^2 + rp.y^2*x1p^2)
20525bd8deadSopenharmony_ci                       ) * rp.x*y1p/rp.y
20535bd8deadSopenharmony_ci       cp.y = fsgn*sqrt((rp.x^2*rp.y^2 - rp.x^2*y1p^2 - rp.y^2*x1p^2) /
20545bd8deadSopenharmony_ci                        (rp.x^2*y1p^2 + rp.y^2*x1p^2)
20555bd8deadSopenharmony_ci                       ) * -rp.y*x1p/rp.x
20565bd8deadSopenharmony_ci
20575bd8deadSopenharmony_ci    where
20585bd8deadSopenharmony_ci
20595bd8deadSopenharmony_ci                / +1,  fA != fS
20605bd8deadSopenharmony_ci        fsgn = {
20615bd8deadSopenharmony_ci                \ -1,  fA = fS
20625bd8deadSopenharmony_ci
20635bd8deadSopenharmony_ci    Step 3:
20645bd8deadSopenharmony_ci
20655bd8deadSopenharmony_ci        c.x = cos(phi)*cp.x - sin(phi)*cyp + (x1+x2)/2
20665bd8deadSopenharmony_ci        c.y = sin(phi)*cp.x + cos(phi)*cyp + (y1+y2)/2
20675bd8deadSopenharmony_ci
20685bd8deadSopenharmony_ci    In general, the angle between two vectors (u.x, u.y) and (v.x, v.y)
20695bd8deadSopenharmony_ci    can be computed as
20705bd8deadSopenharmony_ci
20715bd8deadSopenharmony_ci                      / arcos(dot(u,v)/sqrt(dot(u,u))*sqrt(dot(v,v))),   u.x*v.y-u.y*v.x>=0
20725bd8deadSopenharmony_ci        angle(u,v) = {
20735bd8deadSopenharmony_ci                      \ -arcos(dot(u,v)/sqrt(dot(u,u))*sqrt(dot(v,v))),  u.x*v.y-u.y*v.x<0
20745bd8deadSopenharmony_ci
20755bd8deadSopenharmony_ci    Step 4:
20765bd8deadSopenharmony_ci
20775bd8deadSopenharmony_ci        theta1 = angle([1,0],
20785bd8deadSopenharmony_ci                       [(x1p-cp.x)/r.x,(y1p-cp.y)/r.y])
20795bd8deadSopenharmony_ci        dangle = angle([(x1p-cp.x)/r.x,(y1p-cp.y)/r.y],
20805bd8deadSopenharmony_ci                       [(-x1p-cp.x)/r.x,(-y1p-cp.y)/r.y])
20815bd8deadSopenharmony_ci
20825bd8deadSopenharmony_ci                    / dangle - 2*Pi,  fS=false AND d>0
20835bd8deadSopenharmony_ci                   /
20845bd8deadSopenharmony_ci                  /   dangle,         fS=false AND d<=0
20855bd8deadSopenharmony_ci        dtheta = {
20865bd8deadSopenharmony_ci                  \   dangle,         fS=true  AND d>=0
20875bd8deadSopenharmony_ci                   \
20885bd8deadSopenharmony_ci                    \ dangle + 2*Pi,  fS=true  AND d<0
20895bd8deadSopenharmony_ci
20905bd8deadSopenharmony_ci    The arc path commands allow arbitrary numeric values so when these
20915bd8deadSopenharmony_ci    values result in invalid or out-of-range parameters when the above
20925bd8deadSopenharmony_ci    steps are applied, the following further steps are taken to ensure
20935bd8deadSopenharmony_ci    well-defined behavior.
20945bd8deadSopenharmony_ci
20955bd8deadSopenharmony_ci    If (x1,y1) and (x2,y2) are identical, then this is equivalent to
20965bd8deadSopenharmony_ci    omitting the arc segment entirely.
20975bd8deadSopenharmony_ci
20985bd8deadSopenharmony_ci    If either of /rh/ or /rv/ is zero, the arc is treated as a straight
20995bd8deadSopenharmony_ci    line segment from (x1,y1) to (x2,y2).
21005bd8deadSopenharmony_ci
21015bd8deadSopenharmony_ci    Table 5.arcParameterSpecialization now maps the coordinate values
21025bd8deadSopenharmony_ci    for each arc path command to the parameters of the arc end-point
21035bd8deadSopenharmony_ci    parameterization above from which the arc's parametric representation
21045bd8deadSopenharmony_ci    can be obtained.
21055bd8deadSopenharmony_ci
21065bd8deadSopenharmony_ci    Table 5.arcParameterSpecialization: Arc Path Command
21075bd8deadSopenharmony_ci
21085bd8deadSopenharmony_ci    Token                         (x1,y1)     rh         rv         phi          (x2,y2)              fA               fS
21095bd8deadSopenharmony_ci    ----------------------------  ----------  ---------  ---------  -----------  -------------------  ---------------  -------
21105bd8deadSopenharmony_ci    SMALL_CCW_ARC_TO_NV           cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  c[3],c[4]            false            true
21115bd8deadSopenharmony_ci    RELATIVE_SMALL_CCW_ARC_TO_NV  cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  cp.x+c[3],cp.y+c[4]  false            true
21125bd8deadSopenharmony_ci    SMALL_CW_ARC_TO_NV            cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  c[3],c[4]            false            false
21135bd8deadSopenharmony_ci    RELATIVE_SMALL_CW_ARC_TO_NV   cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  cp.x+c[3],cp.y+c[4]  false            false
21145bd8deadSopenharmony_ci    LARGE_CCW_ARC_TO_NV           cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  c[3],c[4]            true             true
21155bd8deadSopenharmony_ci    RELATIVE_LARGE_CCW_ARC_TO_NV  cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  cp.x+c[3],cp.y+c[4]  true             true
21165bd8deadSopenharmony_ci    LARGE_CW_ARC_TO_NV            cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  c[3],c[4]            true             false
21175bd8deadSopenharmony_ci    RELATIVE_SMALL_CW_ARC_TO_NV   cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  cp.x+c[3],cp.y+c[4]  true             false
21185bd8deadSopenharmony_ci    CIRCULAR_CCW_ARC_TO_NV        A.x,A.y     abs(c[2])  abs(c[2])  0            B.x,B.y              (c[4]-c[3])>180  true
21195bd8deadSopenharmony_ci    CIRCULAR_CW_ARC_TO_NV         A.x,A.y     abs(c[2])  abs(c[2])  0            B.x,B.y              (c[4]-c[3])>180  false
21205bd8deadSopenharmony_ci    CIRCULAR_TANGENT_ARC_TO_NV    C.x,C.y     abs(c[4])  abs(c[4])  0            D.x,D.y              false            num>=0
21215bd8deadSopenharmony_ci    ARC_TO_NV                     cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  c[5],c[6]            c[3]!=0          c[4]!=0
21225bd8deadSopenharmony_ci    RELATIVE_ARC_TO_NV            cp.x,cp.y   abs(c[0])  abs(c[1])  c[2]*Pi/180  cp.x+c[5],cp.y+c[6]  c[3]!=0          c[4]!=0
21235bd8deadSopenharmony_ci
21245bd8deadSopenharmony_ci    where, for CIRCULAR_CCW_ARC_TO_NV and CIRCULAR_CW_ARC_TO_NV,
21255bd8deadSopenharmony_ci
21265bd8deadSopenharmony_ci        A = (c[0]+c[2]*cos(c[3]*Pi/180),
21275bd8deadSopenharmony_ci             c[1]+c[2]*sin(c[3]*Pi/180))
21285bd8deadSopenharmony_ci
21295bd8deadSopenharmony_ci        B = (c[0]+c[2]*cos(c[4]*Pi/180),
21305bd8deadSopenharmony_ci             c[1]+c[2]*sin(c[4]*Pi/180))
21315bd8deadSopenharmony_ci
21325bd8deadSopenharmony_ci    and C, D, and num, for CIRCULAR_TANGENT_ARC_TO_NV, are computed
21335bd8deadSopenharmony_ci    through the following steps:
21345bd8deadSopenharmony_ci
21355bd8deadSopenharmony_ci    Step 1:  Compute two tangent vectors:
21365bd8deadSopenharmony_ci
21375bd8deadSopenharmony_ci        d0.x = cp.x - c[0]
21385bd8deadSopenharmony_ci        d0.y = cp.y - c[1]
21395bd8deadSopenharmony_ci        d2.x = c[2] - c[0]
21405bd8deadSopenharmony_ci        d2.y = c[3] - c[1]
21415bd8deadSopenharmony_ci
21425bd8deadSopenharmony_ci    Step 2:  Compute scaling factors for tangent vectors:
21435bd8deadSopenharmony_ci
21445bd8deadSopenharmony_ci        num   = d0.y*d2.x - d2.y*d0.x
21455bd8deadSopenharmony_ci        denom = sqrt(dot(d0,d0)*dot(d2,d2)) - dot(d0,d2)
21465bd8deadSopenharmony_ci
21475bd8deadSopenharmony_ci        dist = abs(c[4] * num/denom)
21485bd8deadSopenharmony_ci
21495bd8deadSopenharmony_ci        l0 = dist/sqrt(dot(d0,d0)) * c[4]/abs(c[4])
21505bd8deadSopenharmony_ci        l2 = dist/sqrt(dot(d2,d2)) * c[4]/abs(c[4])
21515bd8deadSopenharmony_ci
21525bd8deadSopenharmony_ci    Step 3:  Add scaled directions to the tangent vector intersection
21535bd8deadSopenharmony_ci    point:
21545bd8deadSopenharmony_ci
21555bd8deadSopenharmony_ci             / (c[0],c[1]) + d0 * l0,  denom!=0 AND c[4]!=0
21565bd8deadSopenharmony_ci        C = {
21575bd8deadSopenharmony_ci             \ (c[0],c[1]),            denom==0 OR c[4]==0
21585bd8deadSopenharmony_ci
21595bd8deadSopenharmony_ci             / (c[0],c[1]) + d2 * l2,  denom!=0 AND c[4]!=0
21605bd8deadSopenharmony_ci        D = {
21615bd8deadSopenharmony_ci             \ (c[0],c[1]),            denom==0 OR c[4]==0
21625bd8deadSopenharmony_ci
21635bd8deadSopenharmony_ci    PATH OBJECT SPECIFICATION
21645bd8deadSopenharmony_ci
21655bd8deadSopenharmony_ci    Path objects can be specified in one of four ways:
21665bd8deadSopenharmony_ci
21675bd8deadSopenharmony_ci    1)  explicitly from an array of commands and corresponding
21685bd8deadSopenharmony_ci        coordinates,
21695bd8deadSopenharmony_ci
21705bd8deadSopenharmony_ci    2)  from a string conforming to one of two supported grammars to
21715bd8deadSopenharmony_ci        specify a string,
21725bd8deadSopenharmony_ci
21735bd8deadSopenharmony_ci    3)  from a glyph within a font face from a system font or font file,
21745bd8deadSopenharmony_ci        or
21755bd8deadSopenharmony_ci
21765bd8deadSopenharmony_ci    4)  by linearly combining one or more existing path objects with
21775bd8deadSopenharmony_ci        mutually consistent command sequences to form a new path.
21785bd8deadSopenharmony_ci
21795bd8deadSopenharmony_ci    In any situation where a path object is specified or re-specified,
21805bd8deadSopenharmony_ci    the command's parameters are re-initialized as discussed in section
21815bd8deadSopenharmony_ci    5.X.1.5 unless otherwise specified.  However modification of path
21825bd8deadSopenharmony_ci    commands and coordinates (section 5.X.1.4) does not modify path
21835bd8deadSopenharmony_ci    parameters.
21845bd8deadSopenharmony_ci
21855bd8deadSopenharmony_ci    5.X.1.1 Explicit Path Specification
21865bd8deadSopenharmony_ci
21875bd8deadSopenharmony_ci    The command
21885bd8deadSopenharmony_ci
21895bd8deadSopenharmony_ci        void PathCommandsNV(uint path,
21905bd8deadSopenharmony_ci                            sizei numCommands, const ubyte *commands,
21915bd8deadSopenharmony_ci                            sizei numCoords, enum coordType,
21925bd8deadSopenharmony_ci                            const void *coords);
21935bd8deadSopenharmony_ci
21945bd8deadSopenharmony_ci    specifies a new path object named /path/ where /numCommands/
21955bd8deadSopenharmony_ci    indicates the number of path commands, read from the array
21965bd8deadSopenharmony_ci    /commands/, with which to initialize that path's command sequence.
21975bd8deadSopenharmony_ci    These path commands reference coordinates read sequentially from the
21985bd8deadSopenharmony_ci    /coords/ array.  The type of the coordinates read from the /coords/
21995bd8deadSopenharmony_ci    array is determined by the /coordType/ parameter which must be
22005bd8deadSopenharmony_ci    one of BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT, or FLOAT,
22015bd8deadSopenharmony_ci    otherwise the INVALID_ENUM error is generated.
22025bd8deadSopenharmony_ci
22035bd8deadSopenharmony_ci    The /numCommands/ elements of the /commands/ array must be tokens
22045bd8deadSopenharmony_ci    or character in Table 5.pathCommands.  The command sequence matches
22055bd8deadSopenharmony_ci    the element order of the /commands/ array.  Each command references
22065bd8deadSopenharmony_ci    a number of coordinates specified by "Coordinate count" column of
22075bd8deadSopenharmony_ci    Table 5.pathCommands, starting with the first (zero) element of
22085bd8deadSopenharmony_ci    the /coords/ array and advancing by the coordinate count for each
22095bd8deadSopenharmony_ci    command.  If any of these /numCommands/ command values are not
22105bd8deadSopenharmony_ci    listed in the "Token" or "Character aliases" columns of Table
22115bd8deadSopenharmony_ci    5.pathCommands, the INVALID_ENUM error is generated.
22125bd8deadSopenharmony_ci
22135bd8deadSopenharmony_ci    The INVALID_OPERATION error is generated if /numCoords/ does not
22145bd8deadSopenharmony_ci    equal the number of coordinates referenced by the command sequence
22155bd8deadSopenharmony_ci    specified by /numCommands/ and /commands/ (so /numCoords/ provides a
22165bd8deadSopenharmony_ci    sanity check that the /coords/ array is being interpreted properly).
22175bd8deadSopenharmony_ci    The error INVALID_VALUE is generated if either /numCommands/ or
22185bd8deadSopenharmony_ci    /numCoords/ is negative.
22195bd8deadSopenharmony_ci
22205bd8deadSopenharmony_ci    If the PathCommandsNV command results in an error, the path object
22215bd8deadSopenharmony_ci    named /path/ is not changed; if there is no error, the prior contents
22225bd8deadSopenharmony_ci    of /path/, if /path/ was an existent path object, are lost and the
22235bd8deadSopenharmony_ci    path object name /path/ becomes used.
22245bd8deadSopenharmony_ci
22255bd8deadSopenharmony_ci    5.X.1.2 String Path Specification
22265bd8deadSopenharmony_ci
22275bd8deadSopenharmony_ci    The command
22285bd8deadSopenharmony_ci
22295bd8deadSopenharmony_ci        void PathStringNV(uint path, enum format,
22305bd8deadSopenharmony_ci                          sizei length, const void *pathString);
22315bd8deadSopenharmony_ci
22325bd8deadSopenharmony_ci    specifies a new path object named /path/ where /format/ must be
22335bd8deadSopenharmony_ci    either PATH_FORMAT_SVG_NV or PATH_FORMAT_PS_NV, in which case the
22345bd8deadSopenharmony_ci    /length/ and /pathString/ are interpreted according to grammars
22355bd8deadSopenharmony_ci    specified in sections 5.X.1.2.1 and 5.X.1.2.2 respectively.
22365bd8deadSopenharmony_ci    The INVALID_VALUE error is generated if /length/ is negative.
22375bd8deadSopenharmony_ci
22385bd8deadSopenharmony_ci    If the PathStringNV command results in an error, the path object
22395bd8deadSopenharmony_ci    named /path/ is not changed; if there is no error, the prior contents
22405bd8deadSopenharmony_ci    of /path/, if /path/ was an existent path object, are lost and the
22415bd8deadSopenharmony_ci    path object name /path/ becomes used.
22425bd8deadSopenharmony_ci
22435bd8deadSopenharmony_ci    5.X.1.2.1 Scalable Vector Graphics Path Grammar
22445bd8deadSopenharmony_ci
22455bd8deadSopenharmony_ci    If the /format/ parameter of PathStringNV is PATH_FORMAT_SVG_NV,
22465bd8deadSopenharmony_ci    the /pathString/ parameter is interpreted as a string of ubyte ASCII
22475bd8deadSopenharmony_ci    characters with /length/ elements.
22485bd8deadSopenharmony_ci
22495bd8deadSopenharmony_ci    This string must satisfy the "svg-path" production in the path
22505bd8deadSopenharmony_ci    grammar below.  This grammar is taken directly from the Scalable
22515bd8deadSopenharmony_ci    Vector Graphics (SVG) 1.1 (April 30, 2009) specification.
22525bd8deadSopenharmony_ci
22535bd8deadSopenharmony_ci    The following notation is used in the Backus-Naur Form (BNF)
22545bd8deadSopenharmony_ci    description of the grammar for an SVG path string:
22555bd8deadSopenharmony_ci
22565bd8deadSopenharmony_ci        * *: 0 or more
22575bd8deadSopenharmony_ci        * +: 1 or more
22585bd8deadSopenharmony_ci        * ?: 0 or 1
22595bd8deadSopenharmony_ci        * (): grouping
22605bd8deadSopenharmony_ci        * ()^n: grouping with n repetitions where n is explained subsequently
22615bd8deadSopenharmony_ci        * |: separates alternatives
22625bd8deadSopenharmony_ci        * double quotes surround literals
22635bd8deadSopenharmony_ci        * #x: prefixes an ASCII character value followed by hexadecimal
22645bd8deadSopenharmony_ci          digits
22655bd8deadSopenharmony_ci        * ..: means any of an inclusive range of ASCII characters, so
22665bd8deadSopenharmony_ci          '0'..'9' means any digit character
22675bd8deadSopenharmony_ci
22685bd8deadSopenharmony_ci    The following is the grammar for SVG paths.
22695bd8deadSopenharmony_ci
22705bd8deadSopenharmony_ci        svg-path:
22715bd8deadSopenharmony_ci            wsp* moveto-drawto-command-groups? wsp*
22725bd8deadSopenharmony_ci        moveto-drawto-command-groups:
22735bd8deadSopenharmony_ci            moveto-drawto-command-group
22745bd8deadSopenharmony_ci            | moveto-drawto-command-group wsp* moveto-drawto-command-groups
22755bd8deadSopenharmony_ci        moveto-drawto-command-group:
22765bd8deadSopenharmony_ci            moveto wsp* drawto-commands?
22775bd8deadSopenharmony_ci        drawto-commands:
22785bd8deadSopenharmony_ci            drawto-command
22795bd8deadSopenharmony_ci            | drawto-command wsp* drawto-commands
22805bd8deadSopenharmony_ci        drawto-command:
22815bd8deadSopenharmony_ci            closepath
22825bd8deadSopenharmony_ci            | lineto
22835bd8deadSopenharmony_ci            | horizontal-lineto
22845bd8deadSopenharmony_ci            | vertical-lineto
22855bd8deadSopenharmony_ci            | curveto
22865bd8deadSopenharmony_ci            | smooth-curveto
22875bd8deadSopenharmony_ci            | quadratic-bezier-curveto
22885bd8deadSopenharmony_ci            | smooth-quadratic-bezier-curveto
22895bd8deadSopenharmony_ci            | elliptical-arc
22905bd8deadSopenharmony_ci        moveto:
22915bd8deadSopenharmony_ci            ( "M" | "m" ) wsp* moveto-argument-sequence
22925bd8deadSopenharmony_ci        moveto-argument-sequence:
22935bd8deadSopenharmony_ci            coordinate-pair
22945bd8deadSopenharmony_ci            | coordinate-pair comma-wsp? lineto-argument-sequence
22955bd8deadSopenharmony_ci        closepath:
22965bd8deadSopenharmony_ci            ("Z" | "z")
22975bd8deadSopenharmony_ci        lineto:
22985bd8deadSopenharmony_ci            ( "L" | "l" ) wsp* lineto-argument-sequence
22995bd8deadSopenharmony_ci        lineto-argument-sequence:
23005bd8deadSopenharmony_ci            coordinate-pair
23015bd8deadSopenharmony_ci            | coordinate-pair comma-wsp? lineto-argument-sequence
23025bd8deadSopenharmony_ci        horizontal-lineto:
23035bd8deadSopenharmony_ci            ( "H" | "h" ) wsp* horizontal-lineto-argument-sequence
23045bd8deadSopenharmony_ci        horizontal-lineto-argument-sequence:
23055bd8deadSopenharmony_ci            coordinate
23065bd8deadSopenharmony_ci            | coordinate comma-wsp? horizontal-lineto-argument-sequence
23075bd8deadSopenharmony_ci        vertical-lineto:
23085bd8deadSopenharmony_ci            ( "V" | "v" ) wsp* vertical-lineto-argument-sequence
23095bd8deadSopenharmony_ci        vertical-lineto-argument-sequence:
23105bd8deadSopenharmony_ci            coordinate
23115bd8deadSopenharmony_ci            | coordinate comma-wsp? vertical-lineto-argument-sequence
23125bd8deadSopenharmony_ci        curveto:
23135bd8deadSopenharmony_ci            ( "C" | "c" ) wsp* curveto-argument-sequence
23145bd8deadSopenharmony_ci        curveto-argument-sequence:
23155bd8deadSopenharmony_ci            curveto-argument
23165bd8deadSopenharmony_ci            | curveto-argument comma-wsp? curveto-argument-sequence
23175bd8deadSopenharmony_ci        curveto-argument:
23185bd8deadSopenharmony_ci            coordinate-pair comma-wsp? coordinate-pair comma-wsp? coordinate-pair
23195bd8deadSopenharmony_ci        smooth-curveto:
23205bd8deadSopenharmony_ci            ( "S" | "s" ) wsp* smooth-curveto-argument-sequence
23215bd8deadSopenharmony_ci        smooth-curveto-argument-sequence:
23225bd8deadSopenharmony_ci            smooth-curveto-argument
23235bd8deadSopenharmony_ci            | smooth-curveto-argument comma-wsp? smooth-curveto-argument-sequence
23245bd8deadSopenharmony_ci        smooth-curveto-argument:
23255bd8deadSopenharmony_ci            coordinate-pair comma-wsp? coordinate-pair
23265bd8deadSopenharmony_ci        quadratic-bezier-curveto:
23275bd8deadSopenharmony_ci            ( "Q" | "q" ) wsp* quadratic-bezier-curveto-argument-sequence
23285bd8deadSopenharmony_ci        quadratic-bezier-curveto-argument-sequence:
23295bd8deadSopenharmony_ci            quadratic-bezier-curveto-argument
23305bd8deadSopenharmony_ci            | quadratic-bezier-curveto-argument comma-wsp?
23315bd8deadSopenharmony_ci                quadratic-bezier-curveto-argument-sequence
23325bd8deadSopenharmony_ci        quadratic-bezier-curveto-argument:
23335bd8deadSopenharmony_ci            coordinate-pair comma-wsp? coordinate-pair
23345bd8deadSopenharmony_ci        smooth-quadratic-bezier-curveto:
23355bd8deadSopenharmony_ci            ( "T" | "t" ) wsp* smooth-quadratic-bezier-curveto-argument-sequence
23365bd8deadSopenharmony_ci        smooth-quadratic-bezier-curveto-argument-sequence:
23375bd8deadSopenharmony_ci            coordinate-pair
23385bd8deadSopenharmony_ci            | coordinate-pair comma-wsp? smooth-quadratic-bezier-curveto-argument-sequence
23395bd8deadSopenharmony_ci        elliptical-arc:
23405bd8deadSopenharmony_ci            ( "A" | "a" ) wsp* elliptical-arc-argument-sequence
23415bd8deadSopenharmony_ci        elliptical-arc-argument-sequence:
23425bd8deadSopenharmony_ci            elliptical-arc-argument
23435bd8deadSopenharmony_ci            | elliptical-arc-argument comma-wsp? elliptical-arc-argument-sequence
23445bd8deadSopenharmony_ci        elliptical-arc-argument:
23455bd8deadSopenharmony_ci            nonnegative-number comma-wsp? nonnegative-number comma-wsp?
23465bd8deadSopenharmony_ci                number comma-wsp flag comma-wsp flag comma-wsp coordinate-pair
23475bd8deadSopenharmony_ci        coordinate-pair:
23485bd8deadSopenharmony_ci            coordinate comma-wsp? coordinate
23495bd8deadSopenharmony_ci        coordinate:
23505bd8deadSopenharmony_ci            number
23515bd8deadSopenharmony_ci        nonnegative-number:
23525bd8deadSopenharmony_ci            integer-constant
23535bd8deadSopenharmony_ci            | floating-point-constant
23545bd8deadSopenharmony_ci        number:
23555bd8deadSopenharmony_ci            sign? integer-constant
23565bd8deadSopenharmony_ci            | sign? floating-point-constant
23575bd8deadSopenharmony_ci        flag:
23585bd8deadSopenharmony_ci            "0" | "1"
23595bd8deadSopenharmony_ci        comma-wsp:
23605bd8deadSopenharmony_ci            (wsp+ comma? wsp*) | (comma wsp*)
23615bd8deadSopenharmony_ci        comma:
23625bd8deadSopenharmony_ci            ","
23635bd8deadSopenharmony_ci        integer-constant:
23645bd8deadSopenharmony_ci            digit-sequence
23655bd8deadSopenharmony_ci        floating-point-constant:
23665bd8deadSopenharmony_ci            fractional-constant exponent?
23675bd8deadSopenharmony_ci            | digit-sequence exponent
23685bd8deadSopenharmony_ci        fractional-constant:
23695bd8deadSopenharmony_ci            digit-sequence? "." digit-sequence
23705bd8deadSopenharmony_ci            | digit-sequence "."
23715bd8deadSopenharmony_ci        exponent:
23725bd8deadSopenharmony_ci            ( "e" | "E" ) sign? digit-sequence
23735bd8deadSopenharmony_ci        sign:
23745bd8deadSopenharmony_ci            "+" | "-"
23755bd8deadSopenharmony_ci        digit-sequence:
23765bd8deadSopenharmony_ci            digit
23775bd8deadSopenharmony_ci            | digit digit-sequence
23785bd8deadSopenharmony_ci        digit:
23795bd8deadSopenharmony_ci            "0".."9"
23805bd8deadSopenharmony_ci        wsp:
23815bd8deadSopenharmony_ci            (#x20 | #x9 | #xD | #xA)
23825bd8deadSopenharmony_ci
23835bd8deadSopenharmony_ci    The processing of the BNF must consume as much of a given BNF
23845bd8deadSopenharmony_ci    production as possible, stopping at the point when a character
23855bd8deadSopenharmony_ci    is encountered which no longer satisfies the production.  Thus,
23865bd8deadSopenharmony_ci    in the string "M 100-200", the first coordinate for the "moveto"
23875bd8deadSopenharmony_ci    consumes the characters "100" and stops upon encountering the minus
23885bd8deadSopenharmony_ci    sign because the minus sign cannot follow a digit in the production
23895bd8deadSopenharmony_ci    of a "coordinate".  The result is that the first coordinate will be
23905bd8deadSopenharmony_ci    "100" and the second coordinate will be "-200".
23915bd8deadSopenharmony_ci
23925bd8deadSopenharmony_ci    Similarly, for the string "M 0.6.5", the first coordinate of the
23935bd8deadSopenharmony_ci    "moveto" consumes the characters "0.6" and stops upon encountering
23945bd8deadSopenharmony_ci    the second decimal point because the production of a "coordinate"
23955bd8deadSopenharmony_ci    only allows one decimal point. The result is that the first coordinate
23965bd8deadSopenharmony_ci    will be "0.6" and the second coordinate will be ".5".
23975bd8deadSopenharmony_ci
23985bd8deadSopenharmony_ci    The grammar allows the string to be empty (zero length).  This is
23995bd8deadSopenharmony_ci    not an error, instead specifies a path with no commands.
24005bd8deadSopenharmony_ci
24015bd8deadSopenharmony_ci    Table 5.svgCommands maps productions in the grammar above to the
24025bd8deadSopenharmony_ci    path commands in Table 5.pathCommands; each such path command, with
24035bd8deadSopenharmony_ci    its corresponding coordinates, is added to the path command sequence
24045bd8deadSopenharmony_ci    of the path object.  Each production listed in Table 5.svgCommands
24055bd8deadSopenharmony_ci    consumes a number of coordinates consistent with the path command
24065bd8deadSopenharmony_ci    token's coordinate count listed in Table 5.pathCommands.  The
24075bd8deadSopenharmony_ci    "coordinate" and "nonnegative-number" productions convert to a numeric
24085bd8deadSopenharmony_ci    coordinate value in the obvious way.  The "flag" production converts
24095bd8deadSopenharmony_ci    "0" and "1" to numeric coordinate values zero and one respectively.
24105bd8deadSopenharmony_ci
24115bd8deadSopenharmony_ci    Table 5.svgCommands: SVG Grammar Commands to Path Command Tokens
24125bd8deadSopenharmony_ci
24135bd8deadSopenharmony_ci                                                           Grammar's prior
24145bd8deadSopenharmony_ci        Production                                         command character  Path command token
24155bd8deadSopenharmony_ci        -------------------------------------------------  -----------------  -------------------------------------
24165bd8deadSopenharmony_ci        moveto-argument-sequence                           "M"                MOVE_TO_NV
24175bd8deadSopenharmony_ci                                                           "m"                RELATIVE_MOVE_TO_NV
24185bd8deadSopenharmony_ci        closepath                                          "Z" or "z"         CLOSE_PATH_NV
24195bd8deadSopenharmony_ci        lineto-argument-sequence                           "L"                LINE_TO_NV
24205bd8deadSopenharmony_ci                                                           "l"                RELATIVE_LINE_TO_NV
24215bd8deadSopenharmony_ci        horizontal-lineto-argument-sequence                "H"                HORIZONTAL_LINE_TO_NV
24225bd8deadSopenharmony_ci                                                           "h"                RELATIVE_HORIZONTAL_LINE_TO_NV
24235bd8deadSopenharmony_ci        vertical-lineto-argument-sequence                  "V"                VERTICAL_LINE_TO_NV
24245bd8deadSopenharmony_ci                                                           "v"                RELATIVE_VERTICAL_LINE_TO_NV
24255bd8deadSopenharmony_ci        quadratic-bezier-curveto-argument                  "Q"                QUADRATIC_CURVE_TO_NV
24265bd8deadSopenharmony_ci                                                           "q"                RELATIVE_QUADRATIC_CURVE_TO_NV
24275bd8deadSopenharmony_ci        smooth-quadratic-bezier-curveto-argument-sequence  "T"                SMOOTH_QUADRATIC_CURVE_TO_NV
24285bd8deadSopenharmony_ci                                                           "t"                RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV
24295bd8deadSopenharmony_ci        curveto-argument                                   "C"                CUBIC_CURVE_TO_NV
24305bd8deadSopenharmony_ci                                                           "c"                RELATIVE_CUBIC_CURVE_TO_NV
24315bd8deadSopenharmony_ci        smooth-curveto-argument                            "S"                SMOOTH_CUBIC_CURVE_TO_NV
24325bd8deadSopenharmony_ci                                                           "s"                RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV
24335bd8deadSopenharmony_ci        elliptical-arc-argument                            "A"                ARC_TO_NV
24345bd8deadSopenharmony_ci                                                           "a"                RELATIVE_ARC_TO_NV
24355bd8deadSopenharmony_ci
24365bd8deadSopenharmony_ci    If the string fails to satisfy the svg-path production, the path
24375bd8deadSopenharmony_ci    object named /path/ is not changed.  The production may not be
24385bd8deadSopenharmony_ci    satisfied for one of two reasons: either the grammar cannot be not
24395bd8deadSopenharmony_ci    satisfied by the string, or the grammar is satisfied but there still
24405bd8deadSopenharmony_ci    remain a non-zero number of characters in the string.  Neither
24415bd8deadSopenharmony_ci    failure to satisfy the production generates an error; instead the
24425bd8deadSopenharmony_ci    PATH_ERROR_POSITION_NV state is set to the character offset where the
24435bd8deadSopenharmony_ci    grammar was first not satisfied or where the grammar was exhausted.
24445bd8deadSopenharmony_ci    If the string was parsed successfully and the command did not generate
24455bd8deadSopenharmony_ci    an error, the PATH_ERROR_POSITION_NV state is set to negative one
24465bd8deadSopenharmony_ci    to indicate success.
24475bd8deadSopenharmony_ci
24485bd8deadSopenharmony_ci    5.X.1.2.2 PostScript Path Grammar
24495bd8deadSopenharmony_ci
24505bd8deadSopenharmony_ci    If the /format/ parameter of PathStringNV is PATH_FORMAT_PS_NV,
24515bd8deadSopenharmony_ci    the /pathString/ parameter is interpreted as a string of ubyte ASCII
24525bd8deadSopenharmony_ci    characters with /length/ elements.
24535bd8deadSopenharmony_ci
24545bd8deadSopenharmony_ci    This string must satisfy the "ps-path" production in the path
24555bd8deadSopenharmony_ci    grammar below.  This grammar is parses path specified in PostScript's
24565bd8deadSopenharmony_ci    subgrammar for user paths specified by "PostScript Language Reference
24575bd8deadSopenharmony_ci    Manual" 3rd edition.
24585bd8deadSopenharmony_ci
24595bd8deadSopenharmony_ci    The following is the grammar (using the same notation as section
24605bd8deadSopenharmony_ci    5.X.1.2.1) for PS paths with special support for binary encoding modes
24615bd8deadSopenharmony_ci    (as explained below):
24625bd8deadSopenharmony_ci
24635bd8deadSopenharmony_ci        ps-path:
24645bd8deadSopenharmony_ci            ps-wsp* user-path? ps-wsp*
24655bd8deadSopenharmony_ci            | ps-wsp* encoded-path ps-wsp*
24665bd8deadSopenharmony_ci        user-path:
24675bd8deadSopenharmony_ci            user-path-cmd
24685bd8deadSopenharmony_ci            | user-path-cmd ps-wsp+ user-path
24695bd8deadSopenharmony_ci        user-path-cmd:
24705bd8deadSopenharmony_ci            setbbox
24715bd8deadSopenharmony_ci            | ps-moveto
24725bd8deadSopenharmony_ci            | rmoveto
24735bd8deadSopenharmony_ci            | ps-lineto
24745bd8deadSopenharmony_ci            | rlineto
24755bd8deadSopenharmony_ci            | ps-curveto
24765bd8deadSopenharmony_ci            | rcurveto
24775bd8deadSopenharmony_ci            | arc
24785bd8deadSopenharmony_ci            | arcn
24795bd8deadSopenharmony_ci            | arct
24805bd8deadSopenharmony_ci            | ps-closepath
24815bd8deadSopenharmony_ci            | ucache
24825bd8deadSopenharmony_ci        setbbox:
24835bd8deadSopenharmony_ci            numeric-value numeric-value numeric-value numeric-value setbbox-cmd
24845bd8deadSopenharmony_ci        setbbox-cmd:
24855bd8deadSopenharmony_ci            "setbbox"
24865bd8deadSopenharmony_ci            | #x92 #x8F
24875bd8deadSopenharmony_ci        ps-moveto:
24885bd8deadSopenharmony_ci            numeric-value numeric-value moveto-cmd
24895bd8deadSopenharmony_ci        moveto-cmd:
24905bd8deadSopenharmony_ci            "moveto"
24915bd8deadSopenharmony_ci            | #x92 #x6B
24925bd8deadSopenharmony_ci        rmoveto:
24935bd8deadSopenharmony_ci            numeric-value numeric-value rmoveto-cmd
24945bd8deadSopenharmony_ci        rmoveto-cmd:
24955bd8deadSopenharmony_ci            "rmoveto"
24965bd8deadSopenharmony_ci            | #x92 #x86
24975bd8deadSopenharmony_ci        ps-lineto:
24985bd8deadSopenharmony_ci            numeric-value numeric-value lineto-cmd
24995bd8deadSopenharmony_ci        lineto-cmd:
25005bd8deadSopenharmony_ci            "lineto"
25015bd8deadSopenharmony_ci            | #x92 #x63
25025bd8deadSopenharmony_ci        rlineto:
25035bd8deadSopenharmony_ci            numeric-value numeric-value rlineto-cmd
25045bd8deadSopenharmony_ci        rlineto-cmd:
25055bd8deadSopenharmony_ci            "rlineto"
25065bd8deadSopenharmony_ci            | #x92 #x85
25075bd8deadSopenharmony_ci        ps-curveto:
25085bd8deadSopenharmony_ci            numeric-value numeric-value numeric-value numeric-value numeric-value numeric-value curveto-cmd
25095bd8deadSopenharmony_ci        curveto-cmd:
25105bd8deadSopenharmony_ci            "curveto"
25115bd8deadSopenharmony_ci            | #x92 #x2B
25125bd8deadSopenharmony_ci        rcurveto:
25135bd8deadSopenharmony_ci            numeric-value numeric-value numeric-value numeric-value numeric-value numeric-value rcurveto-cmd
25145bd8deadSopenharmony_ci        rcurveto-cmd:
25155bd8deadSopenharmony_ci            "rcurveto"
25165bd8deadSopenharmony_ci            | #x92 #x7A
25175bd8deadSopenharmony_ci        arc:
25185bd8deadSopenharmony_ci            numeric-value numeric-value numeric-value numeric-value numeric-value arc-cmd
25195bd8deadSopenharmony_ci        arc-cmd:
25205bd8deadSopenharmony_ci            "arc"
25215bd8deadSopenharmony_ci            | #x92 #x05
25225bd8deadSopenharmony_ci        arcn:
25235bd8deadSopenharmony_ci            numeric-value numeric-value numeric-value numeric-value numeric-value arcn-cmd
25245bd8deadSopenharmony_ci        arcn-cmd:
25255bd8deadSopenharmony_ci            "arcn"
25265bd8deadSopenharmony_ci            | #x92 #x06
25275bd8deadSopenharmony_ci        arct:
25285bd8deadSopenharmony_ci            numeric-value numeric-value numeric-value numeric-value numeric-value arct-cmd
25295bd8deadSopenharmony_ci        arct-cmd:
25305bd8deadSopenharmony_ci            "arct"
25315bd8deadSopenharmony_ci            | #x92 #x07
25325bd8deadSopenharmony_ci        ps-closepath:
25335bd8deadSopenharmony_ci            "closepath"
25345bd8deadSopenharmony_ci            | #x92 #x16
25355bd8deadSopenharmony_ci        ucache:
25365bd8deadSopenharmony_ci            "ucache"
25375bd8deadSopenharmony_ci            | #x92 #xB1
25385bd8deadSopenharmony_ci        encoded-path:
25395bd8deadSopenharmony_ci            data-array ps-wsp* operator-string
25405bd8deadSopenharmony_ci        data-array:
25415bd8deadSopenharmony_ci            "{" ps-wsp* numeric-value-sequence? "}"
25425bd8deadSopenharmony_ci            | homogeneous-number-array
25435bd8deadSopenharmony_ci            | ascii85-homogeneous-number-array
25445bd8deadSopenharmony_ci        operator-string:
25455bd8deadSopenharmony_ci            hexadecimal-binary-string
25465bd8deadSopenharmony_ci            | ascii85-string
25475bd8deadSopenharmony_ci            | short-binary-string
25485bd8deadSopenharmony_ci            | be-long-binary-string
25495bd8deadSopenharmony_ci            | le-long-binary-string
25505bd8deadSopenharmony_ci        hexadecimal-binary-string:
25515bd8deadSopenharmony_ci            "<" ps-wsp-chars* hexadecimal-sequence ps-wsp-chars* ">"
25525bd8deadSopenharmony_ci        hexadecimal-sequence:
25535bd8deadSopenharmony_ci            hexadecimal-digit
25545bd8deadSopenharmony_ci            | hexadecimal-digit ps-wsp-chars* hexadecimal-sequence
25555bd8deadSopenharmony_ci        hexadecimal-digit:
25565bd8deadSopenharmony_ci            digit
25575bd8deadSopenharmony_ci            | "a".."f" |
25585bd8deadSopenharmony_ci            | "A".."F"
25595bd8deadSopenharmony_ci        short-binary-string:
25605bd8deadSopenharmony_ci            #x8E one-byte ( one-byte )^n
25615bd8deadSopenharmony_ci                /where n is the value of the one-byte production decoded
25625bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 255/
25635bd8deadSopenharmony_ci        be-long-binary-string:
25645bd8deadSopenharmony_ci            #x8F two-bytes ( one-byte )^n
25655bd8deadSopenharmony_ci                /where n is the value of the two-bytes production decoded
25665bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 65535, decoded in
25675bd8deadSopenharmony_ci                 big-endian byte order/
25685bd8deadSopenharmony_ci        le-long-binary-string:
25695bd8deadSopenharmony_ci            #x90 two-bytes ( one-byte )^n
25705bd8deadSopenharmony_ci                /where n is the value of the two-bytes production decoded
25715bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 65535, decoded in
25725bd8deadSopenharmony_ci                 little-endian byte order/
25735bd8deadSopenharmony_ci        numeric-value-sequence:
25745bd8deadSopenharmony_ci            numeric-value:
25755bd8deadSopenharmony_ci            | numeric-value numeric-value-sequence
25765bd8deadSopenharmony_ci        numeric-value:
25775bd8deadSopenharmony_ci            number ps-wsp+
25785bd8deadSopenharmony_ci            | radix-number ps-wsp+
25795bd8deadSopenharmony_ci            | be-integer-32bit
25805bd8deadSopenharmony_ci            | le-integer-32bit
25815bd8deadSopenharmony_ci            | be-integer-16bit
25825bd8deadSopenharmony_ci            | le-integer-16bit
25835bd8deadSopenharmony_ci            | le-integer-8bit
25845bd8deadSopenharmony_ci            | be-fixed-16bit
25855bd8deadSopenharmony_ci            | le-fixed-16bit
25865bd8deadSopenharmony_ci            | be-fixed-32bit
25875bd8deadSopenharmony_ci            | le-fixed-32bit
25885bd8deadSopenharmony_ci            | be-float-ieee
25895bd8deadSopenharmony_ci            | le-float-ieee
25905bd8deadSopenharmony_ci            | native-float-ieee
25915bd8deadSopenharmony_ci        be-integer-32bit:
25925bd8deadSopenharmony_ci            #x84 four-bytes
25935bd8deadSopenharmony_ci        le-integer-32bit:
25945bd8deadSopenharmony_ci            #x85 four-bytes
25955bd8deadSopenharmony_ci        be-integer-16bit:
25965bd8deadSopenharmony_ci            #x86 two-bytes
25975bd8deadSopenharmony_ci        le-integer-16bit:
25985bd8deadSopenharmony_ci            #x87 two-bytes
25995bd8deadSopenharmony_ci        le-integer-8bit:
26005bd8deadSopenharmony_ci            #x88 one-byte
26015bd8deadSopenharmony_ci        be-fixed-32bit:
26025bd8deadSopenharmony_ci            #x89 #x0..#x1F four-bytes
26035bd8deadSopenharmony_ci        le-fixed-32bit:
26045bd8deadSopenharmony_ci            #x89 #x80..#x9F four-bytes
26055bd8deadSopenharmony_ci        be-fixed-16bit:
26065bd8deadSopenharmony_ci            #x89 #x20..#x2F two-bytes
26075bd8deadSopenharmony_ci        le-fixed-16bit:
26085bd8deadSopenharmony_ci            #x89 #xA0..#xAF two-bytes
26095bd8deadSopenharmony_ci        be-float-ieee:
26105bd8deadSopenharmony_ci            #x8A four-bytes
26115bd8deadSopenharmony_ci        le-float-ieee:
26125bd8deadSopenharmony_ci            #x8B four-bytes
26135bd8deadSopenharmony_ci        native-float-ieee:
26145bd8deadSopenharmony_ci            #x8C four-bytes
26155bd8deadSopenharmony_ci        radix-number:
26165bd8deadSopenharmony_ci            base "#" base-number
26175bd8deadSopenharmony_ci        base:
26185bd8deadSopenharmony_ci            digit-sequence
26195bd8deadSopenharmony_ci        base-number:
26205bd8deadSopenharmony_ci            base-digit-sequence
26215bd8deadSopenharmony_ci        base-digit-sequence:
26225bd8deadSopenharmony_ci            base-digit
26235bd8deadSopenharmony_ci            | base-digit base-digit-sequence
26245bd8deadSopenharmony_ci        base-digit:
26255bd8deadSopenharmony_ci            digit
26265bd8deadSopenharmony_ci            | "a".."z"
26275bd8deadSopenharmony_ci            | "A".."Z"
26285bd8deadSopenharmony_ci        homogeneous-number-array:
26295bd8deadSopenharmony_ci            be-fixed-32bit-array
26305bd8deadSopenharmony_ci            | be-fixed-16bit-array
26315bd8deadSopenharmony_ci            | be-float-ieee-array
26325bd8deadSopenharmony_ci            | native-float-ieee-array
26335bd8deadSopenharmony_ci            | le-fixed-32bit-array
26345bd8deadSopenharmony_ci            | le-fixed-16bit-array
26355bd8deadSopenharmony_ci            | le-float-ieee-array
26365bd8deadSopenharmony_ci        be-fixed-32bit-array:
26375bd8deadSopenharmony_ci            #x95 #x0..#x1F two-bytes ( four-bytes )^n
26385bd8deadSopenharmony_ci                /where n is the value of the two-bytes production decoded
26395bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 65535, decoded in
26405bd8deadSopenharmony_ci                 big-endian byte order/
26415bd8deadSopenharmony_ci        be-fixed-16bit-array:
26425bd8deadSopenharmony_ci            #x95 #x20..#x2F two-bytes ( two-bytes )^n
26435bd8deadSopenharmony_ci                /where n is the value of the two-bytes production decoded
26445bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 65535, decoded in
26455bd8deadSopenharmony_ci                 big-endian byte order/
26465bd8deadSopenharmony_ci        be-float-ieee-array:
26475bd8deadSopenharmony_ci            #x95 #x30 two-bytes ( four-bytes )^n
26485bd8deadSopenharmony_ci                /where n is the value of the two-bytes production decoded
26495bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 65535, decoded in
26505bd8deadSopenharmony_ci                 big-endian byte order/
26515bd8deadSopenharmony_ci        le-fixed-32bit-array:
26525bd8deadSopenharmony_ci            #x95 #x80..#x9F two-bytes ( four-bytes )^n
26535bd8deadSopenharmony_ci                /where n is the value of the two-bytes production decoded
26545bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 65535, decoded in
26555bd8deadSopenharmony_ci                 little-endian byte order/
26565bd8deadSopenharmony_ci        le-fixed-16bit-array:
26575bd8deadSopenharmony_ci            #x95 #xA0..#xAF two-bytes ( two-bytes )^n
26585bd8deadSopenharmony_ci                /where n is the value of the two-bytes production decoded
26595bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 65535, decoded in
26605bd8deadSopenharmony_ci                 little-endian byte order/
26615bd8deadSopenharmony_ci        le-float-ieee-array:
26625bd8deadSopenharmony_ci            #x95 #xB0 two-bytes ( four-bytes )^n
26635bd8deadSopenharmony_ci                /where n is the value of the two-bytes production decoded
26645bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 65535, decoded in
26655bd8deadSopenharmony_ci                 little-endian byte order/
26665bd8deadSopenharmony_ci        native-float-ieee-array:
26675bd8deadSopenharmony_ci            #x95 ( #x31 | #xB1 ) two-bytes ( four-bytes )^n
26685bd8deadSopenharmony_ci                /where n is the value of the two-bytes production decoded
26695bd8deadSopenharmony_ci                 as an unsigned integer, 0 through 65535, decoded in
26705bd8deadSopenharmony_ci                 the native byte order/
26715bd8deadSopenharmony_ci        ascii85-string:
26725bd8deadSopenharmony_ci            "<~" (#x21..#x75 | "z" | psp-wsp )* "~>"
26735bd8deadSopenharmony_ci        ascii85-homogeneous-number-array:
26745bd8deadSopenharmony_ci            "<~" (#x21..#x75 | "z" | psp-wsp )* "~>"
26755bd8deadSopenharmony_ci        one-byte:
26765bd8deadSopenharmony_ci            #x0..#xFF
26775bd8deadSopenharmony_ci        two-bytes:
26785bd8deadSopenharmony_ci            #x0..#xFF #x0..#xFF
26795bd8deadSopenharmony_ci        four-bytes:
26805bd8deadSopenharmony_ci            #x0..#xFF #x0..#xFF #x0..#xFF #x0..#xFF
26815bd8deadSopenharmony_ci        ps-wsp:
26825bd8deadSopenharmony_ci            ps-wsp-chars
26835bd8deadSopenharmony_ci            | ps-comment
26845bd8deadSopenharmony_ci        ps-wsp-chars:
26855bd8deadSopenharmony_ci            ( #x20 | #x9 | #xA | #xC | #xD | #x0 )
26865bd8deadSopenharmony_ci        ps-comment:
26875bd8deadSopenharmony_ci            "%" ( #0..#9 | #xB..#xC | #xE..#xFF )* ( #xD | #xA )
26885bd8deadSopenharmony_ci
26895bd8deadSopenharmony_ci    This grammar is not technically a pure BNF because it uses binary
26905bd8deadSopenharmony_ci    encoded data to encode how many characters should be as part of
26915bd8deadSopenharmony_ci    several productions (short-binary-string, native-float-ieee-array,
26925bd8deadSopenharmony_ci    etc.).
26935bd8deadSopenharmony_ci
26945bd8deadSopenharmony_ci    The processing of the BNF must consume as much of a given BNF
26955bd8deadSopenharmony_ci    production as possible, stopping at the point when a character
26965bd8deadSopenharmony_ci    is encountered which no longer satisfies the production.
26975bd8deadSopenharmony_ci
26985bd8deadSopenharmony_ci    The grammar allows the string to be empty (zero length). This
26995bd8deadSopenharmony_ci    is not an error, instead specifies a path with no commands.
27005bd8deadSopenharmony_ci
27015bd8deadSopenharmony_ci    Table 5.psCommands maps productions in the grammar above to the path
27025bd8deadSopenharmony_ci    commands in Table 5.pathCommands; each such path command, with its
27035bd8deadSopenharmony_ci    corresponding coordinates, is added to the path command sequence
27045bd8deadSopenharmony_ci    of the path object.  Each production listed in Table 5.svgCommands
27055bd8deadSopenharmony_ci    consumes a quantity of values, matched by the "number" production,
27065bd8deadSopenharmony_ci    consistent with the path command token's coordinate count listed
27075bd8deadSopenharmony_ci    in Table 5.pathCommands.  The "setbbox" and "ucache" products are
27085bd8deadSopenharmony_ci    matched but do not result in path commands.
27095bd8deadSopenharmony_ci
27105bd8deadSopenharmony_ci    Table 5.psCommands: PS Grammar Commands to Path Command Tokens
27115bd8deadSopenharmony_ci
27125bd8deadSopenharmony_ci        Production    Path command token
27135bd8deadSopenharmony_ci        ------------  --------------------------
27145bd8deadSopenharmony_ci        arc           CIRCULAR_CCW_ARC_TO_NV
27155bd8deadSopenharmony_ci        arcn          CIRCULAR_CW_ARC_TO_NV
27165bd8deadSopenharmony_ci        arct          CIRCULAR_TANGENT_ARC_TO_NV
27175bd8deadSopenharmony_ci        ps-closepath  CLOSE_PATH_NV
27185bd8deadSopenharmony_ci        ps-curveto    CUBIC_CURVE_TO_NV
27195bd8deadSopenharmony_ci        ps-lineto     LINE_TO_NV
27205bd8deadSopenharmony_ci        ps-moveto     MOVE_TO_NV
27215bd8deadSopenharmony_ci        rcurveto      RELATIVE_CUBIC_CURVE_TO_NV
27225bd8deadSopenharmony_ci        rlineto       RELATIVE_LINE_TO_NV
27235bd8deadSopenharmony_ci        rmoveto       RELATIVE_MOVE_TO_NV
27245bd8deadSopenharmony_ci        setbbox       -
27255bd8deadSopenharmony_ci        ucache        -
27265bd8deadSopenharmony_ci
27275bd8deadSopenharmony_ci    The "number" production converts to a numeric coordinate value
27285bd8deadSopenharmony_ci    in the obvious way.  The "radix-number" production converts the
27295bd8deadSopenharmony_ci    base-n integer conversion of its "base-number" production using
27305bd8deadSopenharmony_ci    the base indicated by the base-10 integer conversion of its "base"
27315bd8deadSopenharmony_ci    production where the base /n/ must be within the range 2 to 26.
27325bd8deadSopenharmony_ci    The "base-number" is interpreted in base /n/; the "base-number"
27335bd8deadSopenharmony_ci    production must contain digits ranging from 0 to /n/-1; digits greater
27345bd8deadSopenharmony_ci    than 9 are represented by the letters A through Z (or a through z)
27355bd8deadSopenharmony_ci    for the values 10 through 35 respectively.
27365bd8deadSopenharmony_ci
27375bd8deadSopenharmony_ci    The "encoded-path" production provides a compact and precise way
27385bd8deadSopenharmony_ci    to encode paths with the commands and coordinates decoupled.
27395bd8deadSopenharmony_ci
27405bd8deadSopenharmony_ci    The "data-array" subproductions provide a sequence of coordinate
27415bd8deadSopenharmony_ci    values for the encoded path's commands.  The "data-array"
27425bd8deadSopenharmony_ci    subproduction provides a sequence of numbers that is used by the
27435bd8deadSopenharmony_ci    following "operator-string" production.
27445bd8deadSopenharmony_ci
27455bd8deadSopenharmony_ci    The "operator-string" subproduction is interpreted as a sequence
27465bd8deadSopenharmony_ci    of encoded path commands, one command per byte generated by
27475bd8deadSopenharmony_ci    "operator-string"'s "binary-string" production.
27485bd8deadSopenharmony_ci
27495bd8deadSopenharmony_ci    Each hexadecimal character in the "hexadecimal-binary-string"
27505bd8deadSopenharmony_ci    production is a nibble (a 4-bit quantity).  Each pair of characters
27515bd8deadSopenharmony_ci    is two nibbles and they form a byte with the first nibble
27525bd8deadSopenharmony_ci    representing the most signification bits of the byte.  If the
27535bd8deadSopenharmony_ci    "hexadecimal-binary-string" production contains an odd number of
27545bd8deadSopenharmony_ci    hexadecimal characters, "0" is assumed to be suffixed to make an
27555bd8deadSopenharmony_ci    even number of characters (so "A7C" would encode the bytes 167 for
27565bd8deadSopenharmony_ci    "A7" followed by 192 for "C" which is treated as "C0" for 192).
27575bd8deadSopenharmony_ci    Table 5.encodedPathOpcodes maps the values contained in the operator
27585bd8deadSopenharmony_ci    string to path commands.  Each command consumes from the coordinate
27595bd8deadSopenharmony_ci    array supplied by the "data-array" production a number of values
27605bd8deadSopenharmony_ci    for the command's coordinates equal to the path command token's
27615bd8deadSopenharmony_ci    coordinate count listed in Table 5.pathCommands.  If the value for
27625bd8deadSopenharmony_ci    an element of the operator string is between 12 and 32 inclusive,
27635bd8deadSopenharmony_ci    the grammar fails to parse at this point.  If the value /n/ of an
27645bd8deadSopenharmony_ci    element of the operator string is between 32 and 255, then this value
27655bd8deadSopenharmony_ci    /n/-32 is treated as a repetition count and is treated as if /n/-32
27665bd8deadSopenharmony_ci    repetitions of the next command are contained in the operator string
27675bd8deadSopenharmony_ci    instead and the appropriate number of coordinates are consumed from
27685bd8deadSopenharmony_ci    the associated sequence of coordinate values.
27695bd8deadSopenharmony_ci
27705bd8deadSopenharmony_ci    Table 5.encodedPathOpcodes
27715bd8deadSopenharmony_ci
27725bd8deadSopenharmony_ci        Opcode  Name
27735bd8deadSopenharmony_ci        ------  ---------
27745bd8deadSopenharmony_ci        0       setbbox
27755bd8deadSopenharmony_ci        1       moveto
27765bd8deadSopenharmony_ci        2       rmoveto
27775bd8deadSopenharmony_ci        3       lineto
27785bd8deadSopenharmony_ci        4       rlineto
27795bd8deadSopenharmony_ci        5       curveto
27805bd8deadSopenharmony_ci        6       rcurveto
27815bd8deadSopenharmony_ci        7       arc
27825bd8deadSopenharmony_ci        8       arcn
27835bd8deadSopenharmony_ci        9       arct
27845bd8deadSopenharmony_ci        10      closepath
27855bd8deadSopenharmony_ci        11      ucache
27865bd8deadSopenharmony_ci
27875bd8deadSopenharmony_ci    The ASCII characters in the "ascii85-binary-string" production
27885bd8deadSopenharmony_ci    consists of a sequence of printable ASCII characters between the "<~"
27895bd8deadSopenharmony_ci    and "~>" delimiters.  This represents arbitrary binary data using
27905bd8deadSopenharmony_ci    an encoding technique that products a 4:5 expansion as opposed to
27915bd8deadSopenharmony_ci    the 1:2 expansion for the "hexadecimal-binary-string" production.
27925bd8deadSopenharmony_ci    This encoding is known as ASCII base-85.
27935bd8deadSopenharmony_ci
27945bd8deadSopenharmony_ci    Binary data in the ASCII base-85 encoding are encoded in 4-tuples
27955bd8deadSopenharmony_ci    (groups of 4) each 4-tuple is used to produce a 5-type of ASCII
27965bd8deadSopenharmony_ci    characters.  If the binary 4-tuple is (b1,b2,b3,b4) and the encoded
27975bd8deadSopenharmony_ci    5-tuple is (c1,c2,c3,c4,c5), then the relation between them is:
27985bd8deadSopenharmony_ci
27995bd8deadSopenharmony_ci       (b1 * 256^3) + (b2 * 256^2) + (b3 * 256^1) + b4 =
28005bd8deadSopenharmony_ci       (c1 * 256^4) + (c2 * 256^3) + (c3 * 256^2) + (c4 * 256^3) + c5
28015bd8deadSopenharmony_ci
28025bd8deadSopenharmony_ci    The four bytes of binary data are interpreted as a base-256 number and
28035bd8deadSopenharmony_ci    then converted into a base-85 number.  The five "digits" of this number,
28045bd8deadSopenharmony_ci    (c1,c2,c3,c4,c5), are then converted into ASCII characters by adding 33,
28055bd8deadSopenharmony_ci    which is the ASCII code for '!', to each.  ASCII characters in the
28065bd8deadSopenharmony_ci    range '!' to 'u' are used, where '!' represented the value 0 and 'u'
28075bd8deadSopenharmony_ci    represents the value 84.  As a special case, if all five digits are
28085bd8deadSopenharmony_ci    zero, they must be represented by either a single 'z' instead of by
28095bd8deadSopenharmony_ci    '!!!!'.
28105bd8deadSopenharmony_ci
28115bd8deadSopenharmony_ci    If the encoded sequence ends with a sequence of characters that is
28125bd8deadSopenharmony_ci    not an even multiple of 4, the last 1, 2, or 3 characters to produce
28135bd8deadSopenharmony_ci    a special final partial 5-tuple.  Given n (1, 2, or 3) bytes of final
28145bd8deadSopenharmony_ci    binary data, an encoder must first append 4-n zero bytes to make
28155bd8deadSopenharmony_ci    a complete 4-tuple.  Then, the encoder must encode the 4-tuple in
28165bd8deadSopenharmony_ci    the usual way, but without applying the 'z' special case.  Finally,
28175bd8deadSopenharmony_ci    the encoder must write the first n+1 bytes of the resulting 5-tuple.
28185bd8deadSopenharmony_ci    Those bytes are immediately followed by the "~>" terminal marker.
28195bd8deadSopenharmony_ci
28205bd8deadSopenharmony_ci    This encoding scheme is reversible and the GL is responsible for
28215bd8deadSopenharmony_ci    converting the ASCII base-85 string into its corresponding binary
28225bd8deadSopenharmony_ci    data.  White space within an ASCII base-85 encoded string is ignored.
28235bd8deadSopenharmony_ci
28245bd8deadSopenharmony_ci    The following conditions constitute encoding violations of the ASCII
28255bd8deadSopenharmony_ci    base-85 scheme:
28265bd8deadSopenharmony_ci
28275bd8deadSopenharmony_ci        *   The value represented by a 5-tuple is greater than 2^32-1
28285bd8deadSopenharmony_ci
28295bd8deadSopenharmony_ci        *   The 'z' value occurs in the middle of a 5-tuple.
28305bd8deadSopenharmony_ci
28315bd8deadSopenharmony_ci        *   A final partial 5-tuple contains only one character.
28325bd8deadSopenharmony_ci
28335bd8deadSopenharmony_ci    Any such encoding violation is a parsing error.
28345bd8deadSopenharmony_ci
28355bd8deadSopenharmony_ci    Once the ASCII base-85 string is decoded, this sequence of bytes
28365bd8deadSopenharmony_ci    is treated as operator elements in the identical manner as the
28375bd8deadSopenharmony_ci    elements for the "hexadecimal-string" subproduction.  This means
28385bd8deadSopenharmony_ci    invalid opcodes are possible and are treated as parsing errors, and
28395bd8deadSopenharmony_ci    Valid opcodes and counts consume coordinates from the "data-array"
28405bd8deadSopenharmony_ci    production to generate path commands with associated coordinates.
28415bd8deadSopenharmony_ci
28425bd8deadSopenharmony_ci    The "short-binary-string", "be-long-binary-string", and
28435bd8deadSopenharmony_ci    "le-long-binary-string" subproductions of "operator-string" are
28445bd8deadSopenharmony_ci    binary encodings of a sequence of operator string elements.
28455bd8deadSopenharmony_ci
28465bd8deadSopenharmony_ci    The "short-binary-string" has a count from 0 to 255 supplied by its
28475bd8deadSopenharmony_ci    "one-byte" subproduction which indicates how many bytes follow.
28485bd8deadSopenharmony_ci    These remaining (unsigned) bytes generate the sequence of operator
28495bd8deadSopenharmony_ci    string elements.
28505bd8deadSopenharmony_ci
28515bd8deadSopenharmony_ci    The "be-long-binary-string" has a count from 0 to 65535 supplied by
28525bd8deadSopenharmony_ci    its "two-byte" subproduction which indicates how many bytes follow.
28535bd8deadSopenharmony_ci    These remaining (unsigned) bytes generate the sequence of operator
28545bd8deadSopenharmony_ci    string elements.  The "two-byte" subproduction is converted to a
28555bd8deadSopenharmony_ci    count by multiplying the first unsigned byte by 256 and adding it
28565bd8deadSopenharmony_ci    to the second unsigned byte.
28575bd8deadSopenharmony_ci
28585bd8deadSopenharmony_ci    The "le-long-binary-string" has a count from 0 to 65535 supplied by
28595bd8deadSopenharmony_ci    its "two-byte" subproduction which indicates how many bytes follow.
28605bd8deadSopenharmony_ci    These remaining (unsigned) bytes generate the sequence of operator
28615bd8deadSopenharmony_ci    string elements.  The "two-byte" subproduction is converted to a
28625bd8deadSopenharmony_ci    count by multiplying the second unsigned byte by 256 and adding it
28635bd8deadSopenharmony_ci    to the first unsigned byte.
28645bd8deadSopenharmony_ci
28655bd8deadSopenharmony_ci    The "encoded-path" fails to parse if invalid opcodes are detected
28665bd8deadSopenharmony_ci    in the operator string or the sequence of numbers for coordinates
28675bd8deadSopenharmony_ci    is exhausted prematurely.
28685bd8deadSopenharmony_ci
28695bd8deadSopenharmony_ci    If the string fails to satisfy the ps-path production, the path
28705bd8deadSopenharmony_ci    object named /path/ is not changed.  The production may not be
28715bd8deadSopenharmony_ci    satisfied for one of three reasons: the grammar cannot be not
28725bd8deadSopenharmony_ci    satisfied by the string, the string has invalid sequences (such
28735bd8deadSopenharmony_ci    as ASCII base-85 violations, exhausting the coordinate data in the
28745bd8deadSopenharmony_ci    "data-array" production, or invalid opcodes encountered in the
28755bd8deadSopenharmony_ci    "operator-string" production), or the grammar is satisfied but
28765bd8deadSopenharmony_ci    there still remain a non-zero number of characters in the string.
28775bd8deadSopenharmony_ci    None of these failures to satisfy the grammar generates an error;
28785bd8deadSopenharmony_ci    instead the PATH_ERROR_POSITION_NV state is set to the character
28795bd8deadSopenharmony_ci    offset where the grammar was first not satisfied, violated
28805bd8deadSopenharmony_ci    semantically, or where the grammar was exhausted.  If the string
28815bd8deadSopenharmony_ci    was parsed successfully and the command did not generate an error,
28825bd8deadSopenharmony_ci    the PATH_ERROR_POSITION_NV state is set to negative one to indicate
28835bd8deadSopenharmony_ci    success.
28845bd8deadSopenharmony_ci
28855bd8deadSopenharmony_ci    If a parsing error occurs, the exact value assigned to the
28865bd8deadSopenharmony_ci    PATH_ERROR_POSITION_NV state variable is implementation-dependent
28875bd8deadSopenharmony_ci    (because the specifics of error position determination is difficult
28885bd8deadSopenharmony_ci    to specify) though the determined error location should be nearby
28895bd8deadSopenharmony_ci    the first error.
28905bd8deadSopenharmony_ci
28915bd8deadSopenharmony_ci    5.X.1.3 Font Glyph Path Specification
28925bd8deadSopenharmony_ci
28935bd8deadSopenharmony_ci    PATH GLYPHS FROM CHARACTER CODE SEQUENCE
28945bd8deadSopenharmony_ci
28955bd8deadSopenharmony_ci    The command
28965bd8deadSopenharmony_ci
28975bd8deadSopenharmony_ci        void PathGlyphsNV(uint firstPathName,
28985bd8deadSopenharmony_ci                          enum fontTarget,
28995bd8deadSopenharmony_ci                          const void *fontName,
29005bd8deadSopenharmony_ci                          bitfield fontStyle,
29015bd8deadSopenharmony_ci                          sizei numGlyphs, enum type,
29025bd8deadSopenharmony_ci                          const void *charcodes,
29035bd8deadSopenharmony_ci                          enum handleMissingGlyphs,
29045bd8deadSopenharmony_ci                          uint pathParameterTemplate,
29055bd8deadSopenharmony_ci                          float emScale);
29065bd8deadSopenharmony_ci
29075bd8deadSopenharmony_ci    creates, if no error occurs, a range of path objects named from
29085bd8deadSopenharmony_ci    /firstPathName/ to /firstPathName/+/numGlyphs/-1 based on the
29095bd8deadSopenharmony_ci    font face indicated by /fontTarget/, /fontName/, and /fontStyle/
29105bd8deadSopenharmony_ci    and the sequence of /numGlyphs/ character codes listed in the
29115bd8deadSopenharmony_ci    /charcodes/ array, as interpreted based by the /type/ parameter.
29125bd8deadSopenharmony_ci    However each particular name in the range /firstPathName/ to
29135bd8deadSopenharmony_ci    /firstPathName/+/numGlyphs/-1 is specified as a new path object only
29145bd8deadSopenharmony_ci    if that name is not already in use as a path object; if a name is
29155bd8deadSopenharmony_ci    already in use, that named path object is silently left undisturbed.
29165bd8deadSopenharmony_ci    A path object name is also left undisturbed if the
29175bd8deadSopenharmony_ci    /handleMissingGlyphs/ parameter is SKIP_MISSING_GLYPH_NV and the
29185bd8deadSopenharmony_ci    character code for a given glyph corresponds to the font's missing
29195bd8deadSopenharmony_ci    glyph or the character code is otherwise not available.
29205bd8deadSopenharmony_ci
29215bd8deadSopenharmony_ci    The error INVALID_VALUE is generated if /numGlyphs/ or /emScale/
29225bd8deadSopenharmony_ci    is negative.
29235bd8deadSopenharmony_ci
29245bd8deadSopenharmony_ci    The /fontTarget/ parameter must be one of STANDARD_FONT_NAME_NV,
29255bd8deadSopenharmony_ci    SYSTEM_FONT_NAME_NV, or FILE_NAME_NV; otherwise the INVALID_ENUM
29265bd8deadSopenharmony_ci    error is generated.
29275bd8deadSopenharmony_ci
29285bd8deadSopenharmony_ci    The /handleMissingGlyphs/ parameter must be one of
29295bd8deadSopenharmony_ci    SKIP_MISSING_GLYPH_NV or USE_MISSING_GLYPH_NV; otherwise the
29305bd8deadSopenharmony_ci    INVALID_ENUM error is generated.
29315bd8deadSopenharmony_ci
29325bd8deadSopenharmony_ci    If /fontTarget/ is STANDARD_FONT_NAME_NV, then /fontName/ is
29335bd8deadSopenharmony_ci    interpreted as a nul-terminated 8-bit ASCII character string that
29345bd8deadSopenharmony_ci    must be one of the following strings: "Serif", "Sans", "Mono",
29355bd8deadSopenharmony_ci    or "Missing"; otherwise the INVALID_VALUE error is generated.
29365bd8deadSopenharmony_ci    These "Serif", "Sans", and "Mono" names respectively correspond to
29375bd8deadSopenharmony_ci    serif, sans-serif, and sans monospaced font faces with the intent
29385bd8deadSopenharmony_ci    that the font face matches the appearance, metrics, and kerning
29395bd8deadSopenharmony_ci    of the DejaVu fonts of the same names.  All implementations /must/
29405bd8deadSopenharmony_ci    support these font names for the STANDARD_FONT_NAME_NV target.
29415bd8deadSopenharmony_ci
29425bd8deadSopenharmony_ci    For the STANDARD_FONT_NAME_NV targets with "Serif", "Sans", and
29435bd8deadSopenharmony_ci    "Mono", all implementations /must/ support the first 256 character
29445bd8deadSopenharmony_ci    codes defined by Unicode and the ISO/IEC 8859-1 (Latin-1 Western
29455bd8deadSopenharmony_ci    European) character encoding though implementations are strongly
29465bd8deadSopenharmony_ci    encouraged to support as much of the Unicode character codes as the
29475bd8deadSopenharmony_ci    system's underlying font and language support provides.
29485bd8deadSopenharmony_ci
29495bd8deadSopenharmony_ci    For the STANDARD_FONT_NAME_NV targets with "Missing", the entire
29505bd8deadSopenharmony_ci    sequence of path objects must be populated with an identical box
29515bd8deadSopenharmony_ci    outline with metrics matching this box.
29525bd8deadSopenharmony_ci
29535bd8deadSopenharmony_ci    If /fontTarget/ is SYSTEM_FONT_NAME_NV, then /fontName/ is interpreted
29545bd8deadSopenharmony_ci    as a nul-terminated 8-bit ASCII character string that corresponds to a
29555bd8deadSopenharmony_ci    system-specific font name.  These names are intended to correspond to
29565bd8deadSopenharmony_ci    the fonts names typically used in web content (e.g. Arial, Georgia,
29575bd8deadSopenharmony_ci    Times Roman, Helvetica).  The mapping of the system font character
29585bd8deadSopenharmony_ci    string to a system font is assumed to be performed by the GL server.
29595bd8deadSopenharmony_ci
29605bd8deadSopenharmony_ci    If /fontTarget/ is FILE_NAME_NV, then /fontName/ is interpreted as
29615bd8deadSopenharmony_ci    a nul-terminated 8-bit ASCII character string that corresponds to
29625bd8deadSopenharmony_ci    a system-specific file name in a standard outline font format.
29635bd8deadSopenharmony_ci    The specific interpretation of this name depends on the system
29645bd8deadSopenharmony_ci    conventions for identifying files by name.  This name can be an
29655bd8deadSopenharmony_ci    absolute or relative path.  The name is expected to include the
29665bd8deadSopenharmony_ci    font name's extension.  The mapping of the font file name to a
29675bd8deadSopenharmony_ci    font is assumed to be performed by the GL client.  What font file
29685bd8deadSopenharmony_ci    formats are supported is system dependent but implementations are
29695bd8deadSopenharmony_ci    encouraged to support outline font formats standard to the system
29705bd8deadSopenharmony_ci    (e.g. TrueType for Windows systems, etc.).
29715bd8deadSopenharmony_ci
29725bd8deadSopenharmony_ci    If the /fontTarget/ and /fontName/ combination can not be loaded for
29735bd8deadSopenharmony_ci    any reason (including the file name could not be opened, the font
29745bd8deadSopenharmony_ci    name is not available on the system, the font file format is not
29755bd8deadSopenharmony_ci    supported, the font file format is corrupted, etc.) and there is no
29765bd8deadSopenharmony_ci    other error generated, the command succeeds silently (so no error
29775bd8deadSopenharmony_ci    is generated) and the range of named path objects is not modified.
29785bd8deadSopenharmony_ci    If the named path objects did not exist previously, they continue
29795bd8deadSopenharmony_ci    to not exist.
29805bd8deadSopenharmony_ci
29815bd8deadSopenharmony_ci    The /fontStyle/ parameter is a bitfield allowed to have the
29825bd8deadSopenharmony_ci    bits BOLD_BIT_NV or ITALIC_BIT_NV set; if other bits are set, the
29835bd8deadSopenharmony_ci    INVALID_VALUE error is generated.  The font style is used as a hint to
29845bd8deadSopenharmony_ci    indicate the style of the font face.  Glyphs are generated with the
29855bd8deadSopenharmony_ci    font's bold or italic style respectively (or combination thereof)
29865bd8deadSopenharmony_ci    if the BOLD_BIT_NV or ITALIC_BIT_NV bits are set; otherwise, the
29875bd8deadSopenharmony_ci    value 0 or NONE indicates the default font face style should be used
29885bd8deadSopenharmony_ci    to generate the requested glyphs.  In situations where the bold or
29895bd8deadSopenharmony_ci    italic style of the font is encoded in the font name or file name,
29905bd8deadSopenharmony_ci    the /fontStyle/ parameter is ignored.
29915bd8deadSopenharmony_ci
29925bd8deadSopenharmony_ci    The generated glyphs for the path objects named /firstPathName/
29935bd8deadSopenharmony_ci    to /firstPathName/+/numGlyphs/-1 are specified by the /numGlyphs/
29945bd8deadSopenharmony_ci    character codes listed in the /charcodes/ array where each element of
29955bd8deadSopenharmony_ci    the array is determined by the /type/ parameter that must be one of
29965bd8deadSopenharmony_ci    UNSIGNED_BYTE, UNSIGNED_SHORT, UNSIGNED_INT, UTF8_NV, UTF16_NV,
29975bd8deadSopenharmony_ci    2_BYTES, 3_BYTES, and 4_BYTES with the array accessed in the same
29985bd8deadSopenharmony_ci    manner as the CallLists command's /type/ and /lists/ parameters
29995bd8deadSopenharmony_ci    (though not offset by the display list base), but indicating character
30005bd8deadSopenharmony_ci    codes instead of display list names.
30015bd8deadSopenharmony_ci
30025bd8deadSopenharmony_ci    The character codes from the /charcodes/ array are Unicode character
30035bd8deadSopenharmony_ci    codes if the font in question can map from the Unicode character
30045bd8deadSopenharmony_ci    set to the font's glyphs.  If the font has no meaningful mapping
30055bd8deadSopenharmony_ci    from Unicode, the font's standard character set is used instead
30065bd8deadSopenharmony_ci    of Unicode (e.g. a font filled with non-standard symbols).  For a
30075bd8deadSopenharmony_ci    font supporting a character set that can be mapped to the Unicode
30085bd8deadSopenharmony_ci    character set, a best effort should be made to map the specified
30095bd8deadSopenharmony_ci    character code from its Unicode character code interpretation to
30105bd8deadSopenharmony_ci    the closest appropriate glyph in the specified font.
30115bd8deadSopenharmony_ci
30125bd8deadSopenharmony_ci    Path objects created from glyphs by PathGlyphsNV have their path
30135bd8deadSopenharmony_ci    object metric state initialized from the metrics of the glyph from
30145bd8deadSopenharmony_ci    which they were specified.  Section 6.X.3. ("Path Object Glyph
30155bd8deadSopenharmony_ci    Typographic Queries") explains how these metrics are queried and
30165bd8deadSopenharmony_ci    what their values mean.  While the per-glyph metrics are expected to
30175bd8deadSopenharmony_ci    vary from glyph to glyph within a font face, the per-font metrics
30185bd8deadSopenharmony_ci    are expected to be identical for every path object created from a
30195bd8deadSopenharmony_ci    given font name and font style combination.
30205bd8deadSopenharmony_ci
30215bd8deadSopenharmony_ci    Metrics in font space of glyphs are scaled by a value /s/ that is the
30225bd8deadSopenharmony_ci    ratio of the /emScale/ parameter divided by the font's units per Em;
30235bd8deadSopenharmony_ci    if the /emScale/ parameter equals zero, treat /emScale/ as if it was
30245bd8deadSopenharmony_ci    identical to the font's units per Em such that /s/ is exactly 1.0.
30255bd8deadSopenharmony_ci    Each glyph's outline are also scaled by /s/.  The metric values /not/
30265bd8deadSopenharmony_ci    scaled by /s/ are GLYPH_HAS_KERNING_BIT_NV, FONT_UNITS_PER_EM_BIT_NV,
30275bd8deadSopenharmony_ci    FONT_HAS_KERNING_BIT_NV, and FONT_NUM_GLYPH_INDICES_BIT_NV (since
30285bd8deadSopenharmony_ci    these metric values are not specified in font units).
30295bd8deadSopenharmony_ci
30305bd8deadSopenharmony_ci    The FONT_NUM_GLYPH_INDICES_BIT_NV metric value returns -1 for path
30315bd8deadSopenharmony_ci    objects created with the STANDARD_FONT_NAME_NV (as such fonts are
30325bd8deadSopenharmony_ci    not accessed by glyph index, only character point); otherwise, the
30335bd8deadSopenharmony_ci    value is number of glyphs indices for the font, whether or not the
30345bd8deadSopenharmony_ci    path object is created from a character point or glyph index.
30355bd8deadSopenharmony_ci
30365bd8deadSopenharmony_ci    When unknown or missing character codes in a font face are specified
30375bd8deadSopenharmony_ci    and the /handleMissingGlyph/ parameter is USE_MISSING_GLYPHS_NV,
30385bd8deadSopenharmony_ci    this situation should be handled in a manner appropriate to the
30395bd8deadSopenharmony_ci    character code, font face, and implementation.  Typically this
30405bd8deadSopenharmony_ci    involves using the font's missing glyph for the unknown or missing
30415bd8deadSopenharmony_ci    character code.
30425bd8deadSopenharmony_ci
30435bd8deadSopenharmony_ci    If the /pathParameterTemplate/ parameter names an existing path
30445bd8deadSopenharmony_ci    object, that path object's current parameters listed in Table
30455bd8deadSopenharmony_ci    5.pathParameters (excepting PATH_FILL_MODE_NV as explained in
30465bd8deadSopenharmony_ci    the following paragraph) are used to initialize the respective
30475bd8deadSopenharmony_ci    parameters of path objects specified by this command; otherwise
30485bd8deadSopenharmony_ci    if the /pathParameterTemplate/ path object name does not exist,
30495bd8deadSopenharmony_ci    the initial path parameters are used as specified by table 6.Y
30505bd8deadSopenharmony_ci    (without generating an error).
30515bd8deadSopenharmony_ci
30525bd8deadSopenharmony_ci    Path objects created from glyphs by PathGlyphsNV have their
30535bd8deadSopenharmony_ci    PATH_FILL_MODE_NV parameter, as explained in Section 5.X.1.5 ("Path
30545bd8deadSopenharmony_ci    Parameter Specification"), initialized according to the fill
30555bd8deadSopenharmony_ci    conventions of the font outlines within the font (instead of the
30565bd8deadSopenharmony_ci    COUNT_UP_NV default for paths specified by means other than glyphs).
30575bd8deadSopenharmony_ci    This may be one of:  COUNT_UP_NV if the font's outline winding
30585bd8deadSopenharmony_ci    convention is counterclockwise and its outline filling assumes the
30595bd8deadSopenharmony_ci    non-zero winding rule; COUNT_DOWN_NV if the font's outline winding
30605bd8deadSopenharmony_ci    convention is clockwise and its outline filling assumes the non-zero
30615bd8deadSopenharmony_ci    winding rule; or INVERT if the font's outline filling assumes the
30625bd8deadSopenharmony_ci    even-odd winding rule.
30635bd8deadSopenharmony_ci
30645bd8deadSopenharmony_ci    PATH GLYPHS FROM CHARACTER CODE RANGE
30655bd8deadSopenharmony_ci
30665bd8deadSopenharmony_ci    The command
30675bd8deadSopenharmony_ci
30685bd8deadSopenharmony_ci        void PathGlyphRangeNV(uint firstPathName,
30695bd8deadSopenharmony_ci                              enum fontTarget,
30705bd8deadSopenharmony_ci                              const void *fontName,
30715bd8deadSopenharmony_ci                              bitfield fontStyle,
30725bd8deadSopenharmony_ci                              uint firstGlyph,
30735bd8deadSopenharmony_ci                              sizei numGlyphs,
30745bd8deadSopenharmony_ci                              enum handleMissingGlyphs,
30755bd8deadSopenharmony_ci                              uint pathParameterTemplate,
30765bd8deadSopenharmony_ci                              float emScale);
30775bd8deadSopenharmony_ci
30785bd8deadSopenharmony_ci    allows a sequence of character codes in a font face to specify a
30795bd8deadSopenharmony_ci    sequence of path objects and is equivalent to
30805bd8deadSopenharmony_ci
30815bd8deadSopenharmony_ci        int *array = malloc(sizeof(int)*numGlyphs);
30825bd8deadSopenharmony_ci        if (array) {
30835bd8deadSopenharmony_ci          for (int i=0; i<numGlyphs; i++) {
30845bd8deadSopenharmony_ci            array[i] = i + firstGlyph;
30855bd8deadSopenharmony_ci          }
30865bd8deadSopenharmony_ci          PathGlyphsNV(firstPathName, fontTarget, fontName, fontStyle,
30875bd8deadSopenharmony_ci                       numGlyphs, INT, array,
30885bd8deadSopenharmony_ci                       handleMissingGlyphs, pathParameterTemplate, emScale);
30895bd8deadSopenharmony_ci          free(array);
30905bd8deadSopenharmony_ci        } else {
30915bd8deadSopenharmony_ci          // generate OUT_OF_MEMORY error
30925bd8deadSopenharmony_ci        }
30935bd8deadSopenharmony_ci
30945bd8deadSopenharmony_ci    PATH GLYPHS FROM GLYPH INDEX RANGE
30955bd8deadSopenharmony_ci
30965bd8deadSopenharmony_ci    Advanced shaping of text renders glyphs by per-font glyph indices
30975bd8deadSopenharmony_ci    (rather than Unicode code point).  The commands
30985bd8deadSopenharmony_ci
30995bd8deadSopenharmony_ci        enum PathGlyphIndexArrayNV(uint firstPathName,
31005bd8deadSopenharmony_ci                                   enum fontTarget,
31015bd8deadSopenharmony_ci                                   const void *fontName,
31025bd8deadSopenharmony_ci                                   bitfield fontStyle,
31035bd8deadSopenharmony_ci                                   uint firstGlyphIndex,
31045bd8deadSopenharmony_ci                                   sizei numGlyphs,
31055bd8deadSopenharmony_ci                                   uint pathParameterTemplate,
31065bd8deadSopenharmony_ci                                   float emScale);
31075bd8deadSopenharmony_ci
31085bd8deadSopenharmony_ci        enum PathMemoryGlyphIndexArrayNV(uint firstPathName,
31095bd8deadSopenharmony_ci                                         enum fontTarget,
31105bd8deadSopenharmony_ci                                         sizeiptr fontSize,
31115bd8deadSopenharmony_ci                                         const void *fontData,
31125bd8deadSopenharmony_ci                                         sizei faceIndex,
31135bd8deadSopenharmony_ci                                         uint firstGlyphIndex,
31145bd8deadSopenharmony_ci                                         sizei numGlyphs,
31155bd8deadSopenharmony_ci                                         uint pathParameterTemplate,
31165bd8deadSopenharmony_ci                                         float emScale);
31175bd8deadSopenharmony_ci
31185bd8deadSopenharmony_ci    create, if successful and no error occurs, a range of path objects
31195bd8deadSopenharmony_ci    that correspond to an array of glyphs as ordered by glyph index in
31205bd8deadSopenharmony_ci    a font face.  PathGlyphIndexArrayNV loads the font data from a file
31215bd8deadSopenharmony_ci    name or system font name while PathMemoryGlyphIndexArrayNV loads
31225bd8deadSopenharmony_ci    the font data from a standard font format in system memory.
31235bd8deadSopenharmony_ci
31245bd8deadSopenharmony_ci    The commands return the value FONT_GLYPHS_AVAILABLE_NV when
31255bd8deadSopenharmony_ci    successful; otherwise one of the following values is returned
31265bd8deadSopenharmony_ci    depending on the nature of the failure.  The unsuccessful command
31275bd8deadSopenharmony_ci    returns the value FONT_TARGET_UNAVAILABLE_NV if the implementation
31285bd8deadSopenharmony_ci    does not support a valid /fontTarget/, FONT_UNAVAILABLE_NV if
31295bd8deadSopenharmony_ci    the font is not available (e.g. does not exist on the system), or
31305bd8deadSopenharmony_ci    FONT_UNINTELLIGIBLE_NV if the font is available but cannot be loaded
31315bd8deadSopenharmony_ci    for some implementation-dependent reason.  FONT_UNAVAILABLE_NV will
31325bd8deadSopenharmony_ci    not be returned by PathMemoryGlyphIndexArrayNV because the font
31335bd8deadSopenharmony_ci    data is read from system memory.  If the command generates an error,
31345bd8deadSopenharmony_ci    that error's enum value will be returned.  For example, an invalid
31355bd8deadSopenharmony_ci    value for /fontTarget/ will return INVALID_ENUM.  While the return
31365bd8deadSopenharmony_ci    value indicates the error, the error will /also/ be generated in the
31375bd8deadSopenharmony_ci    conventional way so GetError will return it and error callbacks are
31385bd8deadSopenharmony_ci    generated normally.
31395bd8deadSopenharmony_ci
31405bd8deadSopenharmony_ci    When successful, path names /firstPathName/ through
31415bd8deadSopenharmony_ci    /firstPathName+numGlyphs-1/ now are specified as path objects
31425bd8deadSopenharmony_ci    corresponding to the sequence of glyphs in the font indicated
31435bd8deadSopenharmony_ci    by /fontTarget/, /fontSize/, and /fontData/ for glyph indices
31445bd8deadSopenharmony_ci    from /firstGlyphIndex/ to /firstGlyphIndex+numGlyphs-1/ where
31455bd8deadSopenharmony_ci    /firstPathName/ corresponds to the glyph index /firstGlyphIndex/
31465bd8deadSopenharmony_ci    and onward sequentially.  If a glyph index does not correspond to an
31475bd8deadSopenharmony_ci    actual glyph index in the font format, the respective path object is
31485bd8deadSopenharmony_ci    left undisturbed.  (It is the application's responsibility to know
31495bd8deadSopenharmony_ci    the valid range of glyph indices for the font.)  When unsuccessful
31505bd8deadSopenharmony_ci    other than due to an OUT_OF_MEMORY error, no path objects are
31515bd8deadSopenharmony_ci    specified or otherwise modified.
31525bd8deadSopenharmony_ci
31535bd8deadSopenharmony_ci    The path objects are created in the same manner described for
31545bd8deadSopenharmony_ci    PathGlyphsNV in section 5.X.1.3 (Font Glyph Path Specification)
31555bd8deadSopenharmony_ci    except the GLYPH_HAS_KERNING_BIT_NV and FONT_HAS_KERNING_BIT_NV
31565bd8deadSopenharmony_ci    metrics are always false (because GetPathSpacingNV applies to
31575bd8deadSopenharmony_ci    glyphs specified from Unicode code points).  In particular, the
31585bd8deadSopenharmony_ci    /pathParameterTemplate/ and /emScale/ parameters have the same
31595bd8deadSopenharmony_ci    interpretation as the PathGlyphsNV command.
31605bd8deadSopenharmony_ci
31615bd8deadSopenharmony_ci    For the PathGlyphIndexArrayNV command, the /fontTarget/ parameter
31625bd8deadSopenharmony_ci    must be either SYSTEM_FONT_NAME_NV or FILE_NAME_NV; otherwise the
31635bd8deadSopenharmony_ci    INVALID_ENUM error is generated.  The /fontStyle/ parameter is
31645bd8deadSopenharmony_ci    a bitfield allowed to have the bits BOLD_BIT_NV or ITALIC_BIT_NV
31655bd8deadSopenharmony_ci    set; if other bits are set, the INVALID_VALUE error is generated.
31665bd8deadSopenharmony_ci    The interpretation of the /fontTarget/, /fontName/, and /fontStyle/
31675bd8deadSopenharmony_ci    parameters is identical to the interpretation described in section
31685bd8deadSopenharmony_ci    5.X.1.3 (Font Glyph Path Specification).
31695bd8deadSopenharmony_ci
31705bd8deadSopenharmony_ci    For the PathMemoryGlyphIndexArrayNV command, /fontTarget/ must
31715bd8deadSopenharmony_ci    be STANDARD_FONT_FORMAT_NV; otherwise INVALID_ENUM is generated
31725bd8deadSopenharmony_ci    (and returned).  STANDARD_FONT_FORMAT_NV implies: /fontSize/ is
31735bd8deadSopenharmony_ci    the size of the memory storing the font data in memory; /fontData/
31745bd8deadSopenharmony_ci    is a pointer to the beginning of the font data; and /faceIndex/ is
31755bd8deadSopenharmony_ci    the index of the face within the font, typically specified as zero.
31765bd8deadSopenharmony_ci
31775bd8deadSopenharmony_ci    The specific standard font formats supported by
31785bd8deadSopenharmony_ci    STANDARD_FONT_FORMAT_NV are implementation-dependent, but the TrueType
31795bd8deadSopenharmony_ci    format should be supported.  Magic numbers if the font memory data
31805bd8deadSopenharmony_ci    are expected to be used to identify the specific font format.
31815bd8deadSopenharmony_ci
31825bd8deadSopenharmony_ci    The INVALID_VALUE error is generated if any of /fontSize/ or
31835bd8deadSopenharmony_ci    /faceIndex/ or /emScale/ are negative.
31845bd8deadSopenharmony_ci
31855bd8deadSopenharmony_ci    [NOTE: PathGlyphIndexRangeNV is deprecated in favor of
31865bd8deadSopenharmony_ci    PathGlyphIndexArrayNV and PathMemoryGlyphIndexArrayNV.]
31875bd8deadSopenharmony_ci
31885bd8deadSopenharmony_ci    The command
31895bd8deadSopenharmony_ci
31905bd8deadSopenharmony_ci        enum PathGlyphIndexRangeNV(enum fontTarget,
31915bd8deadSopenharmony_ci                                   const void *fontName,
31925bd8deadSopenharmony_ci                                   bitfield fontStyle,
31935bd8deadSopenharmony_ci                                   uint pathParameterTemplate,
31945bd8deadSopenharmony_ci                                   float emScale,
31955bd8deadSopenharmony_ci                                   uint baseAndCount[2]);
31965bd8deadSopenharmony_ci
31975bd8deadSopenharmony_ci    creates, if successful and no error occurs, a range of path objects
31985bd8deadSopenharmony_ci    that correspond to the complete range of glyphs as ordered by glyph
31995bd8deadSopenharmony_ci    index in a font face.
32005bd8deadSopenharmony_ci
32015bd8deadSopenharmony_ci    The command returns the value FONT_GLYPHS_AVAILABLE_NV when
32025bd8deadSopenharmony_ci    successful; otherwise one of the following values is returned
32035bd8deadSopenharmony_ci    depending on the nature of the failure.  The unsuccessful command
32045bd8deadSopenharmony_ci    returns the value FONT_TARGET_UNAVAILABLE_NV if the implementation
32055bd8deadSopenharmony_ci    does not support a valid /fontTarget/, FONT_UNAVAILABLE_NV if
32065bd8deadSopenharmony_ci    the font is not available (e.g. does not exist on the system), or
32075bd8deadSopenharmony_ci    FONT_UNINTELLIGIBLE_NV if the font is available but cannot be loaded
32085bd8deadSopenharmony_ci    for some implementation-dependent reason.  If the command generates
32095bd8deadSopenharmony_ci    an error, that error's enum value will be returned.  For example, an
32105bd8deadSopenharmony_ci    invalid value for /fontTarget/ will return INVALID_ENUM.  While the
32115bd8deadSopenharmony_ci    return value indicates the error, the error will /also/ be generated
32125bd8deadSopenharmony_ci    in the conventional way so GetError will return it and error callbacks
32135bd8deadSopenharmony_ci    are generated normally.
32145bd8deadSopenharmony_ci
32155bd8deadSopenharmony_ci    The /fontTarget/ parameter must be either SYSTEM_FONT_NAME_NV
32165bd8deadSopenharmony_ci    or FILE_NAME_NV; otherwise the INVALID_ENUM error is generated.
32175bd8deadSopenharmony_ci    The interpretation of the /fontTarget/ and /fontName/ parameters
32185bd8deadSopenharmony_ci    is identical to the interpretation described in section 5.X.1.3
32195bd8deadSopenharmony_ci    (Font Glyph Path Specification).
32205bd8deadSopenharmony_ci
32215bd8deadSopenharmony_ci    The error INVALID_VALUE is generated if /emScale/ is negative.
32225bd8deadSopenharmony_ci
32235bd8deadSopenharmony_ci    The /fontStyle/ parameter is a bitfield allowed to have the
32245bd8deadSopenharmony_ci    bits BOLD_BIT_NV or ITALIC_BIT_NV set; if other bits are set, the
32255bd8deadSopenharmony_ci    INVALID_VALUE error is generated.
32265bd8deadSopenharmony_ci
32275bd8deadSopenharmony_ci    When successful, elements 0 and 1 of the /baseAndCount/ array
32285bd8deadSopenharmony_ci    parameter are written values /B/ and /N/ respectively where the
32295bd8deadSopenharmony_ci    path names /B/ through /B+N-1/ are previously unused (i.e. there
32305bd8deadSopenharmony_ci    are /N/ previously unused path object names starting at /B/) but
32315bd8deadSopenharmony_ci    now are specified as path objects corresponding to the complete set
32325bd8deadSopenharmony_ci    of glyphs in the font indicated by /fontTarget/ and /fontName/.
32335bd8deadSopenharmony_ci    When unsuccessful (including when any error, even OUT_OF_MEMORY,
32345bd8deadSopenharmony_ci    is generated by the command), elements 0 and 1 of the /baseAndCount/
32355bd8deadSopenharmony_ci    array parameter are both written to zero.
32365bd8deadSopenharmony_ci
32375bd8deadSopenharmony_ci    The path objects are created in the same manner described for
32385bd8deadSopenharmony_ci    PathGlyphsNV in section 5.X.1.3 (Font Glyph Path Specification)
32395bd8deadSopenharmony_ci    except the GLYPH_HAS_KERNING_BIT_NV and FONT_HAS_KERNING_BIT_NV
32405bd8deadSopenharmony_ci    metrics are always false (because GetPathSpacingNV applies to
32415bd8deadSopenharmony_ci    glyphs specified from Unicode code points).  In particular, the
32425bd8deadSopenharmony_ci    /pathParameterTemplate/ and /emScale/ parameters have the same
32435bd8deadSopenharmony_ci    interpretation as the PathGlyphsNV command.
32445bd8deadSopenharmony_ci
32455bd8deadSopenharmony_ci    5.X.1.4 Path Modification
32465bd8deadSopenharmony_ci
32475bd8deadSopenharmony_ci    Several commands allow the commands and/or coordinates of an existing
32485bd8deadSopenharmony_ci    path object to be modified.
32495bd8deadSopenharmony_ci
32505bd8deadSopenharmony_ci    The command
32515bd8deadSopenharmony_ci
32525bd8deadSopenharmony_ci        void PathCoordsNV(uint path,
32535bd8deadSopenharmony_ci                          sizei numCoords, enum coordType,
32545bd8deadSopenharmony_ci                          const void *coords);
32555bd8deadSopenharmony_ci
32565bd8deadSopenharmony_ci    replaces all the coordinates of an existing path object with a new
32575bd8deadSopenharmony_ci    set of coordinates.  /path/ names the path object to modify; the
32585bd8deadSopenharmony_ci    error INVALID_OPERATION is generated if /path/ is not an existing
32595bd8deadSopenharmony_ci    path object.
32605bd8deadSopenharmony_ci
32615bd8deadSopenharmony_ci    The new path coordinates are read sequentially from the
32625bd8deadSopenharmony_ci    /coords/ array.  The type of the coordinates read from the /coords/
32635bd8deadSopenharmony_ci    array is determined by the /coordType/ parameter which must be
32645bd8deadSopenharmony_ci    one of BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT, or FLOAT,
32655bd8deadSopenharmony_ci    otherwise the INVALID_ENUM error is generated.
32665bd8deadSopenharmony_ci
32675bd8deadSopenharmony_ci    The INVALID_OPERATION error is generated if /numCoords/ does not
32685bd8deadSopenharmony_ci    equal the number of coordinates referenced by the path object's
32695bd8deadSopenharmony_ci    existing command sequence (so /numCoords/ provides a sanity check
32705bd8deadSopenharmony_ci    that the /coords/ array is being interpreted properly).  The error
32715bd8deadSopenharmony_ci    INVALID_VALUE is generated if /numCoords/ is negative.
32725bd8deadSopenharmony_ci
32735bd8deadSopenharmony_ci    If the PathCoordsNV command results in an error, the path object named
32745bd8deadSopenharmony_ci    /path/ is not changed; if there is no error, the prior coordinates of
32755bd8deadSopenharmony_ci    /path/ are lost.  If there is no error, the commands and parameters
32765bd8deadSopenharmony_ci    of the path object are not changed.
32775bd8deadSopenharmony_ci
32785bd8deadSopenharmony_ci    The command
32795bd8deadSopenharmony_ci
32805bd8deadSopenharmony_ci        void PathSubCoordsNV(uint path,
32815bd8deadSopenharmony_ci                             sizei coordStart,
32825bd8deadSopenharmony_ci                             sizei numCoords, enum coordType,
32835bd8deadSopenharmony_ci                             const void *coords);
32845bd8deadSopenharmony_ci
32855bd8deadSopenharmony_ci    replaces a range of the coordinates of an existing path object with
32865bd8deadSopenharmony_ci    a new set of coordinates.  /path/ names the path object to modify;
32875bd8deadSopenharmony_ci    the error INVALID_OPERATION is generated if /path/ is not an existing
32885bd8deadSopenharmony_ci    path object.
32895bd8deadSopenharmony_ci
32905bd8deadSopenharmony_ci    The new path coordinates are read sequentially from the
32915bd8deadSopenharmony_ci    /coords/ array.  The type of the coordinates read from the /coords/
32925bd8deadSopenharmony_ci    array is determined by the /coordType/ parameter which must be
32935bd8deadSopenharmony_ci    one of BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT, or FLOAT,
32945bd8deadSopenharmony_ci    otherwise the INVALID_ENUM error is generated.
32955bd8deadSopenharmony_ci
32965bd8deadSopenharmony_ci    The coordinates from the /coords/ array replace the coordinates
32975bd8deadSopenharmony_ci    starting at coordinate index (zero-based) /coordStart/ through
32985bd8deadSopenharmony_ci    /coordStart/+/numCoords/-1 inclusive in the existing path object's
32995bd8deadSopenharmony_ci    coordinate array.  If /numCoords/ is zero, no coordinates are changed.
33005bd8deadSopenharmony_ci    If /coordStart/+/numCoords/ is greater than the number of coordinates
33015bd8deadSopenharmony_ci    in the existing path object, the INVALID_OPERATION error is generated.
33025bd8deadSopenharmony_ci    If either /coordStart/ or /numCoords/ is negative, the INVALID_VALUE
33035bd8deadSopenharmony_ci    error is generated.
33045bd8deadSopenharmony_ci
33055bd8deadSopenharmony_ci    If the PathCoordsNV command results in an error, the path object named
33065bd8deadSopenharmony_ci    /path/ is not changed; if there is no error, the prior coordinates
33075bd8deadSopenharmony_ci    within the updated range of /path/ are lost.  If there is no error,
33085bd8deadSopenharmony_ci    the commands, coordinates outside the updated range, and parameters
33095bd8deadSopenharmony_ci    of the path object are not changed.
33105bd8deadSopenharmony_ci
33115bd8deadSopenharmony_ci    The command
33125bd8deadSopenharmony_ci
33135bd8deadSopenharmony_ci        void PathSubCommandsNV(uint path,
33145bd8deadSopenharmony_ci                               sizei commandStart, sizei commandsToDelete,
33155bd8deadSopenharmony_ci                               sizei numCommands, const ubyte *commands,
33165bd8deadSopenharmony_ci                               sizei numCoords, enum coordType,
33175bd8deadSopenharmony_ci                               const void *coords);
33185bd8deadSopenharmony_ci
33195bd8deadSopenharmony_ci    replaces a range of existing commands and their associated coordinates
33205bd8deadSopenharmony_ci    with a new sequence of commands and associated coordinates.  /path/
33215bd8deadSopenharmony_ci    names the path object to modify; the error INVALID_OPERATION is
33225bd8deadSopenharmony_ci    generated if /path/ is not an existing path object.
33235bd8deadSopenharmony_ci
33245bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated if any of /commandStart/,
33255bd8deadSopenharmony_ci    /commandsToDelete/, /numCommands/, or /numCoords/ is negative.
33265bd8deadSopenharmony_ci
33275bd8deadSopenharmony_ci    The PathSubCommandsNV command works in two steps.
33285bd8deadSopenharmony_ci    First, deleting commands in the range /commandStart/ to
33295bd8deadSopenharmony_ci    /commandStart/+/commandsToDelete/-1 inclusive from the existing
33305bd8deadSopenharmony_ci    path object.  If /commandsToDelete/ exceeds the number of commands
33315bd8deadSopenharmony_ci    from /commandStart/ to the end of the path command sequence,
33325bd8deadSopenharmony_ci    all the commands from /commandsToDelete/ on are deleted.  This
33335bd8deadSopenharmony_ci    includes deleting the coordinates associated with these commands.
33345bd8deadSopenharmony_ci    If /commandsToDelete/ is zero, zero commands and zero coordinates are
33355bd8deadSopenharmony_ci    deleted.  Second, /numCommands/ read sequentially from the /commands/
33365bd8deadSopenharmony_ci    array are inserted into the existing path object immediately before
33375bd8deadSopenharmony_ci    index /commandStart/.  This includes inserting a corresponding number
33385bd8deadSopenharmony_ci    of coordinates from the /coords/ array.  If the index /commandStart/
33395bd8deadSopenharmony_ci    is greater than the largest valid command index of the path object,
33405bd8deadSopenharmony_ci    the commands are simply appended to the end of the path objects
33415bd8deadSopenharmony_ci    command and coordinate sequences.
33425bd8deadSopenharmony_ci
33435bd8deadSopenharmony_ci    Each of the /numCommands/ commands in the /command/ array references
33445bd8deadSopenharmony_ci    a number of coordinates specified by "Coordinate count" column of
33455bd8deadSopenharmony_ci    Table 5.pathCommands, starting with the first (zero) element of
33465bd8deadSopenharmony_ci    the /coords/ array and advancing by the coordinate count for each
33475bd8deadSopenharmony_ci    command.  If any of these /numCommands/ commands are not listed
33485bd8deadSopenharmony_ci    in the "Token" or "Character aliases" columns of Table 5.pathCommands,
33495bd8deadSopenharmony_ci    the INVALID_ENUM error is generated.
33505bd8deadSopenharmony_ci
33515bd8deadSopenharmony_ci    The INVALID_OPERATION error is generated if /numCoords/ does not equal
33525bd8deadSopenharmony_ci    the number of coordinates referenced by the command sequence to insert
33535bd8deadSopenharmony_ci    as specified by /numCommands/ and /commands/ (so /numCoords/ provides
33545bd8deadSopenharmony_ci    a sanity check that the /coords/ array is being interpreted properly).
33555bd8deadSopenharmony_ci    The error INVALID_VALUE is generated if any of /commandStart/,
33565bd8deadSopenharmony_ci    /commandsToDelete/, /numCommands/ or /numCoords/ are negative.
33575bd8deadSopenharmony_ci
33585bd8deadSopenharmony_ci    The type of the coordinates in the /coords/ array is specified
33595bd8deadSopenharmony_ci    by /coordType/ and must be one of BYTE, UNSIGNED_BYTE, SHORT,
33605bd8deadSopenharmony_ci    UNSIGNED_SHORT, or FLOAT; otherwise the INVALID_ENUM error is
33615bd8deadSopenharmony_ci    generated.
33625bd8deadSopenharmony_ci
33635bd8deadSopenharmony_ci    If the PathSubCommandsNV command results in an error, the path
33645bd8deadSopenharmony_ci    object named /path/ is not changed; if there is no error, the prior
33655bd8deadSopenharmony_ci    (now deleted) commands and coordinates within the updated range of
33665bd8deadSopenharmony_ci    /path/ are lost.  If there is no error, the commands, coordinates
33675bd8deadSopenharmony_ci    outside the deleted range, and parameters of the path object are not
33685bd8deadSopenharmony_ci    changed though commands and coordinates indexed beyond /commandStart/
33695bd8deadSopenharmony_ci    are shifted in their sequence within the path object to make room
33705bd8deadSopenharmony_ci    in the command and coordinate arrays for the newly inserted commands
33715bd8deadSopenharmony_ci    and coordinates.
33725bd8deadSopenharmony_ci
33735bd8deadSopenharmony_ci    5.X.1.5 Path Parameter Specification
33745bd8deadSopenharmony_ci
33755bd8deadSopenharmony_ci    Each path object has its own set of path parameters that control
33765bd8deadSopenharmony_ci    how the path object is filled and stroked when stenciled and covered.
33775bd8deadSopenharmony_ci
33785bd8deadSopenharmony_ci    Table 5.pathParameters
33795bd8deadSopenharmony_ci
33805bd8deadSopenharmony_ci        Name                             Type     Required Values or Range
33815bd8deadSopenharmony_ci        -------------------------------  -------  -----------------------------------------------
33825bd8deadSopenharmony_ci        PATH_STROKE_WIDTH_NV             float    non-negative
33835bd8deadSopenharmony_ci        PATH_INITIAL_END_CAP_NV          enum     FLAT, SQUARE_NV, ROUND_NV, TRIANGULAR_NV
33845bd8deadSopenharmony_ci        PATH_TERMINAL_END_CAP_NV         enum     FLAT, SQUARE_NV, ROUND_NV, TRIANGULAR_NV
33855bd8deadSopenharmony_ci        PATH_INITIAL_DASH_CAP_NV         enum     FLAT, SQUARE_NV, ROUND_NV, TRIANGULAR_NV
33865bd8deadSopenharmony_ci        PATH_TERMINAL_DASH_CAP_NV        enum     FLAT, SQUARE_NV, ROUND_NV, TRIANGULAR_NV
33875bd8deadSopenharmony_ci        PATH_JOIN_STYLE_NV               enum     MITER_REVERT_NV, MITER_TRUNCATE_NV, BEVEL_NV, ROUND_NV, NONE
33885bd8deadSopenharmony_ci        PATH_MITER_LIMIT_NV              float    non-negative
33895bd8deadSopenharmony_ci        PATH_DASH_OFFSET_NV              float    any value
33905bd8deadSopenharmony_ci        PATH_DASH_OFFSET_RESET_NV        enum     MOVE_TO_RESET_NV, MOVE_TO_CONTINUES_NV
33915bd8deadSopenharmony_ci        PATH_CLIENT_LENGTH_NV            float    non-negative
33925bd8deadSopenharmony_ci        PATH_FILL_MODE_NV                enum     COUNT_UP_NV, COUNT_DOWN_NV, INVERT
33935bd8deadSopenharmony_ci        PATH_FILL_MASK_NV                integer  any value
33945bd8deadSopenharmony_ci        PATH_FILL_COVER_MODE_NV          enum     CONVEX_HULL_NV, BOUNDING_BOX_NV
33955bd8deadSopenharmony_ci        PATH_STROKE_COVER_MODE_NV        enum     CONVEX_HULL_NV, BOUNDING_BOX_NV
33965bd8deadSopenharmony_ci        PATH_STROKE_MASK_NV              integer  any value
33975bd8deadSopenharmony_ci        PATH_STROKE_BOUND_NV             float    any value in [0.0,1.0]
33985bd8deadSopenharmony_ci
33995bd8deadSopenharmony_ci    The commands
34005bd8deadSopenharmony_ci
34015bd8deadSopenharmony_ci        void PathParameterivNV(uint path, enum pname, const int *value);
34025bd8deadSopenharmony_ci        void PathParameteriNV(uint path, enum pname, int value);
34035bd8deadSopenharmony_ci        void PathParameterfvNV(uint path, enum pname, const float *value);
34045bd8deadSopenharmony_ci        void PathParameterfNV(uint path, enum pname, float value);
34055bd8deadSopenharmony_ci
34065bd8deadSopenharmony_ci    specify the value of path parameters for the specified path object
34075bd8deadSopenharmony_ci    named /path/.  The error INVALID_OPERATION is generated if /path/
34085bd8deadSopenharmony_ci    is not an existing path object.
34095bd8deadSopenharmony_ci
34105bd8deadSopenharmony_ci    Each parameter has a single (scalar) value.
34115bd8deadSopenharmony_ci
34125bd8deadSopenharmony_ci    /pname/ must be one of the tokens in the "Name" column of
34135bd8deadSopenharmony_ci    Table 5.pathParameters, PATH_END_CAPS_NV, or PATH_DASH_CAPS_NV.
34145bd8deadSopenharmony_ci    The required values or range of each allowed parameter name token
34155bd8deadSopenharmony_ci    is listed in Table 5.pathParameter's "Required Values/Range" column.
34165bd8deadSopenharmony_ci
34175bd8deadSopenharmony_ci    For values of /pname/ listed in Table 5.pathsParameters, the specified
34185bd8deadSopenharmony_ci    parameter is specified by /value/ when /value/ is a float or int,
34195bd8deadSopenharmony_ci    or if /value/ is a pointer to a float or int, accessed through that
34205bd8deadSopenharmony_ci    pointer.  The error INVALID_VALUE is generated if the specified
34215bd8deadSopenharmony_ci    value is negative for parameters required to be non-negative in
34225bd8deadSopenharmony_ci    Table 5.pathParameters.  Values specified to be clamped to the [0,1] range
34235bd8deadSopenharmony_ci    in Table 5.pathParameters are so clamped prior to setting the
34245bd8deadSopenharmony_ci    specified path parameter to that clamped value.
34255bd8deadSopenharmony_ci
34265bd8deadSopenharmony_ci    The /pname/ of PATH_END_CAPS_NV is handled specially and updates
34275bd8deadSopenharmony_ci    /both/ the PATH_INITIAL_END_CAP_NV and PATH_TERMINAL_END_CAP_NV
34285bd8deadSopenharmony_ci    parameters of the path with the specified value.  The /pname/
34295bd8deadSopenharmony_ci    of PATH_DASH_CAPS_NV is handled specially and updates /both/ the
34305bd8deadSopenharmony_ci    PATH_INITIAL_DASH_CAP_NV and PATH_TERMINAL_DASH_CAP_NV parameters
34315bd8deadSopenharmony_ci    of the path with the specified value.
34325bd8deadSopenharmony_ci
34335bd8deadSopenharmony_ci    The error INVALID_VALUE is generated if the specified parameter value
34345bd8deadSopenharmony_ci    is not within the require range for parameters typed float or integer.
34355bd8deadSopenharmony_ci    The error INVALID_ENUM is generated if the specified parameter value
34365bd8deadSopenharmony_ci    is not one of the listed tokens for parameters typed enum.
34375bd8deadSopenharmony_ci
34385bd8deadSopenharmony_ci    The dash pattern of a path object consists of a sequence of path-space
34395bd8deadSopenharmony_ci    lengths of alternating "on" and "off" dash segments.  The first
34405bd8deadSopenharmony_ci    value of the dash array defines the length, in path space, of the
34415bd8deadSopenharmony_ci    first "on" dash segment.  The second value defines the length of the
34425bd8deadSopenharmony_ci    following "off" segment.  Each subsequent pair of values defines one
34435bd8deadSopenharmony_ci    "on" and one "off" segment.
34445bd8deadSopenharmony_ci
34455bd8deadSopenharmony_ci    Parameters to control the dash pattern of a stroked path are specified
34465bd8deadSopenharmony_ci    by the command
34475bd8deadSopenharmony_ci
34485bd8deadSopenharmony_ci        void PathDashArrayNV(uint path,
34495bd8deadSopenharmony_ci                             sizei dashCount, const float *dashArray);
34505bd8deadSopenharmony_ci
34515bd8deadSopenharmony_ci    where /path/ is the name of an existing path object.  The error
34525bd8deadSopenharmony_ci    INVALID_OPERATION is generated if /path/ is not an existing path
34535bd8deadSopenharmony_ci    object.
34545bd8deadSopenharmony_ci
34555bd8deadSopenharmony_ci    A /dashCount/ of zero indicates the path object is not dashed; in
34565bd8deadSopenharmony_ci    this case, the /dashArray/ is not accessed.  Otherwise, /dashCount/
34575bd8deadSopenharmony_ci    provides a count of how many float values to read from the /dashArray/
34585bd8deadSopenharmony_ci    array.  If any of the /dashCount/ elements of /dashArray/ are
34595bd8deadSopenharmony_ci    negative, the INVALID_VALUE error is generated.
34605bd8deadSopenharmony_ci
34615bd8deadSopenharmony_ci    If /dashCount/ is negative, the INVALID_VALUE error is generated.
34625bd8deadSopenharmony_ci
34635bd8deadSopenharmony_ci    If an error occurs, the path object's existing dash pattern state
34645bd8deadSopenharmony_ci    is not changed.
34655bd8deadSopenharmony_ci
34665bd8deadSopenharmony_ci    The path parameters of a newly specified path object are initialized
34675bd8deadSopenharmony_ci    as specified in Table 6.Y.
34685bd8deadSopenharmony_ci
34695bd8deadSopenharmony_ci    5.X.1.6 Path Weighting, Interpolation, and Copying
34705bd8deadSopenharmony_ci
34715bd8deadSopenharmony_ci    The command
34725bd8deadSopenharmony_ci
34735bd8deadSopenharmony_ci        void WeightPathsNV(uint resultPath,
34745bd8deadSopenharmony_ci                           sizei numPaths,
34755bd8deadSopenharmony_ci                           const uint paths[], const float weights[]);
34765bd8deadSopenharmony_ci
34775bd8deadSopenharmony_ci    linearly combines, as appropriate, the /numPaths/ path objects in
34785bd8deadSopenharmony_ci    the array paths based on each path object's respective weight from
34795bd8deadSopenharmony_ci    the weights array.  The resulting path creates or replaces the
34805bd8deadSopenharmony_ci    path object /resultPath/.  The INVALID_VALUE error is generated if
34815bd8deadSopenharmony_ci    /numPaths/ is less than one.
34825bd8deadSopenharmony_ci
34835bd8deadSopenharmony_ci    If the /resultPath/ name also names one of the paths in the /paths/
34845bd8deadSopenharmony_ci    array, the path resulting from the linear combination of paths
34855bd8deadSopenharmony_ci    replaces the source path also named /resultPath/ but not until after
34865bd8deadSopenharmony_ci    the linear combination path has been determined.
34875bd8deadSopenharmony_ci
34885bd8deadSopenharmony_ci    This command requires all the paths in the paths array to
34895bd8deadSopenharmony_ci    be /consistent/; otherwise the INVALID_OPERATION error is
34905bd8deadSopenharmony_ci    generated.  For all the paths to be /consistent/, all /numPaths/ paths
34915bd8deadSopenharmony_ci    in the /paths/ array must have the identical count of commands and
34925bd8deadSopenharmony_ci    each corresponding /i/th command in each path must have the identical
34935bd8deadSopenharmony_ci    command type.
34945bd8deadSopenharmony_ci
34955bd8deadSopenharmony_ci    However the arc commands (specifically SMALL_CCW_ARC_TO_NV,
34965bd8deadSopenharmony_ci    RELATIVE_SMALL_CCW_ARC_TO_NV, SMALL_CW_ARC_TO_NV,
34975bd8deadSopenharmony_ci    RELATIVE_SMALL_CW_ARC_TO_NV, LARGE_CCW_ARC_TO_NV,
34985bd8deadSopenharmony_ci    RELATIVE_LARGE_CCW_ARC_TO_NV, LARGE_CW_ARC_TO_NV,
34995bd8deadSopenharmony_ci    RELATIVE_LARGE_CW_ARC_TO_NV, CIRCULAR_CCW_ARC_TO_NV,
35005bd8deadSopenharmony_ci    CIRCULAR_CW_ARC_TO_NV, CIRCULAR_TANGENT_ARC_TO_NV, ARC_TO_NV, and
35015bd8deadSopenharmony_ci    RELATIVE_ARC_TO_NV) can not be weighted because the linear combination
35025bd8deadSopenharmony_ci    of the curves these arc commands generate do not generally result in
35035bd8deadSopenharmony_ci    a command of the same form; so if any of these arc commands appears
35045bd8deadSopenharmony_ci    in a path object passed to WeightPathsNV the INVALID_OPERATION error
35055bd8deadSopenharmony_ci    is generated.
35065bd8deadSopenharmony_ci
35075bd8deadSopenharmony_ci    The weighted path has a command sequence identical to any of the
35085bd8deadSopenharmony_ci    input path objects to be weighted (since all the input path command
35095bd8deadSopenharmony_ci    sequences are required to be identical).
35105bd8deadSopenharmony_ci
35115bd8deadSopenharmony_ci    The weighted path has a coordinate sequence constructed by weighting
35125bd8deadSopenharmony_ci    each correspondingly indexed coordinate /i/ for all paths indexed by
35135bd8deadSopenharmony_ci    /j/ from zero to /numPaths/-1 in the /paths/ array.  Each coordinate
35145bd8deadSopenharmony_ci    /i/ from path /j/ is weighted by the weight in /weights/ indexed
35155bd8deadSopenharmony_ci    by /j/.
35165bd8deadSopenharmony_ci
35175bd8deadSopenharmony_ci    The path parameters for the weighted path are copied from the path
35185bd8deadSopenharmony_ci    named by the first (0th) element of the /paths/ array.  The path
35195bd8deadSopenharmony_ci    metric values (as queried by GetPathMetricsNV in section 6.X.3)
35205bd8deadSopenharmony_ci    are all specified to be -1 for the newly specified path object
35215bd8deadSopenharmony_ci    (ignoring the path metrics for all the input path objects).
35225bd8deadSopenharmony_ci    Kerning information (as queriable by GetPathSpacingNV in section
35235bd8deadSopenharmony_ci    6.X.3) is also not copied.
35245bd8deadSopenharmony_ci
35255bd8deadSopenharmony_ci    The command
35265bd8deadSopenharmony_ci
35275bd8deadSopenharmony_ci        void InterpolatePathsNV(uint resultPath,
35285bd8deadSopenharmony_ci                                uint pathA, uint pathB,
35295bd8deadSopenharmony_ci                                float weight);
35305bd8deadSopenharmony_ci
35315bd8deadSopenharmony_ci    is equivalent to
35325bd8deadSopenharmony_ci
35335bd8deadSopenharmony_ci        uint paths[2] = { pathA, pathB };
35345bd8deadSopenharmony_ci        float weights[2] = { 1-weight, weight };
35355bd8deadSopenharmony_ci        WeightPathsNV(resultPath, 2, paths, weights);
35365bd8deadSopenharmony_ci
35375bd8deadSopenharmony_ci    The command
35385bd8deadSopenharmony_ci
35395bd8deadSopenharmony_ci        void CopyPathNV(uint resultPath, uint srcPath);
35405bd8deadSopenharmony_ci
35415bd8deadSopenharmony_ci    copies the path object named /srcPath/ to the path object named
35425bd8deadSopenharmony_ci    /resultPath/.  The error INVALID_OPERATION is generated if /srcPath/
35435bd8deadSopenharmony_ci    does not exist.  The outline (commands and coordinates), parameters,
35445bd8deadSopenharmony_ci    and glyph metrics and kerning information (if they exist) are all
35455bd8deadSopenharmony_ci    copied without change.
35465bd8deadSopenharmony_ci
35475bd8deadSopenharmony_ci    5.X.1.7 Path Transformation
35485bd8deadSopenharmony_ci
35495bd8deadSopenharmony_ci    The command
35505bd8deadSopenharmony_ci
35515bd8deadSopenharmony_ci        void TransformPathNV(uint resultPath,
35525bd8deadSopenharmony_ci                             uint srcPath,
35535bd8deadSopenharmony_ci                             enum transformType,
35545bd8deadSopenharmony_ci                             const float *transformValues);
35555bd8deadSopenharmony_ci
35565bd8deadSopenharmony_ci    transforms the path object named /srcPath/ by the transform specified
35575bd8deadSopenharmony_ci    by the /transformType/ and its associated /transformValues/.
35585bd8deadSopenharmony_ci    The resulting path creates or replaces the path object /resultPath/.
35595bd8deadSopenharmony_ci
35605bd8deadSopenharmony_ci    If the /resultPath/ and /srcPath/ names are identical, the path resulting
35615bd8deadSopenharmony_ci    from the transform replaces the name after the source path is transformed.
35625bd8deadSopenharmony_ci
35635bd8deadSopenharmony_ci    The /transformType/ must be one of NONE, TRANSLATE_X_NV,
35645bd8deadSopenharmony_ci    TRANSLATE_Y_NV, TRANSLATE_2D_NV, TRANSLATE_3D_NV, AFFINE_2D_NV,
35655bd8deadSopenharmony_ci    AFFINE_3D_NV, TRANSPOSE_AFFINE_2D_NV, or TRANSPOSE_AFFINE_3D_NV.
35665bd8deadSopenharmony_ci
35675bd8deadSopenharmony_ci        transformType               Matrix
35685bd8deadSopenharmony_ci        --------------------------  -------------------------
35695bd8deadSopenharmony_ci        NONE                        [   1   0   0   0 ]
35705bd8deadSopenharmony_ci                                    [   0   1   0   0 ]
35715bd8deadSopenharmony_ci                                    [   0   0   1   0 ]
35725bd8deadSopenharmony_ci                                    [   0   0   0   1 ]
35735bd8deadSopenharmony_ci
35745bd8deadSopenharmony_ci        TRANSLATE_X_NV              [   1   0   0  v0 ]
35755bd8deadSopenharmony_ci                                    [   0   1   0   0 ]
35765bd8deadSopenharmony_ci                                    [   0   0   1   0 ]
35775bd8deadSopenharmony_ci                                    [   0   0   0   1 ]
35785bd8deadSopenharmony_ci
35795bd8deadSopenharmony_ci        TRANSLATE_Y_NV              [   1   0   0   0 ]
35805bd8deadSopenharmony_ci                                    [   0   1   0  v0 ]
35815bd8deadSopenharmony_ci                                    [   0   0   1   0 ]
35825bd8deadSopenharmony_ci                                    [   0   0   0   1 ]
35835bd8deadSopenharmony_ci
35845bd8deadSopenharmony_ci        TRANSLATE_2D_NV             [   1   0   0  v0 ]
35855bd8deadSopenharmony_ci                                    [   0   1   0  v1 ]
35865bd8deadSopenharmony_ci                                    [   0   0   1   0 ]
35875bd8deadSopenharmony_ci                                    [   0   0   0   1 ]
35885bd8deadSopenharmony_ci
35895bd8deadSopenharmony_ci        TRANSLATE_3D_NV             [   1   0   0  v0 ]
35905bd8deadSopenharmony_ci                                    [   0   1   0  v1 ]
35915bd8deadSopenharmony_ci                                    [   0   0   1  v2 ]
35925bd8deadSopenharmony_ci                                    [   0   0   0   1 ]
35935bd8deadSopenharmony_ci
35945bd8deadSopenharmony_ci        AFFINE_2D_NV                [  v0  v2   0  v4 ]
35955bd8deadSopenharmony_ci                                    [  v1  v3   0  v5 ]
35965bd8deadSopenharmony_ci                                    [   0   0   1   0 ]
35975bd8deadSopenharmony_ci                                    [   0   0   0   1 ]
35985bd8deadSopenharmony_ci
35995bd8deadSopenharmony_ci        TRANSPOSE_AFFINE_2D_NV      [  v0  v1   0  v2 ]
36005bd8deadSopenharmony_ci                                    [  v3  v4   0  v5 ]
36015bd8deadSopenharmony_ci                                    [   0   0   1   0 ]
36025bd8deadSopenharmony_ci                                    [   0   0   0   1 ]
36035bd8deadSopenharmony_ci
36045bd8deadSopenharmony_ci        AFFINE_3D_NV                [  v0  v3  v6  v9 ]
36055bd8deadSopenharmony_ci                                    [  v1  v4  v7 v10 ]
36065bd8deadSopenharmony_ci                                    [  v2  v5  v8 v11 ]
36075bd8deadSopenharmony_ci                                    [   0   0   0   1 ]
36085bd8deadSopenharmony_ci
36095bd8deadSopenharmony_ci        TRANSPOSE_AFFINE_3D_NV      [  v0  v1  v2  v3 ]
36105bd8deadSopenharmony_ci                                    [  v4  v5  v6  v7 ]
36115bd8deadSopenharmony_ci                                    [  v8  v9 v10 v11 ]
36125bd8deadSopenharmony_ci                                    [   0   0   0   1 ]
36135bd8deadSopenharmony_ci
36145bd8deadSopenharmony_ci    Table 5.transformType:  Mapping from /transformType/ to a 4x4
36155bd8deadSopenharmony_ci    transform matrix where v/i/ is the ith (base 0) element of the
36165bd8deadSopenharmony_ci    /transformValues/ array.
36175bd8deadSopenharmony_ci
36185bd8deadSopenharmony_ci    The transformation of a path proceeds path command by path command.
36195bd8deadSopenharmony_ci    Each path command results in a transformed path command equivalent
36205bd8deadSopenharmony_ci    to what would happen if every point on the path command segment were
36215bd8deadSopenharmony_ci    transformed by the transform from Table 5.transformType and had a
36225bd8deadSopenharmony_ci    projective normalization applied.
36235bd8deadSopenharmony_ci
36245bd8deadSopenharmony_ci    Commands with absolute control points have their control points
36255bd8deadSopenharmony_ci    transformed by the effective 4x4 projective matrix, and the resulting
36265bd8deadSopenharmony_ci    x & y coordinates serve as the transformed command's respective
36275bd8deadSopenharmony_ci    control point.
36285bd8deadSopenharmony_ci
36295bd8deadSopenharmony_ci    Control points of relative commands are first made into absolute
36305bd8deadSopenharmony_ci    coordinates given the command's current control point, transformed
36315bd8deadSopenharmony_ci    in the same manner as an absolute control point, and then adjusted
36325bd8deadSopenharmony_ci    back to relative to their transformed current control point.
36335bd8deadSopenharmony_ci
36345bd8deadSopenharmony_ci    Horizontal and vertical line to commands are promoted to corresponding
36355bd8deadSopenharmony_ci    "line to" commands if the transformed command is not an exactly
36365bd8deadSopenharmony_ci    horizontal or vertical command respectively after transformation;
36375bd8deadSopenharmony_ci    otherwise, these commands are not promoted but may transition from
36385bd8deadSopenharmony_ci    horizontal to vertical or vice versa as the case may be.
36395bd8deadSopenharmony_ci
36405bd8deadSopenharmony_ci    Commands for partial elliptical arcs generate an equivalent new
36415bd8deadSopenharmony_ci    transformed arc.
36425bd8deadSopenharmony_ci
36435bd8deadSopenharmony_ci    XXX more detail/math about arcs?
36445bd8deadSopenharmony_ci
36455bd8deadSopenharmony_ci    The CIRCULAR_CCW_ARC_TO_NV and CIRCULAR_CW_ARC_TO_NV commands are
36465bd8deadSopenharmony_ci    converted to transformed *_ARC_TO_NV commands if the transformed
36475bd8deadSopenharmony_ci    circular arc is itself not a circular arc.
36485bd8deadSopenharmony_ci
36495bd8deadSopenharmony_ci    The CIRCULAR_TANGENT_ARC_TO_NV command is converted into a LINE_TO_NV
36505bd8deadSopenharmony_ci    command and *_ARC_TO_NV command if the transformed circular arc is
36515bd8deadSopenharmony_ci    itself not a circular arc.
36525bd8deadSopenharmony_ci
36535bd8deadSopenharmony_ci    The CLOSE_PATH_NV and RESTART_PATH_NV (having no control points)
36545bd8deadSopenharmony_ci    are undisturbed by path transformation.  The order of path commands
36555bd8deadSopenharmony_ci    is invariant under path transformation.
36565bd8deadSopenharmony_ci
36575bd8deadSopenharmony_ci    5.X.1.8  Path Name Management
36585bd8deadSopenharmony_ci
36595bd8deadSopenharmony_ci    The command
36605bd8deadSopenharmony_ci
36615bd8deadSopenharmony_ci        uint GenPathsNV(sizei range);
36625bd8deadSopenharmony_ci
36635bd8deadSopenharmony_ci    returns an integer /n/ such that names /n/, ..., /n+range-1/ are
36645bd8deadSopenharmony_ci    previously unused (i.e. there are /range/ previously unused path object
36655bd8deadSopenharmony_ci    names starting at /n/).  These names are marked as used, for the
36665bd8deadSopenharmony_ci    purposes of subsequent GenPathsNV only, but they do not acquire
36675bd8deadSopenharmony_ci    path object state until each particular name is used to specify
36685bd8deadSopenharmony_ci    a path object.
36695bd8deadSopenharmony_ci
36705bd8deadSopenharmony_ci    Path objects are deleted by calling
36715bd8deadSopenharmony_ci
36725bd8deadSopenharmony_ci        void DeletePathsNV(uint path, sizei range);
36735bd8deadSopenharmony_ci
36745bd8deadSopenharmony_ci    where /path/ contains /range/ names of path objects to be delete.
36755bd8deadSopenharmony_ci    After a path object is deleted, its name is again unused.  Unused
36765bd8deadSopenharmony_ci    names in /paths/ are silently ignored.
36775bd8deadSopenharmony_ci
36785bd8deadSopenharmony_ci    The query
36795bd8deadSopenharmony_ci
36805bd8deadSopenharmony_ci        boolean IsPathNV(uint path);
36815bd8deadSopenharmony_ci
36825bd8deadSopenharmony_ci    returns TRUE if /path/ is the name of a path object.  If path is
36835bd8deadSopenharmony_ci    not the name of a path object, or if an error condition occurs,
36845bd8deadSopenharmony_ci    IsPathNV returns FALSE.  A name retuned by GenPathsNV, but without
36855bd8deadSopenharmony_ci    a path specified for it yet, is not the name of a path object.
36865bd8deadSopenharmony_ci
36875bd8deadSopenharmony_ci    5.X.2 Path Rendering
36885bd8deadSopenharmony_ci
36895bd8deadSopenharmony_ci    Path objects update the framebuffer through one of two processes:
36905bd8deadSopenharmony_ci    "stenciling" that updates /just/ the stencil buffer with the path's
36915bd8deadSopenharmony_ci    coverage information, and "covering" that rasterizes fragments into
36925bd8deadSopenharmony_ci    the framebuffer for a region guaranteed to cover the region of path
36935bd8deadSopenharmony_ci    coverage updated by stenciling, assuming the same path object,
36945bd8deadSopenharmony_ci    fill mode or stroking parameters, transformation state, and set of
36955bd8deadSopenharmony_ci    accessible samples (as will be explained).
36965bd8deadSopenharmony_ci
36975bd8deadSopenharmony_ci    5.X.2.1 Path Stenciling
36985bd8deadSopenharmony_ci
36995bd8deadSopenharmony_ci    STENCILING FILLED PATHS
37005bd8deadSopenharmony_ci
37015bd8deadSopenharmony_ci    The command
37025bd8deadSopenharmony_ci
37035bd8deadSopenharmony_ci        void PathStencilFuncNV(enum func, int ref, uint mask);
37045bd8deadSopenharmony_ci
37055bd8deadSopenharmony_ci    configures the stencil function, stencil reference value, and stencil
37065bd8deadSopenharmony_ci    read mask to be used by the StencilFillPathNV and StencilStrokePathNV
37075bd8deadSopenharmony_ci    commands described subsequently.  The parameters accept the same
37085bd8deadSopenharmony_ci    values allowed by the StencilFunc command.
37095bd8deadSopenharmony_ci
37105bd8deadSopenharmony_ci    The command
37115bd8deadSopenharmony_ci
37125bd8deadSopenharmony_ci        void PathStencilDepthOffsetNV(float factor, float units);
37135bd8deadSopenharmony_ci
37145bd8deadSopenharmony_ci    configures the depth offset factor and units state (see section 3.6.4)
37155bd8deadSopenharmony_ci    to be used by the StencilFillPathNV and StencilStrokePathNV commands
37165bd8deadSopenharmony_ci    described subsequently.
37175bd8deadSopenharmony_ci
37185bd8deadSopenharmony_ci    The command
37195bd8deadSopenharmony_ci
37205bd8deadSopenharmony_ci        void StencilFillPathNV(uint path,
37215bd8deadSopenharmony_ci                               enum fillMode, uint mask);
37225bd8deadSopenharmony_ci
37235bd8deadSopenharmony_ci    transforms into window space the outline of the path object named
37245bd8deadSopenharmony_ci    /path/ based on the current modelview, projection, viewport,
37255bd8deadSopenharmony_ci    and depth range transforms (ignoring any vertex and/or geometry
37265bd8deadSopenharmony_ci    shader or program that might be active/enabled) and then updates
37275bd8deadSopenharmony_ci    the stencil values of all /accessible samples/ (explained below) in
37285bd8deadSopenharmony_ci    the framebuffer.  Each sample's stencil buffer value is updated based
37295bd8deadSopenharmony_ci    on the winding number of that sample with respect to the transformed
37305bd8deadSopenharmony_ci    outline of the path object with any non-closed subpath forced closed
37315bd8deadSopenharmony_ci    and the specified /fillMode/.
37325bd8deadSopenharmony_ci
37335bd8deadSopenharmony_ci    If /path/ does not name an existing path object, the command does
37345bd8deadSopenharmony_ci    nothing (and no error is generated).
37355bd8deadSopenharmony_ci
37365bd8deadSopenharmony_ci    If the path's command sequence specifies unclosed subpaths (so not
37375bd8deadSopenharmony_ci    contours) due to MOVE_TO_NV commands, such subpaths are trivially
37385bd8deadSopenharmony_ci    closed by connecting with a line segment the initial and terminal
37395bd8deadSopenharmony_ci    control points of each such path command subsequence.
37405bd8deadSopenharmony_ci
37415bd8deadSopenharmony_ci    Transformation of a path's outline works by taking all positions
37425bd8deadSopenharmony_ci    on the path's outline in 2D path space (x,y) and constructing an
37435bd8deadSopenharmony_ci    object space position (x,y,0,1) that is then used as the (xo,yo,zo,wo)
37445bd8deadSopenharmony_ci    position in section 2.12 ("Fixed-Function Vertex Transformation")
37455bd8deadSopenharmony_ci    to compute corresponding eye-space coordinates (xe,ye,ze,we) and
37465bd8deadSopenharmony_ci    clip-space coordinates (xc,yc,zc,wc).  A path outline's clip-space
37475bd8deadSopenharmony_ci    coordinates are further transformed into window space as described in
37485bd8deadSopenharmony_ci    section 2.16 ("Coordinate Transformations").  This process provides a
37495bd8deadSopenharmony_ci    mapping 2D path coordinates to 2D window coordinates and depth values.
37505bd8deadSopenharmony_ci    The resulting 2D window coordinates are undefined if any of the
37515bd8deadSopenharmony_ci    transformations involved are singular or may be inaccurate if any
37525bd8deadSopenharmony_ci    of the transformations (or their combination) are ill-conditioned.
37535bd8deadSopenharmony_ci
37545bd8deadSopenharmony_ci    The winding number for a sample with respect to the path outline,
37555bd8deadSopenharmony_ci    transformed into window space, is computed by counting the (signed)
37565bd8deadSopenharmony_ci    number of revolutions around the sample point when traversing each
37575bd8deadSopenharmony_ci    (trivially closed if necessary) contour once in the transformed path.
37585bd8deadSopenharmony_ci    This traversal is performed in the order of the path's command
37595bd8deadSopenharmony_ci    sequence.  Starting from an initially zero winding count, each
37605bd8deadSopenharmony_ci    counterclockwise revolution when the front face mode is CCW (or
37615bd8deadSopenharmony_ci    clockwise revolution when the front face mode is CW) around the sample
37625bd8deadSopenharmony_ci    point increments the winding count by one; while each clockwise
37635bd8deadSopenharmony_ci    revolution when the front face mode is CCW (or counterclockwise
37645bd8deadSopenharmony_ci    revolution when the front face mode is CW) around the sample point
37655bd8deadSopenharmony_ci    decrements the winding count by one.
37665bd8deadSopenharmony_ci
37675bd8deadSopenharmony_ci    The /mask/ parameter controls what subset of stencil bits are affected
37685bd8deadSopenharmony_ci    by the command.  If the /mask/ parameter is zero, the path object's
37695bd8deadSopenharmony_ci    fill mask parameter (PATH_FILL_MASK_NV) is considered the effective
37705bd8deadSopenharmony_ci    value of /mask/.
37715bd8deadSopenharmony_ci
37725bd8deadSopenharmony_ci    The /fillMode/ parameter must be one of INVERT, COUNT_UP_NV,
37735bd8deadSopenharmony_ci    COUNT_DOWN_NV, or PATH_FILL_MODE_NV; otherwise the INVALID_ENUM error
37745bd8deadSopenharmony_ci    is generated.  INVERT inverts the bits set in the effective /mask/
37755bd8deadSopenharmony_ci    value for each sample's stencil value if the winding number for the
37765bd8deadSopenharmony_ci    given sample is odd.  COUNT_UP_NV adds with modulo n arithmetic the
37775bd8deadSopenharmony_ci    winding number of each sample with the sample's prior stencil buffer
37785bd8deadSopenharmony_ci    value; the result of this addition is written into the sample's
37795bd8deadSopenharmony_ci    stencil value but the bits of the stencil value not set in the
37805bd8deadSopenharmony_ci    effective /mask/ value are left unchanged.  COUNT_DOWN_NV subtracts
37815bd8deadSopenharmony_ci    with modulo /n/ arithmetic the winding number of each sample with the
37825bd8deadSopenharmony_ci    sample's prior stencil buffer value; the result of this subtraction is
37835bd8deadSopenharmony_ci    written into the sample's stencil value but the bits of the stencil
37845bd8deadSopenharmony_ci    value not set in the effective /mask/ value are left unchanged.
37855bd8deadSopenharmony_ci    PATH_FILL_MODE_NV uses the path object's counting mode parameter
37865bd8deadSopenharmony_ci    (one of INVERT, COUNT_UP_NV, or COUNT_DOWN_NV).
37875bd8deadSopenharmony_ci
37885bd8deadSopenharmony_ci    The value of /n/ for the modulo /n/ arithmetic used by COUNT_UP_NV
37895bd8deadSopenharmony_ci    and COUNT_DOWN_NV is the effective /mask/+1.  The error INVALID_VALUE
37905bd8deadSopenharmony_ci    is generated if the specified /fillMode/ is COUNT_UP_NV or
37915bd8deadSopenharmony_ci    COUNT_DOWN_NV and the specified /mask/+1 is not an integer power
37925bd8deadSopenharmony_ci    of two.  If the /fillMode/ is PATH_FILL_MODE_NV; the path object's
37935bd8deadSopenharmony_ci    counting mode parameter is COUNT_UP_NV or COUNT_DOWN_NV; and the
37945bd8deadSopenharmony_ci    effective mask+1 value is not an integer power of two, treat the
37955bd8deadSopenharmony_ci    mask as zero (effectively meaning no stencil bits will be modified).
37965bd8deadSopenharmony_ci
37975bd8deadSopenharmony_ci    ACCESSIBLE SAMPLES WITH RESPECT TO A TRANSFORMED PATH
37985bd8deadSopenharmony_ci
37995bd8deadSopenharmony_ci    The accessible samples of a transformed path that are updated are
38005bd8deadSopenharmony_ci    the samples that remain after discarding the following samples:
38015bd8deadSopenharmony_ci
38025bd8deadSopenharmony_ci        *   Any sample that would be clipped as specified in section 2.22
38035bd8deadSopenharmony_ci            ("Primitive Clipping") because its corresponding position in
38045bd8deadSopenharmony_ci            clip space (xc,yc,zc,wc) or (xe,ye,ze,we) would be clipped
38055bd8deadSopenharmony_ci            by the clip volume or enabled client-defined clip planes.
38065bd8deadSopenharmony_ci
38075bd8deadSopenharmony_ci        *   Any sample that would not be updated during polygon rendering
38085bd8deadSopenharmony_ci            due to polygon stipple (section 3.6.2) if POLYGON_STIPPLE
38095bd8deadSopenharmony_ci            is enabled.
38105bd8deadSopenharmony_ci
38115bd8deadSopenharmony_ci        *   Any sample that would fail the pixel ownership test (section
38125bd8deadSopenharmony_ci            4.1.1) if rasterized.
38135bd8deadSopenharmony_ci
38145bd8deadSopenharmony_ci        *   Any sample that would fail the scissor test (section 4.1.2)
38155bd8deadSopenharmony_ci            if SCISSOR_TEST is enabled.
38165bd8deadSopenharmony_ci
38175bd8deadSopenharmony_ci        *   Any sample that would fail the depth test (section 4.1.6)
38185bd8deadSopenharmony_ci            if DEPTH_TEST is enabled where the fragment depth for the
38195bd8deadSopenharmony_ci            depth test comes from the depth plane of the path when
38205bd8deadSopenharmony_ci            transformed by the modelview, projection, viewport, and
38215bd8deadSopenharmony_ci            depth range transforms and depth offset (section 3.6.4)
38225bd8deadSopenharmony_ci            has been applied based on the slope of this plane operating
38235bd8deadSopenharmony_ci            as if POLYGON_OFFSET_FILL is forced enabled and using the
38245bd8deadSopenharmony_ci            factor and units parameters set by PathStencilDepthOffsetNV
38255bd8deadSopenharmony_ci            (rather than the state set by PolygonOffset).
38265bd8deadSopenharmony_ci
38275bd8deadSopenharmony_ci        *   Any sample that would fail the depth bounds test (section
38285bd8deadSopenharmony_ci            4.1.X in EXT_depth_bounds_test specification) if
38295bd8deadSopenharmony_ci            DEPTH_BOUNDS_TEST_EXT is enabled.
38305bd8deadSopenharmony_ci
38315bd8deadSopenharmony_ci    And for the StencilFillPathNV and StencilStrokePathNV commands (so
38325bd8deadSopenharmony_ci    not applicable to the CoverFillPathNV and CoverStrokePathNV commands):
38335bd8deadSopenharmony_ci
38345bd8deadSopenharmony_ci        *   Any sample that would fail the (implicitly enabled) stencil
38355bd8deadSopenharmony_ci            test (section 4.1.5) with the stencil function configured
38365bd8deadSopenharmony_ci            based on the path stencil function state configured by
38375bd8deadSopenharmony_ci            PathStencilFuncNV.  In the case of the StencilFillPathNV
38385bd8deadSopenharmony_ci            and StencilStrokePathNV commands and their instanced
38395bd8deadSopenharmony_ci            versions (section 5.X.2.3), the effective stencil read
38405bd8deadSopenharmony_ci            mask for the stencil mask is treated as the value of
38415bd8deadSopenharmony_ci            PATH_STENCIL_VALUE_MASK bit-wise ANDed with the bit-invert
38425bd8deadSopenharmony_ci            of the effective /mask/ parameter value; otherwise, for the
38435bd8deadSopenharmony_ci            cover commands, the stencil test operates normally.  In the
38445bd8deadSopenharmony_ci            case the stencil test fails during a path stencil operation,
38455bd8deadSopenharmony_ci            the stencil fail operation is ignored and the pixel's stencil
38465bd8deadSopenharmony_ci            value is left undisturbed (as if the stencil operation was
38475bd8deadSopenharmony_ci            KEEP).
38485bd8deadSopenharmony_ci
38495bd8deadSopenharmony_ci        *   The state of the face culling (CULL_FACE) enable is ignored.
38505bd8deadSopenharmony_ci
38515bd8deadSopenharmony_ci    STENCILING STROKED PATHS
38525bd8deadSopenharmony_ci
38535bd8deadSopenharmony_ci    The command
38545bd8deadSopenharmony_ci
38555bd8deadSopenharmony_ci        void StencilStrokePathNV(uint path,
38565bd8deadSopenharmony_ci                                 int reference, uint mask);
38575bd8deadSopenharmony_ci
38585bd8deadSopenharmony_ci    transforms into window space the stroked region of the path object
38595bd8deadSopenharmony_ci    named /path/ based on the current modelview, projection, viewport,
38605bd8deadSopenharmony_ci    and depth range transforms (ignoring any vertex and/or geometry
38615bd8deadSopenharmony_ci    shader or program that might be active/enabled) and then updates
38625bd8deadSopenharmony_ci    the stencil values of a subset of the accessible samples (see above)
38635bd8deadSopenharmony_ci    in the framebuffer.
38645bd8deadSopenharmony_ci
38655bd8deadSopenharmony_ci    If /path/ does not name an existing path object, the command does
38665bd8deadSopenharmony_ci    nothing (and no error is generated).
38675bd8deadSopenharmony_ci
38685bd8deadSopenharmony_ci    The path object's stroke width parameter (PATH_STROKE_WIDTH_NV) in
38695bd8deadSopenharmony_ci    path space units determines the width of the path's stroked region.
38705bd8deadSopenharmony_ci
38715bd8deadSopenharmony_ci    When the dash array count of a path object is zero (dashing is
38725bd8deadSopenharmony_ci    considered subsequently), the stroke of a transformed path's outline
38735bd8deadSopenharmony_ci    is the region of window space defined by the union of:
38745bd8deadSopenharmony_ci
38755bd8deadSopenharmony_ci        *   Sweeping an orthogonal centered line segment of the (above
38765bd8deadSopenharmony_ci            determined) effective stroke width along each path segment
38775bd8deadSopenharmony_ci            in the path's transformed outline.
38785bd8deadSopenharmony_ci
38795bd8deadSopenharmony_ci        *   End cap regions (explained below) appended to the initial
38805bd8deadSopenharmony_ci            and terminal control points of non-closed command sequences
38815bd8deadSopenharmony_ci            in the path.  For a sequence of commands that form a closed
38825bd8deadSopenharmony_ci            contour, the end cap regions are ignored.
38835bd8deadSopenharmony_ci
38845bd8deadSopenharmony_ci        *   Join style regions (explained below) between connected path
38855bd8deadSopenharmony_ci            segments meet.
38865bd8deadSopenharmony_ci
38875bd8deadSopenharmony_ci    Any accessible samples within the union of these three regions are
38885bd8deadSopenharmony_ci    considered within the path object's stroke.
38895bd8deadSopenharmony_ci
38905bd8deadSopenharmony_ci    The /mask/ parameter controls what subset of stencil bits are affected
38915bd8deadSopenharmony_ci    by the command.  If the /mask/ parameter is zero, the path object's
38925bd8deadSopenharmony_ci    stroke mask parameter (PATH_STROKE_MASK_NV) is considered the effective
38935bd8deadSopenharmony_ci    value of /mask/.
38945bd8deadSopenharmony_ci
38955bd8deadSopenharmony_ci    A sample's stencil bits that are set in the effective /mask/ value
38965bd8deadSopenharmony_ci    are updated with the specified stencil /reference/ value if the
38975bd8deadSopenharmony_ci    sample is accessible (as specified above) and within the stroke of
38985bd8deadSopenharmony_ci    the transformed path's outline.
38995bd8deadSopenharmony_ci
39005bd8deadSopenharmony_ci    Every path object has an initial and terminal end cap parameter
39015bd8deadSopenharmony_ci    (PATH_INITIAL_END_CAP_NV and PATH_TERMINAL_END_CAP_NV) that is
39025bd8deadSopenharmony_ci    one of FLAT, SQUARE_NV, ROUND_NV, or TRIANGULAR_NV.  There are no
39035bd8deadSopenharmony_ci    samples within a FLAT end cap.  The SQUARE_NV cap extends centered
39045bd8deadSopenharmony_ci    and tangent to the given end (initial or terminal) of the subpath
39055bd8deadSopenharmony_ci    for half the effective stroke width; in other words, a square cap
39065bd8deadSopenharmony_ci    is a half-square that kisses watertightly the end of a subpath.
39075bd8deadSopenharmony_ci    The ROUND_NV cap appends a semi-circle, centered and tangent,
39085bd8deadSopenharmony_ci    with the diameter of the effective stroke width to the given end
39095bd8deadSopenharmony_ci    (initial or terminal) of the subpath; in other words, a round cap
39105bd8deadSopenharmony_ci    is a semi-circle that kisses watertightly the end of a subpath.
39115bd8deadSopenharmony_ci    The TRIANGULAR_NV cap appends a right triangle, centered and tangent,
39125bd8deadSopenharmony_ci    with its hypotenuse flush to the given end of the subpath; in other
39135bd8deadSopenharmony_ci    words, a triangular cap is a right triangle that kisses watertightly
39145bd8deadSopenharmony_ci    the end of a subpath with the triangle's longest side.
39155bd8deadSopenharmony_ci
39165bd8deadSopenharmony_ci    Every path object has a join style parameter (PATH_JOIN_STYLE_NV)
39175bd8deadSopenharmony_ci    that is one of BEVEL_NV, ROUND_NV, MITER_REVERT_NV, MITER_TRUNCATE_NV,
39185bd8deadSopenharmony_ci    or NONE; each path object also has a miter limit value.  The BEVEL_NV
39195bd8deadSopenharmony_ci    join style inserts a triangle with two vertices at the outside
39205bd8deadSopenharmony_ci    corners where two connected path segments join and a third vertex at
39215bd8deadSopenharmony_ci    the common end point shared by the two path segments.  The ROUND_NV
39225bd8deadSopenharmony_ci    join style inserts a wedge-shaped portion of a circle centered at
39235bd8deadSopenharmony_ci    the common end point shared by the two path segments; the radius of
39245bd8deadSopenharmony_ci    the circle is half the effective stroke width.  There are no samples
39255bd8deadSopenharmony_ci    within a NONE join style.  The MITER_REVERT_NV join style inserts a
39265bd8deadSopenharmony_ci    quadrilateral with two opposite vertices at the outside corners where
39275bd8deadSopenharmony_ci    the two connected path segments join and two opposite vertices with
39285bd8deadSopenharmony_ci    one on the path's junction between the two joining path segments and
39295bd8deadSopenharmony_ci    the other at the common end point shared by the two path segments.
39305bd8deadSopenharmony_ci    However, the MITER_REVERT_NV join style behaves as the BEVEL_NV
39315bd8deadSopenharmony_ci    style if the sine of half the angle between the two joined segments
39325bd8deadSopenharmony_ci    is less than the path object's PATH_STROKE_WIDTH value divided by
39335bd8deadSopenharmony_ci    the path's PATH_MITER_LIMIT_NV value.  The MITER_TRUNCATE_NV join
39345bd8deadSopenharmony_ci    style is similar to MITER_REVERT_NV but rather than reverting to a
39355bd8deadSopenharmony_ci    bevel when the miter limit is exceeded, instead the tip of the miter
39365bd8deadSopenharmony_ci    quadrilateral is truncated such that the miter does not extend beyond
39375bd8deadSopenharmony_ci    the miter limit.
39385bd8deadSopenharmony_ci
39395bd8deadSopenharmony_ci    When the dash array count of a path object is /not/ zero, the path is
39405bd8deadSopenharmony_ci    broken up into a sequence of paths based on the path object's dash
39415bd8deadSopenharmony_ci    array count, dash array, dash offset, and dash cap parameters (see
39425bd8deadSopenharmony_ci    section 5.X.1.5).  This sequence of paths are handled as if their
39435bd8deadSopenharmony_ci    dash count array is zero so their stroked region can be determined
39445bd8deadSopenharmony_ci    for this stroking case that has already been explained.
39455bd8deadSopenharmony_ci
39465bd8deadSopenharmony_ci    The dash pattern defined by the dash array is a sequence of lengths of
39475bd8deadSopenharmony_ci    alternating "on" and "off" dash segments.  The first (0th) element of
39485bd8deadSopenharmony_ci    the dash array defines the length, in path space, of the first "on"
39495bd8deadSopenharmony_ci    dash segment.  The second value defines the length of the following
39505bd8deadSopenharmony_ci    "off" segment.  Each subsequent pair of values defines on "on"
39515bd8deadSopenharmony_ci    and one "off" segment.
39525bd8deadSopenharmony_ci
39535bd8deadSopenharmony_ci    The initial cap of the first dash segment uses the path's initial
39545bd8deadSopenharmony_ci    dash cap style state (PATH_INITIAL_END_CAP_NV) as the effective
39555bd8deadSopenharmony_ci    initial end cap for this first dash segment; the terminal cap
39565bd8deadSopenharmony_ci    of the last dash segment uses the path's terminal dash cap style
39575bd8deadSopenharmony_ci    state (PATH_TERMINAL_END_CAP_NV) as the effective terminal cap for
39585bd8deadSopenharmony_ci    this last dash segment; all other caps of dash segments use the
39595bd8deadSopenharmony_ci    PATH_INITIAL_DASH_CAP_NV for the initial cap of the segment and the
39605bd8deadSopenharmony_ci    PATH_TERMINAL_DASH_CAP_NV for the terminal cap of the segment.
39615bd8deadSopenharmony_ci
39625bd8deadSopenharmony_ci    The MOVE_TO_RESETS_NV value for a path's dash offset reset parameter
39635bd8deadSopenharmony_ci    (PATH_DASH_OFFSET_RESET_NV) means that the dash offset resets to the
39645bd8deadSopenharmony_ci    path's dash offset parameter upon a MOVE_TO_NV, RELATIVE_MOVE_TO_NV,
39655bd8deadSopenharmony_ci    RESTART_PATH_NV, or RECT_NV command (an command that does an implicit
39665bd8deadSopenharmony_ci    or explicit move-to) while dashing the path's command sequence.
39675bd8deadSopenharmony_ci    The MOVE_TO_CONTINUES_NV value means that the dash pattern
39685bd8deadSopenharmony_ci    progresses normally (without reset) when dashing a MOVE_TO_NV or
39695bd8deadSopenharmony_ci    RELATIVE_MOVE_TO_NV command.
39705bd8deadSopenharmony_ci
39715bd8deadSopenharmony_ci    Every path object has a stroke approximation bound parameter
39725bd8deadSopenharmony_ci    (PATH_STROKE_BOUND_NV) that is a floating-point value /sab/ clamped
39735bd8deadSopenharmony_ci    between 0.0 and 1.0 and set and queried with the PATH_STROKE_BOUND_NV
39745bd8deadSopenharmony_ci    path parameter.  Exact determination of samples swept an orthogonal
39755bd8deadSopenharmony_ci    centered line segment along cubic Bezier segments and rational
39765bd8deadSopenharmony_ci    quadratic Bezier curves (so non-circular partial elliptical arcs) is
39775bd8deadSopenharmony_ci    intractable for real-time rendering so an approximation is required;
39785bd8deadSopenharmony_ci    /sab/ intuitively bounds the approximation error as a percentage of
39795bd8deadSopenharmony_ci    the path object's stroke width.  Specifically, this path parameter
39805bd8deadSopenharmony_ci    requests the implementation to stencil any samples within /sweep/
39815bd8deadSopenharmony_ci    object space units of the exact sweep of the path's cubic Bezier
39825bd8deadSopenharmony_ci    segments or partial elliptical arcs to be sampled by the stroke where
39835bd8deadSopenharmony_ci
39845bd8deadSopenharmony_ci      sweep = ((1-sab)*sw)/2
39855bd8deadSopenharmony_ci
39865bd8deadSopenharmony_ci    where /sw/ is the path object's stroke width.  The initial value
39875bd8deadSopenharmony_ci    of /sab/ when a path is created is 0.2.  In practical terms, this
39885bd8deadSopenharmony_ci    initial value means the stencil sample positions coverage within 80%
39895bd8deadSopenharmony_ci    (100%-20%) of the stroke width of cubic and rational quadratic stroke
39905bd8deadSopenharmony_ci    segments should be sampled.
39915bd8deadSopenharmony_ci
39925bd8deadSopenharmony_ci    If the path object's client length parameter (PATH_CLIENT_LENGTH_NV)
39935bd8deadSopenharmony_ci    value /clen/ is non-zero, prior to generating the dashed segments, the
39945bd8deadSopenharmony_ci    dash pattern and dash offset lengths should be scaled by (multiplied
39955bd8deadSopenharmony_ci    by) the clen/plen where /plen/ is the path object's computed length
39965bd8deadSopenharmony_ci    (PATH_COMPUTED_LENGTH_NV).
39975bd8deadSopenharmony_ci
39985bd8deadSopenharmony_ci    5.X.2.2 Path Covering
39995bd8deadSopenharmony_ci
40005bd8deadSopenharmony_ci    COVERING FILLED PATHS
40015bd8deadSopenharmony_ci
40025bd8deadSopenharmony_ci    The command
40035bd8deadSopenharmony_ci
40045bd8deadSopenharmony_ci        void PathCoverDepthFuncNV(enum zfunc);
40055bd8deadSopenharmony_ci
40065bd8deadSopenharmony_ci    configures the depth function to be used by the CoverFillPathNV and
40075bd8deadSopenharmony_ci    CoverStrokePathNV commands described subsequently.  The /zfunc/ parameter
40085bd8deadSopenharmony_ci    accepts the same values allowed by the DepthFunc command.
40095bd8deadSopenharmony_ci
40105bd8deadSopenharmony_ci    The command
40115bd8deadSopenharmony_ci
40125bd8deadSopenharmony_ci        void CoverFillPathNV(uint path, enum coverMode);
40135bd8deadSopenharmony_ci
40145bd8deadSopenharmony_ci    transforms into window space the outline of the path object named
40155bd8deadSopenharmony_ci    /path/ based on the current modelview, projection, viewport,
40165bd8deadSopenharmony_ci    and depth range transforms (ignoring any vertex and/or geometry
40175bd8deadSopenharmony_ci    shader or program that might be active/enabled) and rasterizes a
40185bd8deadSopenharmony_ci    subset of the accessible samples in the framebuffer guaranteed to
40195bd8deadSopenharmony_ci    include all samples that would be have a net stencil value change if
40205bd8deadSopenharmony_ci    StencilFillPathNV were issued with the same modelview, projection,
40215bd8deadSopenharmony_ci    and viewport state.  During this rasterization, the stencil test
40225bd8deadSopenharmony_ci    operates normally and as configured; the expectation is the stencil
40235bd8deadSopenharmony_ci    test will be used to discard samples not determined "covered" by a
40245bd8deadSopenharmony_ci    prior StencilFillPathNV command.  The depth function, if DEPTH_TEST is
40255bd8deadSopenharmony_ci    enabled, during this rasterization uses the function specified by
40265bd8deadSopenharmony_ci    PathCoverDepthFuncNV (instead of the state specified by DepthFunc).
40275bd8deadSopenharmony_ci
40285bd8deadSopenharmony_ci    If /path/ does not name an existing path object, the command does
40295bd8deadSopenharmony_ci    nothing (and no error is generated).
40305bd8deadSopenharmony_ci
40315bd8deadSopenharmony_ci    /coverMode/ must be one of CONVEX_HULL_NV, BOUNDING_BOX_NV, or
40325bd8deadSopenharmony_ci    PATH_FILL_COVER_MODE_NV.  The PATH_FILL_COVER_MODE_NV uses the path
40335bd8deadSopenharmony_ci    object's PATH_FILL_COVER_MODE_NV parameter value as the effective
40345bd8deadSopenharmony_ci    fill cover mode of the cover command.
40355bd8deadSopenharmony_ci
40365bd8deadSopenharmony_ci    When /coverMode/ is CONVEX_HULL_NV or BOUNDING_BOX_NV, the subset
40375bd8deadSopenharmony_ci    of accessible pixels that are rasterized are within a convex
40385bd8deadSopenharmony_ci    hull or bounding box respectively (each expected to be reasonably
40395bd8deadSopenharmony_ci    tight) surrounding all the samples guaranteed to be rasterized by
40405bd8deadSopenharmony_ci    CoverFillPathNV.  The bounding box must be orthogonally aligned
40415bd8deadSopenharmony_ci    to the path space coordinate system.  (The area of the bounding
40425bd8deadSopenharmony_ci    box in path space is guaranteed to be greater than or equal the
40435bd8deadSopenharmony_ci    area of the convex hull in path space.) Each rasterized sample
40445bd8deadSopenharmony_ci    will be rasterized once and exactly once when CONVEX_HULL_NV or
40455bd8deadSopenharmony_ci    BOUNDING_BOX_NV is specified.
40465bd8deadSopenharmony_ci
40475bd8deadSopenharmony_ci    While samples with a net stencil change /must/ be rasterized,
40485bd8deadSopenharmony_ci    implementations are explicitly allowed to vary in the rasterization
40495bd8deadSopenharmony_ci    of samples for which StencilFillPathNV would /not/ change sample's
40505bd8deadSopenharmony_ci    net stencil value.  This means implementations are allowed to (and,
40515bd8deadSopenharmony_ci    in fact, are expected to) conservatively "exceed" the region strictly
40525bd8deadSopenharmony_ci    stenciled by the path object.
40535bd8deadSopenharmony_ci
40545bd8deadSopenharmony_ci    CoverFillPathNV /requires/ the following rasterization invariance:
40555bd8deadSopenharmony_ci    calling CoverFillPathNV for the same (unchanged) path object with
40565bd8deadSopenharmony_ci    fixed (unchanged) modelview, projection, and viewport transform state
40575bd8deadSopenharmony_ci    with the same (unchanged) set of accessible samples will rasterize
40585bd8deadSopenharmony_ci    the exact same set of samples with identical interpolated values
40595bd8deadSopenharmony_ci    for respective fragment/sample locations.
40605bd8deadSopenharmony_ci
40615bd8deadSopenharmony_ci    COVERING STROKED PATHS
40625bd8deadSopenharmony_ci
40635bd8deadSopenharmony_ci    The command
40645bd8deadSopenharmony_ci
40655bd8deadSopenharmony_ci        void CoverStrokePathNV(uint path, enum coverMode);
40665bd8deadSopenharmony_ci
40675bd8deadSopenharmony_ci    operates in the same manner as CoverFillPathNV except the region
40685bd8deadSopenharmony_ci    guaranteed to be rasterized is, rather than the region within /path/'s
40695bd8deadSopenharmony_ci    filled outline, instead the region within the /path/'s stroked region
40705bd8deadSopenharmony_ci    as determined by StencilStrokePathNV.  During this rasterization,
40715bd8deadSopenharmony_ci    the stencil test operates normally and as configured; the expectation
40725bd8deadSopenharmony_ci    is the stencil test will be used to discard samples not determined
40735bd8deadSopenharmony_ci    "covered" by a prior StencilStrokePathNV command.  As with CoverFillPathNV,
40745bd8deadSopenharmony_ci    the depth function, if DEPTH_TEST is enabled, uses the function specified
40755bd8deadSopenharmony_ci    by PathCoverDepthFuncNV.
40765bd8deadSopenharmony_ci
40775bd8deadSopenharmony_ci    /coverMode/ must be one of CONVEX_HULL_NV, BOUNDING_BOX_NV, or
40785bd8deadSopenharmony_ci    PATH_STROKE_COVER_MODE_NV.  The PATH_STROKE_COVER_MODE_NV uses
40795bd8deadSopenharmony_ci    the path object's PATH_STROKE_COVER_MODE_NV parameter value as the
40805bd8deadSopenharmony_ci    effective stroke cover mode of the cover command.
40815bd8deadSopenharmony_ci
40825bd8deadSopenharmony_ci    If /path/ does not name an existing path object, the command does
40835bd8deadSopenharmony_ci    nothing (and no error is generated).
40845bd8deadSopenharmony_ci
40855bd8deadSopenharmony_ci    Analogous to the rasterization guarantee of CoverFillPathNV with
40865bd8deadSopenharmony_ci    respect to StencilFillPathNV, CoverStrokePathNV guarantees that all
40875bd8deadSopenharmony_ci    samples rasterized by StencilStrokePathNV, given the same transforms
40885bd8deadSopenharmony_ci    and accessible pixels and stroke width, will also be rasterized by
40895bd8deadSopenharmony_ci    the corresponding CoverStrokePathNV.
40905bd8deadSopenharmony_ci
40915bd8deadSopenharmony_ci    CoverStrokePathNV /requires/ the following rasterization invariance:
40925bd8deadSopenharmony_ci    calling CoverStrokePathNV for the same (unchanged) path object with
40935bd8deadSopenharmony_ci    fixed (unchanged) modelview, projection, and viewport transform
40945bd8deadSopenharmony_ci    state and with the same (unchanged) set of accessible samples will
40955bd8deadSopenharmony_ci    rasterize the exact same set of samples with identical interpolated
40965bd8deadSopenharmony_ci    values for respective fragment/sample locations.
40975bd8deadSopenharmony_ci
40985bd8deadSopenharmony_ci    PATH COVERING RASTERIZATION DETAILS
40995bd8deadSopenharmony_ci
41005bd8deadSopenharmony_ci    The GL processes fragments rasterized by path cover commands in
41015bd8deadSopenharmony_ci    much the same manner as fragments generated by conventional polygon
41025bd8deadSopenharmony_ci    rasterization.  However path rendering /ignores/ the following
41035bd8deadSopenharmony_ci    operations:
41045bd8deadSopenharmony_ci
41055bd8deadSopenharmony_ci        *  Interpolation of per-vertex data (section 3.6.1).  Path
41065bd8deadSopenharmony_ci           primitives have neither conventional vertices nor per-vertex
41075bd8deadSopenharmony_ci           data.  Instead fragments generate interpolated per-fragment
41085bd8deadSopenharmony_ci           colors, texture coordinate sets, and fog coordinates as a
41095bd8deadSopenharmony_ci           linear function of object-space or eye-space path coordinate's
41105bd8deadSopenharmony_ci           or using the current color, texture coordinate set, or fog
41115bd8deadSopenharmony_ci           coordinate state directly.
41125bd8deadSopenharmony_ci
41135bd8deadSopenharmony_ci        *  Polygon smooth (section 3.6.3).
41145bd8deadSopenharmony_ci
41155bd8deadSopenharmony_ci        *  Polygon mode (section 3.6.4).  Fragments generated by path
41165bd8deadSopenharmony_ci           covering never result from point or line rasterizations.
41175bd8deadSopenharmony_ci
41185bd8deadSopenharmony_ci    Polygon stippling (section 3.6.2), depth offset (section 3.6.5), and
41195bd8deadSopenharmony_ci    polygon multisample rasterization (3.6.6) do apply to path covering.
41205bd8deadSopenharmony_ci
41215bd8deadSopenharmony_ci    Front and back face determination (explained in section 3.6.1 for
41225bd8deadSopenharmony_ci    polygons) operates somewhat differently for transformed paths than
41235bd8deadSopenharmony_ci    polygons.  The path's convex hull, bounding box, or multiple hulls
41245bd8deadSopenharmony_ci    (depending on the /coverMode/) are specified to wind counterclockwise
41255bd8deadSopenharmony_ci    in object space though the transformation of the convex hull into
41265bd8deadSopenharmony_ci    window space could reverse this winding.  Whether the GL's front face
41275bd8deadSopenharmony_ci    state is CCW or CCW (as set by the FrontFace command) determines
41285bd8deadSopenharmony_ci    if the path is front facing or not.  Because the specific vertices
41295bd8deadSopenharmony_ci    that belong to the covering geometry are implementation-dependent,
41305bd8deadSopenharmony_ci    when the signed area of the covering geometry (computed with equation
41315bd8deadSopenharmony_ci    3.8) is sufficiently near zero, the facingness of the path in such
41325bd8deadSopenharmony_ci    situations is ill-defined.
41335bd8deadSopenharmony_ci
41345bd8deadSopenharmony_ci    The determination of whether a path transformed into window space is
41355bd8deadSopenharmony_ci    front facing or not affects face culling if enabled (section 3.6.1),
41365bd8deadSopenharmony_ci    the gl_FrontFacing built-in variable (section 3.12.22), and separate
41375bd8deadSopenharmony_ci    (two-sided) stencil testing (section 4.1.5).
41385bd8deadSopenharmony_ci
41395bd8deadSopenharmony_ci    Once fragments have been generated by path covering, the fragments
41405bd8deadSopenharmony_ci    are shaded in the same manner as fragments generated by polygon
41415bd8deadSopenharmony_ci    rasterization with the following exception:  If a GLSL program is
41425bd8deadSopenharmony_ci    in use, any vertex or geometry shader linked into the GLSL program
41435bd8deadSopenharmony_ci    is ignored. The fragment shader operates normally except that
41445bd8deadSopenharmony_ci    user-defined inputs to the fragment shader behave as specified by
41455bd8deadSopenharmony_ci    ProgramPathFragmentInputGenNV. When supported, the fragment shader
41465bd8deadSopenharmony_ci    could also use the built-in varying inputs: gl_Texcoord[i],
41475bd8deadSopenharmony_ci    gl_Color, gl_SecondaryColor, and gl_FogFragCoord.
41485bd8deadSopenharmony_ci
41495bd8deadSopenharmony_ci    COLOR GENERATION FOR PATH COVER COMMANDS
41505bd8deadSopenharmony_ci
41515bd8deadSopenharmony_ci    The command
41525bd8deadSopenharmony_ci
41535bd8deadSopenharmony_ci        void PathColorGenNV(enum color,
41545bd8deadSopenharmony_ci                            enum genMode,
41555bd8deadSopenharmony_ci                            enum colorFormat, const float *coeffs);
41565bd8deadSopenharmony_ci
41575bd8deadSopenharmony_ci    controls how the primary and secondary interpolated colors are
41585bd8deadSopenharmony_ci    computed for fragment shading operations that occur as a result of
41595bd8deadSopenharmony_ci    CoverFillPathNV or CoverStrokePathNV.
41605bd8deadSopenharmony_ci
41615bd8deadSopenharmony_ci    /color/ must be one of PRIMARY_COLOR,
41625bd8deadSopenharmony_ci    PRIMARY_COLOR_NV, SECONDARY_COLOR_NV to specify the indicated color
41635bd8deadSopenharmony_ci    generation state for the primary, primary, and secondary color
41645bd8deadSopenharmony_ci    respectively; otherwise INVALID_ENUM is generated.
41655bd8deadSopenharmony_ci
41665bd8deadSopenharmony_ci    /genMode/ must be one of NONE, OBJECT_LINEAR,
41675bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV, EYE_LINEAR, or CONSTANT; otherwise
41685bd8deadSopenharmony_ci    INVALID_ENUM is generated.
41695bd8deadSopenharmony_ci
41705bd8deadSopenharmony_ci    NONE means the color is not generated but rather uses the
41715bd8deadSopenharmony_ci    corresponding color's current color state.  OBJECT_LINEAR means that
41725bd8deadSopenharmony_ci    the specified color is generated from a linear combination of the 2D
41735bd8deadSopenharmony_ci    path coordinates (x,y).  EYE_LINEAR means the specified color
41745bd8deadSopenharmony_ci    is generated from a linear combination of path's 2D coordinates
41755bd8deadSopenharmony_ci    transformed in eye space, so (xe, ye, ze, we) from section 2.12
41765bd8deadSopenharmony_ci    ("Fixed-Function Vertex Transformation").  CONSTANT means the specified
41775bd8deadSopenharmony_ci    color is generated from the specified constant coefficients.
41785bd8deadSopenharmony_ci
41795bd8deadSopenharmony_ci    When covering single paths with CoverFillPathNV or CoverStrokePathNV,
41805bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV means the specified color is generated
41815bd8deadSopenharmony_ci    as a function of object-space (x,y) coordinate normalized to the
41825bd8deadSopenharmony_ci    [0..1]x[0..1] range where (0,0) is the corner of the path object's
41835bd8deadSopenharmony_ci    bounding box with the minimum x and minimum y coordinates and (1,1)
41845bd8deadSopenharmony_ci    is the corner of the path object's bounding box with the maximum x and
41855bd8deadSopenharmony_ci    maximum y coordinates.  Using PATH_OBJECT_BOUND_BOX_NV for /genMode/
41865bd8deadSopenharmony_ci    means generated colors are undefined if either the width or height
41875bd8deadSopenharmony_ci    of the path's bounding box is zero.
41885bd8deadSopenharmony_ci
41895bd8deadSopenharmony_ci    When covering instanced paths with CoverFillPathInstancedNV or
41905bd8deadSopenharmony_ci    CoverStrokePathInstancedNV using the BOUNDING_BOX_OF_BOUNDING_BOXES_NV
41915bd8deadSopenharmony_ci    cover mode (see section 5.X.2.3), the specified color is generated
41925bd8deadSopenharmony_ci    as a function of object-space (x,y) coordinate normalized to the
41935bd8deadSopenharmony_ci    [0..1]x[0..1] range where (0,0) is the corner of the bounding box of
41945bd8deadSopenharmony_ci    the union of bounding boxes of the set of instanced path objects and
41955bd8deadSopenharmony_ci    (1,1) is the corner of the same union bounding box with the maximum
41965bd8deadSopenharmony_ci    x and maximum y coordinates.
41975bd8deadSopenharmony_ci
41985bd8deadSopenharmony_ci    When /genMode/ is NONE, then /colorFormat/ must be NONE;
41995bd8deadSopenharmony_ci    otherwise INVALID_ENUM is generated.  When /genMode/ is not NONE,
42005bd8deadSopenharmony_ci    then /colorFormat/ must be one of LUMINANCE, ALPHA, INTENSITY,
42015bd8deadSopenharmony_ci    LUMINANCE_ALPHA, RGB, or RGBA; otherwise INVALID_ENUM is generated.
42025bd8deadSopenharmony_ci
42035bd8deadSopenharmony_ci    In the following equations used for path color generation, coeffs[i]
42045bd8deadSopenharmony_ci    is the /i/th element (base zero) of the /coeffs/ array; Rc, Gc,
42055bd8deadSopenharmony_ci    Bc, and Aa are the red, green, blue, and alpha colors of the current
42065bd8deadSopenharmony_ci    primary or secondary color (depending on the color parameter) when the
42075bd8deadSopenharmony_ci    path is covered; and x, y, z, and w are determined by the /genMode/.
42085bd8deadSopenharmony_ci
42095bd8deadSopenharmony_ci    When /genMode/ is EYE_LINEAR, xcoeffs[i] is the /i/th element (base
42105bd8deadSopenharmony_ci    zero) of a /xcoeffs/ array generated by multiplying each respective
42115bd8deadSopenharmony_ci    vector of four elements of coeffs by the current inverse modelview
42125bd8deadSopenharmony_ci    matrix when PathColorGenNV is called.
42135bd8deadSopenharmony_ci
42145bd8deadSopenharmony_ci        xcoeffs[0..3]   = coeffs[0..3]   * MV^-1
42155bd8deadSopenharmony_ci        xcoeffs[4..7]   = coeffs[4..7]   * MV^-1
42165bd8deadSopenharmony_ci        xcoeffs[8..11]  = coeffs[8..11]  * MV^-1
42175bd8deadSopenharmony_ci        xcoeffs[12..15] = coeffs[12..12] * MV^-1
42185bd8deadSopenharmony_ci
42195bd8deadSopenharmony_ci    [[ NOTATION:
42205bd8deadSopenharmony_ci
42215bd8deadSopenharmony_ci       xxx[0..3] is a vector form from xxx[0], xxx[1], xxx[2], and xxx[3]
42225bd8deadSopenharmony_ci
42235bd8deadSopenharmony_ci       MV^-1 is the inverse of the current modelview matrix when PathColorGenNV happens.
42245bd8deadSopenharmony_ci
42255bd8deadSopenharmony_ci    ]]
42265bd8deadSopenharmony_ci
42275bd8deadSopenharmony_ci    If the /genMode/ is NONE, no values from the /coeffs/ array are
42285bd8deadSopenharmony_ci    accessed and the R, G, B, and A components of a covered fragment's
42295bd8deadSopenharmony_ci    varying color (be it primary or secondary depending on color)
42305bd8deadSopenharmony_ci    are computed:
42315bd8deadSopenharmony_ci
42325bd8deadSopenharmony_ci        R = Rc
42335bd8deadSopenharmony_ci        G = Gc
42345bd8deadSopenharmony_ci        B = Bc
42355bd8deadSopenharmony_ci        A = Ac
42365bd8deadSopenharmony_ci
42375bd8deadSopenharmony_ci    If /colorFormat/ is LUMINANCE and /genMode/ is either OBJECT_LINEAR
42385bd8deadSopenharmony_ci    or PATH_OBJECT_BOUNDING_BOX_NV, then 3 values are accessed from the
42395bd8deadSopenharmony_ci    /coeffs/ array and the R, G, B, and A components of a covered
42405bd8deadSopenharmony_ci    fragment's varying color are computed:
42415bd8deadSopenharmony_ci
42425bd8deadSopenharmony_ci        R = coeffs[0] * x + coeffs[1] * y + coeffs[2]
42435bd8deadSopenharmony_ci        G = coeffs[0] * x + coeffs[1] * y + coeffs[2]
42445bd8deadSopenharmony_ci        B = coeffs[0] * x + coeffs[1] * y + coeffs[2]
42455bd8deadSopenharmony_ci        A = Ac
42465bd8deadSopenharmony_ci
42475bd8deadSopenharmony_ci    Alternatively if the /genMode/ is EYE_LINEAR, then 4 values are
42485bd8deadSopenharmony_ci    accessed and the varying color components are computed:
42495bd8deadSopenharmony_ci
42505bd8deadSopenharmony_ci        R = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
42515bd8deadSopenharmony_ci        G = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
42525bd8deadSopenharmony_ci        B = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
42535bd8deadSopenharmony_ci        A = Ac
42545bd8deadSopenharmony_ci
42555bd8deadSopenharmony_ci    Alternatively if the /genMode/ is CONSTANT, then:
42565bd8deadSopenharmony_ci
42575bd8deadSopenharmony_ci        R = xcoeffs[0]
42585bd8deadSopenharmony_ci        G = xcoeffs[0]
42595bd8deadSopenharmony_ci        B = xcoeffs[0]
42605bd8deadSopenharmony_ci        A = Ac
42615bd8deadSopenharmony_ci
42625bd8deadSopenharmony_ci    If /colorFormat/ is INTENSITY and /genMode/ is either OBJECT_LINEAR
42635bd8deadSopenharmony_ci    or PATH_OBJECT_BOUNDING_BOX_NV, then 3 values are accessed from
42645bd8deadSopenharmony_ci    the /coeffs/ array and the R, G, B, and A components of a covered
42655bd8deadSopenharmony_ci    fragment's varying color are computed:
42665bd8deadSopenharmony_ci
42675bd8deadSopenharmony_ci        R = coeffs[0] * x + coeffs[1] * y + coeffs[2]
42685bd8deadSopenharmony_ci        G = coeffs[0] * x + coeffs[1] * y + coeffs[2]
42695bd8deadSopenharmony_ci        B = coeffs[0] * x + coeffs[1] * y + coeffs[2]
42705bd8deadSopenharmony_ci        A = coeffs[0] * x + coeffs[1] * y + coeffs[2]
42715bd8deadSopenharmony_ci
42725bd8deadSopenharmony_ci    Alternatively if the /genMode/ is EYE_LINEAR, then 4 values are
42735bd8deadSopenharmony_ci    accessed and the varying color components are computed:
42745bd8deadSopenharmony_ci
42755bd8deadSopenharmony_ci        R = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
42765bd8deadSopenharmony_ci        G = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
42775bd8deadSopenharmony_ci        B = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
42785bd8deadSopenharmony_ci        A = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
42795bd8deadSopenharmony_ci
42805bd8deadSopenharmony_ci    Alternatively if the /genMode/ is CONSTANT, then:
42815bd8deadSopenharmony_ci
42825bd8deadSopenharmony_ci        R = xcoeffs[0]
42835bd8deadSopenharmony_ci        G = xcoeffs[0]
42845bd8deadSopenharmony_ci        B = xcoeffs[0]
42855bd8deadSopenharmony_ci        A = xcoeffs[0]
42865bd8deadSopenharmony_ci
42875bd8deadSopenharmony_ci    If /colorFormat/ is ALPHA and /genMode/ is either OBJECT_LINEAR
42885bd8deadSopenharmony_ci    or PATH_OBJECT_BOUNDING_BOX_NV, then 3 values are accessed from
42895bd8deadSopenharmony_ci    the /coeffs/ array and the R, G, B, and A components of a covered
42905bd8deadSopenharmony_ci    fragment's varying color are computed:
42915bd8deadSopenharmony_ci
42925bd8deadSopenharmony_ci        R = Rc
42935bd8deadSopenharmony_ci        G = Gc
42945bd8deadSopenharmony_ci        B = Bc
42955bd8deadSopenharmony_ci        A = coeffs[0] * x + coeffs[1] * y + coeffs[2]
42965bd8deadSopenharmony_ci
42975bd8deadSopenharmony_ci    Alternatively if the /genMode/ is EYE_LINEAR, then 4 values are
42985bd8deadSopenharmony_ci    accessed and the varying color components are computed:
42995bd8deadSopenharmony_ci
43005bd8deadSopenharmony_ci        R = Rc
43015bd8deadSopenharmony_ci        G = Gc
43025bd8deadSopenharmony_ci        B = Bc
43035bd8deadSopenharmony_ci        A = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
43045bd8deadSopenharmony_ci
43055bd8deadSopenharmony_ci    Alternatively if the /genMode/ is CONSTANT, then:
43065bd8deadSopenharmony_ci
43075bd8deadSopenharmony_ci        R = Rc
43085bd8deadSopenharmony_ci        G = Gc
43095bd8deadSopenharmony_ci        B = Bc
43105bd8deadSopenharmony_ci        A = xcoeffs[0]
43115bd8deadSopenharmony_ci
43125bd8deadSopenharmony_ci    If /colorFormat/ is RGB and /genMode/ is either OBJECT_LINEAR or
43135bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV, then 9 values are accessed from the
43145bd8deadSopenharmony_ci    /coeffs/ array and the R, G, B, and A components of a covered
43155bd8deadSopenharmony_ci    fragment's varying color are computed:
43165bd8deadSopenharmony_ci
43175bd8deadSopenharmony_ci        R = coeffs[0] * x + coeffs[1] * y + coeffs[2]
43185bd8deadSopenharmony_ci        G = coeffs[3] * x + coeffs[4] * y + coeffs[5]
43195bd8deadSopenharmony_ci        B = coeffs[6] * x + coeffs[7] * y + coeffs[8]
43205bd8deadSopenharmony_ci        A = Ac
43215bd8deadSopenharmony_ci
43225bd8deadSopenharmony_ci    Alternatively if the /genMode/ is EYE_LINEAR, then 12 values are
43235bd8deadSopenharmony_ci    accessed and the varying color components are computed:
43245bd8deadSopenharmony_ci
43255bd8deadSopenharmony_ci        R = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2]  * ze + xcoeffs[3]  * we
43265bd8deadSopenharmony_ci        G = xcoeffs[4] * xe + xcoeffs[5] * ye + xcoeffs[6]  * ze + xcoeffs[7]  * we
43275bd8deadSopenharmony_ci        B = xcoeffs[8] * xe + xcoeffs[9] * ye + xcoeffs[10] * ze + xcoeffs[11] * we
43285bd8deadSopenharmony_ci        A = Ac
43295bd8deadSopenharmony_ci
43305bd8deadSopenharmony_ci    Alternatively if the /genMode/ is CONSTANT, then:
43315bd8deadSopenharmony_ci
43325bd8deadSopenharmony_ci        R = xcoeffs[0]
43335bd8deadSopenharmony_ci        G = xcoeffs[1]
43345bd8deadSopenharmony_ci        B = xcoeffs[2]
43355bd8deadSopenharmony_ci        A = Ac
43365bd8deadSopenharmony_ci
43375bd8deadSopenharmony_ci    If /colorFormat/ is RGBA and /genMode/ is either OBJECT_LINEAR
43385bd8deadSopenharmony_ci    or PATH_OBJECT_BOUNDING_BOX_NV, then 12 values are accessed from
43395bd8deadSopenharmony_ci    the /coeffs/ array and the R, G, B, and A components of a covered
43405bd8deadSopenharmony_ci    fragment's varying color are computed:
43415bd8deadSopenharmony_ci
43425bd8deadSopenharmony_ci        R = coeffs[0] * x + coeffs[1]  * y + coeffs[2]
43435bd8deadSopenharmony_ci        G = coeffs[3] * x + coeffs[4]  * y + coeffs[5]
43445bd8deadSopenharmony_ci        B = coeffs[6] * x + coeffs[7]  * y + coeffs[8]
43455bd8deadSopenharmony_ci        A = coeffs[9] * x + coeffs[10] * y + coeffs[11]
43465bd8deadSopenharmony_ci
43475bd8deadSopenharmony_ci    Alternatively if the /genMode/ is EYE_LINEAR, then 12 values are
43485bd8deadSopenharmony_ci    accessed and the varying color components are computed:
43495bd8deadSopenharmony_ci
43505bd8deadSopenharmony_ci        R = xcoeffs[0]  * xe + xcoeffs[1]  * ye + xcoeffs[2]  * ze + xcoeffs[3]  * we
43515bd8deadSopenharmony_ci        G = xcoeffs[4]  * xe + xcoeffs[5]  * ye + xcoeffs[6]  * ze + xcoeffs[7]  * we
43525bd8deadSopenharmony_ci        B = xcoeffs[8]  * xe + xcoeffs[9]  * ye + xcoeffs[10] * ze + xcoeffs[11] * we
43535bd8deadSopenharmony_ci        A = xcoeffs[12] * xe + xcoeffs[13] * ye + xcoeffs[14] * ze + xcoeffs[15] * we
43545bd8deadSopenharmony_ci
43555bd8deadSopenharmony_ci    Alternatively if the /genMode/ is CONSTANT, then:
43565bd8deadSopenharmony_ci
43575bd8deadSopenharmony_ci        R = xcoeffs[0]
43585bd8deadSopenharmony_ci        G = xcoeffs[1]
43595bd8deadSopenharmony_ci        B = xcoeffs[2]
43605bd8deadSopenharmony_ci        A = xcoeffs[3]
43615bd8deadSopenharmony_ci
43625bd8deadSopenharmony_ci    The state required for path color generation for each color (primary
43635bd8deadSopenharmony_ci    and secondary) is a four-valued integer for the path color generation
43645bd8deadSopenharmony_ci    mode and 16 floating-point coefficients.  The initial mode is NONE
43655bd8deadSopenharmony_ci    and the coefficients are all initially zero.
43665bd8deadSopenharmony_ci
43675bd8deadSopenharmony_ci    As many coefficients are copied by the PathColorGenNV command
43685bd8deadSopenharmony_ci    to the 16 floating-point coefficient state as are referenced by
43695bd8deadSopenharmony_ci    the respective generation expression involving /colorFormat/ and
43705bd8deadSopenharmony_ci    /genMode/; unreferenced coefficients in the array of 16 coefficients
43715bd8deadSopenharmony_ci    are set to zero.
43725bd8deadSopenharmony_ci
43735bd8deadSopenharmony_ci    TEXTURE COORDINATE SET GENERATION FOR PATH COVER COMMANDS
43745bd8deadSopenharmony_ci
43755bd8deadSopenharmony_ci    The command
43765bd8deadSopenharmony_ci
43775bd8deadSopenharmony_ci        void PathTexGenNV(enum texCoordSet,
43785bd8deadSopenharmony_ci                          enum genMode,
43795bd8deadSopenharmony_ci                          int components, const float *coeffs);
43805bd8deadSopenharmony_ci
43815bd8deadSopenharmony_ci    controls how texture coordinate sets are computed for fragment
43825bd8deadSopenharmony_ci    shading operations that occur as a result of CoverFillPathNV or
43835bd8deadSopenharmony_ci    CoverStrokePathNV.
43845bd8deadSopenharmony_ci
43855bd8deadSopenharmony_ci    /texCoordSet/ must be one of TEXTURE0 through
43865bd8deadSopenharmony_ci    TEXTUREn where /n/ is one less than the implementation-dependent
43875bd8deadSopenharmony_ci    value of MAX_TEXTURE_COORDS; otherwise INVALID_ENUM is generated.
43885bd8deadSopenharmony_ci
43895bd8deadSopenharmony_ci    /genMode/ must be one of NONE, OBJECT_LINEAR,
43905bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV, or EYE_LINEAR; otherwise INVALID_ENUM
43915bd8deadSopenharmony_ci    is generated.
43925bd8deadSopenharmony_ci
43935bd8deadSopenharmony_ci    /components/ must be 0 if /genMode/ is NONE or for other allowed
43945bd8deadSopenharmony_ci    /genMode/ values must be one of 1, 2, 3, or 4; otherwise INVALID_VALUE
43955bd8deadSopenharmony_ci    is generated.  /components/ determines how many texture coordinate
43965bd8deadSopenharmony_ci    components of the texture coordinate set, how many coefficients read
43975bd8deadSopenharmony_ci    from the /coeffs/ array, and the linear equations used to generate the
43985bd8deadSopenharmony_ci    s, t, r, and q texture coordinates of the varying texture coordinate
43995bd8deadSopenharmony_ci    set specified by /texCoordSet/.
44005bd8deadSopenharmony_ci
44015bd8deadSopenharmony_ci    In the following equations, coeffs[i] is the /i/th element (base
44025bd8deadSopenharmony_ci    zero) of the /coeffs/ array; sc, tc, rc, and qa are the s, t, r,
44035bd8deadSopenharmony_ci    and q texture coordinates of the texture coordinate set indicated
44045bd8deadSopenharmony_ci    by /texCoordSet/ when the path is covered; and x, y, z, and w are
44055bd8deadSopenharmony_ci    determined by the /genMode/ in the same manner as PathColorGenNV's
44065bd8deadSopenharmony_ci    /genMode/.
44075bd8deadSopenharmony_ci
44085bd8deadSopenharmony_ci    When /genMode/ is EYE_LINEAR, xcoeffs[i] is the /i/th element (base
44095bd8deadSopenharmony_ci    zero) of a /xcoeffs/ array generated by multiplying each respective
44105bd8deadSopenharmony_ci    vector of four elements of coeffs by the current inverse modelview
44115bd8deadSopenharmony_ci    matrix when PathColorGenNV is called.
44125bd8deadSopenharmony_ci
44135bd8deadSopenharmony_ci        xcoeffs[0..3]   = coeffs[0..3]   * MV^-1
44145bd8deadSopenharmony_ci        xcoeffs[4..7]   = coeffs[4..7]   * MV^-1
44155bd8deadSopenharmony_ci        xcoeffs[8..11]  = coeffs[8..11]  * MV^-1
44165bd8deadSopenharmony_ci        xcoeffs[12..15] = coeffs[12..12] * MV^-1
44175bd8deadSopenharmony_ci
44185bd8deadSopenharmony_ci    [[ NOTATION:
44195bd8deadSopenharmony_ci
44205bd8deadSopenharmony_ci       xxx[0..3] is a vector form from xxx[0], xxx[1], xxx[2], and xxx[3]
44215bd8deadSopenharmony_ci
44225bd8deadSopenharmony_ci       MV^-1 is the inverse of the current modelview matrix when PathColorGenNV happens.
44235bd8deadSopenharmony_ci
44245bd8deadSopenharmony_ci    ]]
44255bd8deadSopenharmony_ci
44265bd8deadSopenharmony_ci    If the /components/ is 0, no values from the /coeffs/ array are
44275bd8deadSopenharmony_ci    accessed and the s, t, r, and q coordinates of a covered fragment's
44285bd8deadSopenharmony_ci    varying texture coordinate set for /texCoordSet/ are computed:
44295bd8deadSopenharmony_ci
44305bd8deadSopenharmony_ci        s = sc
44315bd8deadSopenharmony_ci        t = tc
44325bd8deadSopenharmony_ci        r = rc
44335bd8deadSopenharmony_ci        q = qc
44345bd8deadSopenharmony_ci
44355bd8deadSopenharmony_ci    If the /components/ is 1 and /genMode/ is either OBJECT_LINEAR or
44365bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV, 3 values from the /coeffs/ array are
44375bd8deadSopenharmony_ci    accessed and the s, t, r, and q coordinates of a covered fragment's
44385bd8deadSopenharmony_ci    varying texture coordinate set for /texCoordSet/ are computed:
44395bd8deadSopenharmony_ci
44405bd8deadSopenharmony_ci        s = coeffs[0] * x + coeffs[1] * y + coeffs[2]
44415bd8deadSopenharmony_ci        t = tc
44425bd8deadSopenharmony_ci        r = rc
44435bd8deadSopenharmony_ci        q = qc
44445bd8deadSopenharmony_ci
44455bd8deadSopenharmony_ci    Alternatively if the /genMode/ is EYE_LINEAR, then 4 values are
44465bd8deadSopenharmony_ci    accessed and the varying texture coordinate set for /texunit/ are
44475bd8deadSopenharmony_ci    computed:
44485bd8deadSopenharmony_ci
44495bd8deadSopenharmony_ci        s = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
44505bd8deadSopenharmony_ci        t = tc
44515bd8deadSopenharmony_ci        r = rc
44525bd8deadSopenharmony_ci        q = qc
44535bd8deadSopenharmony_ci
44545bd8deadSopenharmony_ci    Alternatively if the /genMode/ is CONSTANT, then:
44555bd8deadSopenharmony_ci
44565bd8deadSopenharmony_ci        s = xcoeffs[0]
44575bd8deadSopenharmony_ci        t = tc
44585bd8deadSopenharmony_ci        r = rc
44595bd8deadSopenharmony_ci        q = qc
44605bd8deadSopenharmony_ci
44615bd8deadSopenharmony_ci    If the /components/ is 2 and /genMode/ is either OBJECT_LINEAR or
44625bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV, 6 values from the /coeffs/ array are accessed and the
44635bd8deadSopenharmony_ci    s, t, r, and q coordinates of a covered fragment's varying texture
44645bd8deadSopenharmony_ci    coordinate set for /texCoordSet/ are computed:
44655bd8deadSopenharmony_ci
44665bd8deadSopenharmony_ci        s = coeffs[0] * x + coeffs[1] * y + coeffs[2]
44675bd8deadSopenharmony_ci        t = coeffs[3] * x + coeffs[4] * y + coeffs[5]
44685bd8deadSopenharmony_ci        r = rc
44695bd8deadSopenharmony_ci        q = qc
44705bd8deadSopenharmony_ci
44715bd8deadSopenharmony_ci    Alternatively if the /genMode/ is EYE_LINEAR, then 8 values are
44725bd8deadSopenharmony_ci    accessed and the varying texture coordinate set for /texunit/ are
44735bd8deadSopenharmony_ci    computed:
44745bd8deadSopenharmony_ci
44755bd8deadSopenharmony_ci        s = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2] * ze + xcoeffs[3] * we
44765bd8deadSopenharmony_ci        t = xcoeffs[4] * xe + xcoeffs[5] * ye + xcoeffs[6] * ze + xcoeffs[7] * we
44775bd8deadSopenharmony_ci        r = rc
44785bd8deadSopenharmony_ci        q = qc
44795bd8deadSopenharmony_ci
44805bd8deadSopenharmony_ci    Alternatively if the /genMode/ is CONSTANT, then:
44815bd8deadSopenharmony_ci
44825bd8deadSopenharmony_ci        s = xcoeffs[0]
44835bd8deadSopenharmony_ci        t = xcoeffs[1]
44845bd8deadSopenharmony_ci        r = rc
44855bd8deadSopenharmony_ci        q = qc
44865bd8deadSopenharmony_ci
44875bd8deadSopenharmony_ci    If the /components/ is 3 and /genMode/ is either OBJECT_LINEAR or
44885bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV, 9 values from the /coeffs/ array are accessed and the
44895bd8deadSopenharmony_ci    s, t, r, and q coordinates of a covered fragment's varying texture
44905bd8deadSopenharmony_ci    coordinate set for /texCoordSet/ are computed:
44915bd8deadSopenharmony_ci
44925bd8deadSopenharmony_ci        s = coeffs[0] * x + coeffs[1] * y + coeffs[2]
44935bd8deadSopenharmony_ci        t = coeffs[3] * x + coeffs[4] * y + coeffs[5]
44945bd8deadSopenharmony_ci        r = coeffs[6] * x + coeffs[7] * y + coeffs[8]
44955bd8deadSopenharmony_ci        q = qc
44965bd8deadSopenharmony_ci
44975bd8deadSopenharmony_ci    Alternatively if the /genMode/ is CONSTANT, then:
44985bd8deadSopenharmony_ci
44995bd8deadSopenharmony_ci        s = xcoeffs[0]
45005bd8deadSopenharmony_ci        t = xcoeffs[1]
45015bd8deadSopenharmony_ci        r = xcoeffs[2]
45025bd8deadSopenharmony_ci        q = qc
45035bd8deadSopenharmony_ci
45045bd8deadSopenharmony_ci    Alternatively if the /genMode/ is EYE_LINEAR, then 12 values are
45055bd8deadSopenharmony_ci    accessed and the varying texture coordinate set for /texunit/ are
45065bd8deadSopenharmony_ci    computed:
45075bd8deadSopenharmony_ci
45085bd8deadSopenharmony_ci        s = xcoeffs[0] * xe + xcoeffs[1] * ye + xcoeffs[2]  * ze + xcoeffs[3]  * we
45095bd8deadSopenharmony_ci        t = xcoeffs[4] * xe + xcoeffs[5] * ye + xcoeffs[6]  * ze + xcoeffs[7]  * we
45105bd8deadSopenharmony_ci        r = xcoeffs[8] * xe + xcoeffs[9] * ye + xcoeffs[10] * ze + xcoeffs[11] * we
45115bd8deadSopenharmony_ci        q = qc
45125bd8deadSopenharmony_ci
45135bd8deadSopenharmony_ci    If the /components/ is 4 and /genMode/ is either OBJECT_LINEAR or
45145bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV, 12 values from the /coeffs/ array are accessed and the
45155bd8deadSopenharmony_ci    s, t, r, and q coordinates of a covered fragment's varying texture
45165bd8deadSopenharmony_ci    coordinate set for /texCoordSet/ are computed:
45175bd8deadSopenharmony_ci
45185bd8deadSopenharmony_ci        s = coeffs[0] * x + coeffs[1]  * y + coeffs[2]
45195bd8deadSopenharmony_ci        t = coeffs[3] * x + coeffs[4]  * y + coeffs[5]
45205bd8deadSopenharmony_ci        r = coeffs[6] * x + coeffs[7]  * y + coeffs[8]
45215bd8deadSopenharmony_ci        q = coeffs[9] * x + coeffs[10] * y + coeffs[11]
45225bd8deadSopenharmony_ci
45235bd8deadSopenharmony_ci    Alternatively if the /genMode/ is EYE_LINEAR, then 16 values are
45245bd8deadSopenharmony_ci    accessed and the varying texture coordinate set for /texunit/ are
45255bd8deadSopenharmony_ci    computed:
45265bd8deadSopenharmony_ci
45275bd8deadSopenharmony_ci        s = xcoeffs[0]  * xe + xcoeffs[1]  * ye + xcoeffs[2]  * ze + xcoeffs[3]  * we
45285bd8deadSopenharmony_ci        t = xcoeffs[4]  * xe + xcoeffs[5]  * ye + xcoeffs[6]  * ze + xcoeffs[7]  * we
45295bd8deadSopenharmony_ci        r = xcoeffs[8]  * xe + xcoeffs[9]  * ye + xcoeffs[10] * ze + xcoeffs[11] * we
45305bd8deadSopenharmony_ci        q = xcoeffs[12] * xe + xcoeffs[13] * ye + xcoeffs[14] * ze + xcoeffs[15] * we
45315bd8deadSopenharmony_ci
45325bd8deadSopenharmony_ci    Alternatively if the /genMode/ is CONSTANT, then:
45335bd8deadSopenharmony_ci
45345bd8deadSopenharmony_ci        s = xcoeffs[0]
45355bd8deadSopenharmony_ci        t = xcoeffs[1]
45365bd8deadSopenharmony_ci        r = xcoeffs[2]
45375bd8deadSopenharmony_ci        q = xcoeffs[3]
45385bd8deadSopenharmony_ci
45395bd8deadSopenharmony_ci    The state required for path color generation for each texture
45405bd8deadSopenharmony_ci    coordinate set is a four-valued integer for the path texture
45415bd8deadSopenharmony_ci    coordinate set generation mode and 16 floating-point coefficients.
45425bd8deadSopenharmony_ci    The initial mode is NONE and the coefficients are all initially zero.
45435bd8deadSopenharmony_ci
45445bd8deadSopenharmony_ci    As many coefficients are copied by the PathTexGenNV command to
45455bd8deadSopenharmony_ci    the 16 floating-point coefficient state as are referenced by the
45465bd8deadSopenharmony_ci    respective generation expression involving /components/ and /genMode/;
45475bd8deadSopenharmony_ci    unreferenced coefficients in the array of 16 coefficients are set
45485bd8deadSopenharmony_ci    to zero.
45495bd8deadSopenharmony_ci
45505bd8deadSopenharmony_ci    FOG COORDINATE GENERATION FOR PATH COVER COMMANDS
45515bd8deadSopenharmony_ci
45525bd8deadSopenharmony_ci    The command
45535bd8deadSopenharmony_ci
45545bd8deadSopenharmony_ci        void PathFogGenNV(enum genMode);
45555bd8deadSopenharmony_ci
45565bd8deadSopenharmony_ci    controls how the fog coordinate is computed for fragment
45575bd8deadSopenharmony_ci    shading operations that occur as a result of CoverFillPathNV or
45585bd8deadSopenharmony_ci    CoverStrokePathNV.
45595bd8deadSopenharmony_ci
45605bd8deadSopenharmony_ci    /genMode/ must be either FOG_COORDINATE or FRAGMENT_DEPTH; otherwise
45615bd8deadSopenharmony_ci    INVALID_ENUM is generated.
45625bd8deadSopenharmony_ci
45635bd8deadSopenharmony_ci    If the /genMode/ is FOG_COORDINATE, then current fog coordinate is
45645bd8deadSopenharmony_ci    used (without varying) for all fragment generated by covering the
45655bd8deadSopenharmony_ci    filled or stroked path.
45665bd8deadSopenharmony_ci
45675bd8deadSopenharmony_ci    If the /genMode/ is FRAGMENT_DEPTH, then the current fog coordinate
45685bd8deadSopenharmony_ci    is -ze, the interpolated negated (non-perspective-divided) eye-space
45695bd8deadSopenharmony_ci    Z coordinate from transforming of path's 2D coordinates transformed
45705bd8deadSopenharmony_ci    in eye space, so (xe, ye, ze, we) from section 2.12 ("Fixed-Function
45715bd8deadSopenharmony_ci    Vertex Transformation").
45725bd8deadSopenharmony_ci
45735bd8deadSopenharmony_ci    The state required for path fog generation is a two-valued integer for
45745bd8deadSopenharmony_ci    the path fog generation mode; the mode is initially FRAGMENT_DEPTH.
45755bd8deadSopenharmony_ci
45765bd8deadSopenharmony_ci    5.X.2.3 Instanced Path Stenciling and Covering
45775bd8deadSopenharmony_ci
45785bd8deadSopenharmony_ci    Path rendering often depends on rendering a collection of paths at
45795bd8deadSopenharmony_ci    once. The most common case of this is rendering text as a set of
45805bd8deadSopenharmony_ci    glyphs corresponding to each character of text.  To support this
45815bd8deadSopenharmony_ci    usage efficiently, GL includes commands for instanced path stenciling
45825bd8deadSopenharmony_ci    and covering.
45835bd8deadSopenharmony_ci
45845bd8deadSopenharmony_ci    The command
45855bd8deadSopenharmony_ci
45865bd8deadSopenharmony_ci        void StencilFillPathInstancedNV(sizei numPaths,
45875bd8deadSopenharmony_ci                                        enum pathNameType, const void *paths,
45885bd8deadSopenharmony_ci                                        uint pathBase,
45895bd8deadSopenharmony_ci                                        enum fillMode, uint mask,
45905bd8deadSopenharmony_ci                                        enum transformType,
45915bd8deadSopenharmony_ci                                        const float *transformValues);
45925bd8deadSopenharmony_ci
45935bd8deadSopenharmony_ci    stencils a sequence of filled paths.
45945bd8deadSopenharmony_ci
45955bd8deadSopenharmony_ci    The /pathBase/ is an offset added to the /numPaths/ path names read
45965bd8deadSopenharmony_ci    from the /paths/ array (interpreted based on /pathNameType/).
45975bd8deadSopenharmony_ci
45985bd8deadSopenharmony_ci    The /pathNameType/ determines the type of elements of the /paths/
45995bd8deadSopenharmony_ci    array and must be one of BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT,
46005bd8deadSopenharmony_ci    INT, UNSIGNED_INT, FLOAT, UTF8_NV, UTF16_NV, 2_BYTES, 3_BYTES,
46015bd8deadSopenharmony_ci    or 4_BYTES; otherwise the INVALID_ENUM error is generated.
46025bd8deadSopenharmony_ci
46035bd8deadSopenharmony_ci    The /transformType/ must be one of NONE, TRANSLATE_X_NV,
46045bd8deadSopenharmony_ci    TRANSLATE_Y_NV, TRANSLATE_2D_NV, TRANSLATE_3D_NV, AFFINE_2D_NV,
46055bd8deadSopenharmony_ci    AFFINE_3D_NV, TRANSPOSE_AFFINE_2D_NV, or TRANSPOSE_AFFINE_3D_NV;
46065bd8deadSopenharmony_ci    otherwise the INVALID_ENUM error is generated.
46075bd8deadSopenharmony_ci
46085bd8deadSopenharmony_ci    The /fillMode/ and /mask/ are validated identically to the same-named
46095bd8deadSopenharmony_ci    parameters of StencilFillPathNV.
46105bd8deadSopenharmony_ci
46115bd8deadSopenharmony_ci    The StencilFillPathInstancedNV command is equivalent to:
46125bd8deadSopenharmony_ci
46135bd8deadSopenharmony_ci        const float *v = transformValues;
46145bd8deadSopenharmony_ci        for (int i = 0; i<numPaths; i++) {
46155bd8deadSopenharmony_ci          double m[16];
46165bd8deadSopenharmony_ci
46175bd8deadSopenharmony_ci          GetDoublev(MODELVIEW_MATRIX, m);  // save matrix
46185bd8deadSopenharmony_ci          v = applyTransformType(transformType, v);
46195bd8deadSopenharmony_ci          uint pathName;
46205bd8deadSopenharmony_ci          bool ok = getPathName(pathNameType, paths, pathBase, pathName);
46215bd8deadSopenharmony_ci          if (!ok)
46225bd8deadSopenharmony_ci            return;  // stop early
46235bd8deadSopenharmony_ci          if (IsPathNV(pathName)) {
46245bd8deadSopenharmony_ci            StencilFillPathNV(pathName, fillMode, mask);
46255bd8deadSopenharmony_ci          }
46265bd8deadSopenharmony_ci          MatrixLoaddEXT(MODELVIEW, m);  // restore matrix
46275bd8deadSopenharmony_ci        }
46285bd8deadSopenharmony_ci
46295bd8deadSopenharmony_ci    assuming these helper functions for applyTransformType and
46305bd8deadSopenharmony_ci    getPathName:
46315bd8deadSopenharmony_ci
46325bd8deadSopenharmony_ci        const float *applyTransformType(enum transformType, const float *v)
46335bd8deadSopenharmony_ci        {
46345bd8deadSopenharmony_ci          float m[16];
46355bd8deadSopenharmony_ci          switch (transformType) {
46365bd8deadSopenharmony_ci          case NONE:
46375bd8deadSopenharmony_ci            break;
46385bd8deadSopenharmony_ci          case TRANSLATE_X_NV:
46395bd8deadSopenharmony_ci            MatrixTranslateEXT(MODELVIEW, *v++, 0, 0);
46405bd8deadSopenharmony_ci            break;
46415bd8deadSopenharmony_ci          case TRANSLATE_Y_NV:
46425bd8deadSopenharmony_ci            MatrixTranslateEXT(MODELVIEW, 0, *v++, 0);
46435bd8deadSopenharmony_ci            break;
46445bd8deadSopenharmony_ci          case TRANSLATE_2D_NV:
46455bd8deadSopenharmony_ci            MatrixTranslateEXT(MODELVIEW, *v++, *v++, 0);
46465bd8deadSopenharmony_ci            break;
46475bd8deadSopenharmony_ci          case TRANSLATE_3D_NV:
46485bd8deadSopenharmony_ci            MatrixTranslateEXT(MODELVIEW, *v++, *v++, *v++);
46495bd8deadSopenharmony_ci            break;
46505bd8deadSopenharmony_ci          case AFFINE_2D_NV:
46515bd8deadSopenharmony_ci            m[0] =v[0]; m[4] =v[2]; m[8] =0; m[12]=v[4];
46525bd8deadSopenharmony_ci            m[1] =v[1]; m[5] =v[3]; m[9] =0; m[13]=v[5];
46535bd8deadSopenharmony_ci            m[2] =0;    m[6] =0;    m[10]=1; m[14]=0;
46545bd8deadSopenharmony_ci            m[3] =0;    m[7] =0;    m[11]=0; m[15]=1;
46555bd8deadSopenharmony_ci            v += 6;
46565bd8deadSopenharmony_ci            MatrixMultfEXT(MODELVIEW, m);
46575bd8deadSopenharmony_ci            break;
46585bd8deadSopenharmony_ci          case TRANSPOSE_AFFINE_2D_NV:
46595bd8deadSopenharmony_ci            m[0] =v[0]; m[4] =v[1]; m[8] =0; m[12]=v[2];
46605bd8deadSopenharmony_ci            m[1] =v[3]; m[5] =v[4]; m[9] =0; m[13]=v[5];
46615bd8deadSopenharmony_ci            m[2] =0;    m[6] =0;    m[10]=1; m[14]=0;
46625bd8deadSopenharmony_ci            m[3] =0;    m[7] =0;    m[11]=0; m[15]=1;
46635bd8deadSopenharmony_ci            v += 6;
46645bd8deadSopenharmony_ci            MatrixMultfEXT(MODELVIEW, m);
46655bd8deadSopenharmony_ci            break;
46665bd8deadSopenharmony_ci          case AFFINE_3D_NV:
46675bd8deadSopenharmony_ci            m[0] =v[0]; m[4] =v[3]; m[8] =v[6]; m[12]=v[9];
46685bd8deadSopenharmony_ci            m[1] =v[1]; m[5] =v[4]; m[9] =v[7]; m[13]=v[10];
46695bd8deadSopenharmony_ci            m[2] =v[2]; m[6] =v[5]; m[10]=v[8]; m[14]=v[11];
46705bd8deadSopenharmony_ci            m[3] =0;    m[7] =0;    m[11]=1;    m[15]=0;
46715bd8deadSopenharmony_ci            v += 12;
46725bd8deadSopenharmony_ci            MatrixMultfEXT(MODELVIEW, m);
46735bd8deadSopenharmony_ci            break;
46745bd8deadSopenharmony_ci          case TRANSPOSE_AFFINE_3D_NV:
46755bd8deadSopenharmony_ci            m[0] =v[0]; m[4] =v[1]; m[8] =v[2];  m[12]=v[3];
46765bd8deadSopenharmony_ci            m[1] =v[4]; m[5] =v[5]; m[9] =v[6];  m[13]=v[7];
46775bd8deadSopenharmony_ci            m[2] =v[8]; m[6] =v[9]; m[10]=v[10]; m[14]=v[11];
46785bd8deadSopenharmony_ci            m[3] =0;    m[7] =0;    m[11]=1;     m[15]=0;
46795bd8deadSopenharmony_ci            v += 12;
46805bd8deadSopenharmony_ci            MatrixMultfEXT(MODELVIEW, m);
46815bd8deadSopenharmony_ci            break;
46825bd8deadSopenharmony_ci          default:  // generate INVALID_ENUM
46835bd8deadSopenharmony_ci          }
46845bd8deadSopenharmony_ci          return v;
46855bd8deadSopenharmony_ci        }
46865bd8deadSopenharmony_ci
46875bd8deadSopenharmony_ci        bool getPathName(enum pathNameType, const void *&paths,
46885bd8deadSopenharmony_ci                         uint pathBase, uint &pathName)
46895bd8deadSopenharmony_ci        {
46905bd8deadSopenharmony_ci          switch (pathNameType) {
46915bd8deadSopenharmony_ci          case BYTE:
46925bd8deadSopenharmony_ci            {
46935bd8deadSopenharmony_ci              const byte *p = (const byte*)paths;
46945bd8deadSopenharmony_ci              pathName = pathBase + p[0];
46955bd8deadSopenharmony_ci              paths = p+1;
46965bd8deadSopenharmony_ci              return true;
46975bd8deadSopenharmony_ci            }
46985bd8deadSopenharmony_ci          case UNSIGNED_BYTE:
46995bd8deadSopenharmony_ci            {
47005bd8deadSopenharmony_ci              const ubyte *p = (const ubyte*)paths;
47015bd8deadSopenharmony_ci              pathName = pathBase + p[0];
47025bd8deadSopenharmony_ci              paths = p+1;
47035bd8deadSopenharmony_ci              return true;
47045bd8deadSopenharmony_ci            }
47055bd8deadSopenharmony_ci          case SHORT:
47065bd8deadSopenharmony_ci            {
47075bd8deadSopenharmony_ci              const short *p = (const short*)paths;
47085bd8deadSopenharmony_ci              pathName = pathBase + p[0];
47095bd8deadSopenharmony_ci              paths = p+1;
47105bd8deadSopenharmony_ci              return true;
47115bd8deadSopenharmony_ci            }
47125bd8deadSopenharmony_ci          case UNSIGNED_SHORT:
47135bd8deadSopenharmony_ci            {
47145bd8deadSopenharmony_ci              const ushort *p = (const ushort*)paths;
47155bd8deadSopenharmony_ci              pathName = pathBase + p[0];
47165bd8deadSopenharmony_ci              paths = p+1;
47175bd8deadSopenharmony_ci              return true;
47185bd8deadSopenharmony_ci            }
47195bd8deadSopenharmony_ci          case INT:
47205bd8deadSopenharmony_ci            {
47215bd8deadSopenharmony_ci              const int *p = (const int*)paths;
47225bd8deadSopenharmony_ci              pathName = pathBase + p[0];
47235bd8deadSopenharmony_ci              paths = p+1;
47245bd8deadSopenharmony_ci              return true;
47255bd8deadSopenharmony_ci            }
47265bd8deadSopenharmony_ci          case UNSIGNED_INT:
47275bd8deadSopenharmony_ci            {
47285bd8deadSopenharmony_ci              const uint *p = (const uint*)paths;
47295bd8deadSopenharmony_ci              pathName = pathBase + p[0];
47305bd8deadSopenharmony_ci              paths = p+1;
47315bd8deadSopenharmony_ci              return true;
47325bd8deadSopenharmony_ci            }
47335bd8deadSopenharmony_ci          case FLOAT:
47345bd8deadSopenharmony_ci            {
47355bd8deadSopenharmony_ci              const float *p = (const float*)paths;
47365bd8deadSopenharmony_ci              pathName = pathBase + p[0];
47375bd8deadSopenharmony_ci              paths = p+1;
47385bd8deadSopenharmony_ci              return true;
47395bd8deadSopenharmony_ci            }
47405bd8deadSopenharmony_ci          case 2_BYTES:
47415bd8deadSopenharmony_ci            {
47425bd8deadSopenharmony_ci              const ubyte *p = (const ubyte*)paths;
47435bd8deadSopenharmony_ci              pathName = pathBase + (p[0]<<8 | p[1]);
47445bd8deadSopenharmony_ci              paths = p+2;
47455bd8deadSopenharmony_ci              return true;
47465bd8deadSopenharmony_ci            }
47475bd8deadSopenharmony_ci          case 3_BYTES:
47485bd8deadSopenharmony_ci            {
47495bd8deadSopenharmony_ci              const ubyte *p = (const ubyte*)paths;
47505bd8deadSopenharmony_ci              pathName = pathBase + (p[0]<<16 | p[1]<<8 | p[0]);
47515bd8deadSopenharmony_ci              paths = p+3;
47525bd8deadSopenharmony_ci              return true;
47535bd8deadSopenharmony_ci            }
47545bd8deadSopenharmony_ci          case 4_BYTES:
47555bd8deadSopenharmony_ci            {
47565bd8deadSopenharmony_ci              const ubyte *p = (const ubyte*)paths;
47575bd8deadSopenharmony_ci              pathName = pathBase + (p[0]<<24 | p[1]<<16 | p[2]<<8 | p[3]);
47585bd8deadSopenharmony_ci              paths = p+4;
47595bd8deadSopenharmony_ci              return true;
47605bd8deadSopenharmony_ci            }
47615bd8deadSopenharmony_ci          case UTF8_NV:
47625bd8deadSopenharmony_ci            {
47635bd8deadSopenharmony_ci              const ubyte *p = (const ubyte*)paths;
47645bd8deadSopenharmony_ci              ubyte c0 = p[0];
47655bd8deadSopenharmony_ci              if ((c0 & 0x80) == 0x00) {
47665bd8deadSopenharmony_ci                // Zero continuation (0 to 127)
47675bd8deadSopenharmony_ci                pathName = pathBase + c0;
47685bd8deadSopenharmony_ci                p += 1;
47695bd8deadSopenharmony_ci              } else {
47705bd8deadSopenharmony_ci                ubyte c1 = p[1];
47715bd8deadSopenharmony_ci                if ((c1 & 0xC0) != 0x80) {
47725bd8deadSopenharmony_ci                  // Stop processing the UTF byte sequence early.
47735bd8deadSopenharmony_ci                  return false;
47745bd8deadSopenharmony_ci                }
47755bd8deadSopenharmony_ci                if ((c0 & 0xE0) == 0xC0) {
47765bd8deadSopenharmony_ci                  // One contination (128 to 2047)
47775bd8deadSopenharmony_ci                  pathName = pathBase + ((c1 & 0x3F) | (c0 & 0x1F) << 6);
47785bd8deadSopenharmony_ci                  if (pathName < 128) {
47795bd8deadSopenharmony_ci                    return false;
47805bd8deadSopenharmony_ci                  }
47815bd8deadSopenharmony_ci                  p += 2;
47825bd8deadSopenharmony_ci                } else {
47835bd8deadSopenharmony_ci                  ubyte c2 = p[2];
47845bd8deadSopenharmony_ci                  if ((c2 & 0xC0) != 0x80) {
47855bd8deadSopenharmony_ci                    // Stop processing the UTF byte sequence early.
47865bd8deadSopenharmony_ci                    return false;
47875bd8deadSopenharmony_ci                  }
47885bd8deadSopenharmony_ci                  if ((c0 & 0xF0) == 0xE0) {
47895bd8deadSopenharmony_ci                    // Two continuation (2048 to 55295 and 57344 to 65535)
47905bd8deadSopenharmony_ci                    pathName = pathBase + ((c2 & 0x3F) | (c1 & 0x3F) << 6 |
47915bd8deadSopenharmony_ci                                           (c0 & 0xF) << 12);
47925bd8deadSopenharmony_ci                    if ((pathName >= 55296) && (pathName <= 57343)) {
47935bd8deadSopenharmony_ci                      // Stop processing the UTF byte sequence early.
47945bd8deadSopenharmony_ci                      return false;
47955bd8deadSopenharmony_ci                    }
47965bd8deadSopenharmony_ci                    if (pathName < 2048) {
47975bd8deadSopenharmony_ci                      return false;
47985bd8deadSopenharmony_ci                    }
47995bd8deadSopenharmony_ci                    p += 3;
48005bd8deadSopenharmony_ci                  } else {
48015bd8deadSopenharmony_ci                    ubyte c3 = p[3];
48025bd8deadSopenharmony_ci                    if ((c3 & 0xC0) != 0x80) {
48035bd8deadSopenharmony_ci                      // Stop processing the UTF byte sequence early.
48045bd8deadSopenharmony_ci                      return false;
48055bd8deadSopenharmony_ci                    }
48065bd8deadSopenharmony_ci                    if ((c0 & 0xF8) == 0xF0) {
48075bd8deadSopenharmony_ci                      // Three continuation (65536 to 1114111)
48085bd8deadSopenharmony_ci                      pathName = pathBase + ((c3 & 0x3F) | (c2 & 0x3F) << 6 |
48095bd8deadSopenharmony_ci                                             (c1 & 0x3F) << 12 | (c0 & 0x7) << 18);
48105bd8deadSopenharmony_ci                      if (pathName < 65536 && pathName > 1114111) {
48115bd8deadSopenharmony_ci                        return false;
48125bd8deadSopenharmony_ci                      }
48135bd8deadSopenharmony_ci                      p += 4;
48145bd8deadSopenharmony_ci                    } else {
48155bd8deadSopenharmony_ci                      // Skip invalid or restricted encodings.
48165bd8deadSopenharmony_ci                      // Stop processing the UTF byte sequence early.
48175bd8deadSopenharmony_ci                      return false;
48185bd8deadSopenharmony_ci                    }
48195bd8deadSopenharmony_ci                  }
48205bd8deadSopenharmony_ci                }
48215bd8deadSopenharmony_ci              }
48225bd8deadSopenharmony_ci              paths = p;
48235bd8deadSopenharmony_ci              return true;
48245bd8deadSopenharmony_ci            }
48255bd8deadSopenharmony_ci          case UTF16_NV:
48265bd8deadSopenharmony_ci            {
48275bd8deadSopenharmony_ci              const ushort *p = (const ushort*)paths;
48285bd8deadSopenharmony_ci
48295bd8deadSopenharmony_ci              ushort s0 = p[0];
48305bd8deadSopenharmony_ci              if ((s0 < 0xDB00) || (s0 > 0xDFFF)) {
48315bd8deadSopenharmony_ci                  pathName = pathBase + s0;
48325bd8deadSopenharmony_ci                  p += 1;
48335bd8deadSopenharmony_ci              } else {
48345bd8deadSopenharmony_ci                if ((s0 >= 0xDB00) && (s0 <= 0xDBFF)) {
48355bd8deadSopenharmony_ci                  ushort s1 = p[1];
48365bd8deadSopenharmony_ci                  if ((s1 >= 0xDC00) && (s1 <= 0xDFFF)) {
48375bd8deadSopenharmony_ci                    pathName = pathBase + (((s0 & 0x3FF) << 10 |
48385bd8deadSopenharmony_ci                                            (s1 & 0x3FF)) + 0x10000);
48395bd8deadSopenharmony_ci                    p += 2;
48405bd8deadSopenharmony_ci                  } else {
48415bd8deadSopenharmony_ci                    // Stop processing the UTF byte sequence early.
48425bd8deadSopenharmony_ci                    return false;
48435bd8deadSopenharmony_ci                  }
48445bd8deadSopenharmony_ci                } else {
48455bd8deadSopenharmony_ci                  return false;
48465bd8deadSopenharmony_ci                }
48475bd8deadSopenharmony_ci              }
48485bd8deadSopenharmony_ci              paths = p;
48495bd8deadSopenharmony_ci              return true;
48505bd8deadSopenharmony_ci            }
48515bd8deadSopenharmony_ci          default:
48525bd8deadSopenharmony_ci              << generate INVALID_ENUM >>
48535bd8deadSopenharmony_ci              return false;
48545bd8deadSopenharmony_ci          }
48555bd8deadSopenharmony_ci        }
48565bd8deadSopenharmony_ci
48575bd8deadSopenharmony_ci    The command
48585bd8deadSopenharmony_ci
48595bd8deadSopenharmony_ci        void StencilStrokePathInstancedNV(sizei numPaths,
48605bd8deadSopenharmony_ci                                          enum pathNameType, const void *paths,
48615bd8deadSopenharmony_ci                                          uint pathBase,
48625bd8deadSopenharmony_ci                                          int reference, uint mask,
48635bd8deadSopenharmony_ci                                          enum transformType,
48645bd8deadSopenharmony_ci                                          const float *transformValues);
48655bd8deadSopenharmony_ci
48665bd8deadSopenharmony_ci    stencils a sequence of stroked paths and is equivalent to:
48675bd8deadSopenharmony_ci
48685bd8deadSopenharmony_ci        const float *v = transformValues;
48695bd8deadSopenharmony_ci        for (int i = 0; i<numPaths; i++) {
48705bd8deadSopenharmony_ci          double m[16];
48715bd8deadSopenharmony_ci
48725bd8deadSopenharmony_ci          GetDoublev(MODELVIEW_MATRIX, m);  // save matrix
48735bd8deadSopenharmony_ci          v = applyTransformType(transformType, v);
48745bd8deadSopenharmony_ci          uint pathName;
48755bd8deadSopenharmony_ci          bool ok = getPathName(pathNameType, paths, pathBase, pathName);
48765bd8deadSopenharmony_ci          if (!ok)
48775bd8deadSopenharmony_ci            return;  // stop early
48785bd8deadSopenharmony_ci          if (IsPathNV(pathName)) {
48795bd8deadSopenharmony_ci            StencilStrokePathNV(pathName, reference, mask);
48805bd8deadSopenharmony_ci          }
48815bd8deadSopenharmony_ci          MatrixLoaddEXT(MODELVIEW, m);  // restore matrix
48825bd8deadSopenharmony_ci        }
48835bd8deadSopenharmony_ci
48845bd8deadSopenharmony_ci    assume the helper functions for applyTransformType and
48855bd8deadSopenharmony_ci    getPathName defined above.
48865bd8deadSopenharmony_ci
48875bd8deadSopenharmony_ci    The command
48885bd8deadSopenharmony_ci
48895bd8deadSopenharmony_ci        void CoverFillPathInstancedNV(sizei numPaths,
48905bd8deadSopenharmony_ci                                      enum pathNameType, const void *paths,
48915bd8deadSopenharmony_ci                                      uint pathBase,
48925bd8deadSopenharmony_ci                                      enum coverMode,
48935bd8deadSopenharmony_ci                                      enum transformType,
48945bd8deadSopenharmony_ci                                      const float *transformValues);
48955bd8deadSopenharmony_ci
48965bd8deadSopenharmony_ci    covers a sequence of filled paths and is equivalent to:
48975bd8deadSopenharmony_ci
48985bd8deadSopenharmony_ci        if (coverMode == BOUNDING_BOX_OF_BOUNDING_BOXES_NV) {
48995bd8deadSopenharmony_ci          renderBoundingBox(PATH_FILL_BOUNDING_BOX_NV,
49005bd8deadSopenharmony_ci                            numPaths,
49015bd8deadSopenharmony_ci                            pathNameType, paths,
49025bd8deadSopenharmony_ci                            pathBase,
49035bd8deadSopenharmony_ci                            transformType, transformValues);
49045bd8deadSopenharmony_ci        } else {
49055bd8deadSopenharmony_ci          const float *v = transformValues;
49065bd8deadSopenharmony_ci          for (int i = 0; i<numPaths; i++) {
49075bd8deadSopenharmony_ci            double m[16];
49085bd8deadSopenharmony_ci            uint path;
49095bd8deadSopenharmony_ci
49105bd8deadSopenharmony_ci            GetDoublev(MODELVIEW_MATRIX, m);  // save matrix
49115bd8deadSopenharmony_ci            v = applyTransformType(transformType, v);
49125bd8deadSopenharmony_ci            uint pathName;
49135bd8deadSopenharmony_ci            bool ok = getPathName(pathNameType, paths, pathBase, pathName);
49145bd8deadSopenharmony_ci            if (!ok)
49155bd8deadSopenharmony_ci              return;  // stop early
49165bd8deadSopenharmony_ci            if (IsPathNV(pathName)) {
49175bd8deadSopenharmony_ci              << set fragment shader instance ID to i >>
49185bd8deadSopenharmony_ci              CoverFillPathNV(pathName, cover);
49195bd8deadSopenharmony_ci            }
49205bd8deadSopenharmony_ci            MatrixLoaddEXT(MODELVIEW, m);  // restore matrix
49215bd8deadSopenharmony_ci          }
49225bd8deadSopenharmony_ci        }
49235bd8deadSopenharmony_ci
49245bd8deadSopenharmony_ci    assuming these helper functions for applyTransformType and
49255bd8deadSopenharmony_ci    getPathName defined above as well as:
49265bd8deadSopenharmony_ci
49275bd8deadSopenharmony_ci        void renderBoundingBox(enum boundingBoxType,
49285bd8deadSopenharmony_ci                               sizei numPaths,
49295bd8deadSopenharmony_ci                               enum pathNameType,
49305bd8deadSopenharmony_ci                               const void *paths,
49315bd8deadSopenharmony_ci                               uint pathBase,
49325bd8deadSopenharmony_ci                               enum transformType,
49335bd8deadSopenharmony_ci                               const float *transformValues)
49345bd8deadSopenharmony_ci        {
49355bd8deadSopenharmony_ci          boolean hasBounds = FALSE;
49365bd8deadSopenharmony_ci          float boundsUnion[4], bounds[4];
49375bd8deadSopenharmony_ci
49385bd8deadSopenharmony_ci          const float *v = transformValues;
49395bd8deadSopenharmony_ci          for (int i = 0; i<numPaths; i++) {
49405bd8deadSopenharmony_ci            uint pathName;
49415bd8deadSopenharmony_ci            bool ok = getPathName(pathNameType, paths, pathBase, pathName);
49425bd8deadSopenharmony_ci            if (!ok)
49435bd8deadSopenharmony_ci              return;  // stop early
49445bd8deadSopenharmony_ci            if (IsPathNV(pathName)) {
49455bd8deadSopenharmony_ci              GetPathParameterfvNV(pathName, boundingBoxType, bounds);
49465bd8deadSopenharmony_ci              switch (transformType) {
49475bd8deadSopenharmony_ci              case NONE:
49485bd8deadSopenharmony_ci                break;
49495bd8deadSopenharmony_ci              case TRANSLATE_X_NV:
49505bd8deadSopenharmony_ci                bounds[0] += v[0];
49515bd8deadSopenharmony_ci                bounds[2] += v[0];
49525bd8deadSopenharmony_ci                v += 1;
49535bd8deadSopenharmony_ci                break;
49545bd8deadSopenharmony_ci              case TRANSLATE_Y_NV:
49555bd8deadSopenharmony_ci                bounds[1] += v[0];
49565bd8deadSopenharmony_ci                bounds[3] += v[0];
49575bd8deadSopenharmony_ci                v += 1;
49585bd8deadSopenharmony_ci                break;
49595bd8deadSopenharmony_ci              case TRANSLATE_2D_NV:
49605bd8deadSopenharmony_ci                bounds[0] += v[0];
49615bd8deadSopenharmony_ci                bounds[1] += v[1];
49625bd8deadSopenharmony_ci                bounds[2] += v[0];
49635bd8deadSopenharmony_ci                bounds[3] += v[1];
49645bd8deadSopenharmony_ci                v += 2;
49655bd8deadSopenharmony_ci                break;
49665bd8deadSopenharmony_ci              case TRANSLATE_3D_NV: // ignores v[2]
49675bd8deadSopenharmony_ci                bounds[0] += v[0];
49685bd8deadSopenharmony_ci                bounds[1] += v[1];
49695bd8deadSopenharmony_ci                bounds[2] += v[0];
49705bd8deadSopenharmony_ci                bounds[3] += v[1];
49715bd8deadSopenharmony_ci                v += 3;
49725bd8deadSopenharmony_ci                break;
49735bd8deadSopenharmony_ci              case AFFINE_2D_NV:
49745bd8deadSopenharmony_ci                bounds[0] = bounds[0]*v[0] + bounds[0]*v[2] + v[4];
49755bd8deadSopenharmony_ci                bounds[1] = bounds[1]*v[1] + bounds[1]*v[3] + v[5];
49765bd8deadSopenharmony_ci                bounds[2] = bounds[2]*v[0] + bounds[2]*v[2] + v[4];
49775bd8deadSopenharmony_ci                bounds[3] = bounds[3]*v[1] + bounds[3]*v[3] + v[5];
49785bd8deadSopenharmony_ci                v += 6;
49795bd8deadSopenharmony_ci                break;
49805bd8deadSopenharmony_ci              case TRANSPOSE_AFFINE_2D_NV:
49815bd8deadSopenharmony_ci                bounds[0] = bounds[0]*v[0] + bounds[0]*v[1] + v[2];
49825bd8deadSopenharmony_ci                bounds[1] = bounds[1]*v[3] + bounds[1]*v[4] + v[5];
49835bd8deadSopenharmony_ci                bounds[2] = bounds[2]*v[0] + bounds[2]*v[1] + v[2];
49845bd8deadSopenharmony_ci                bounds[3] = bounds[3]*v[3] + bounds[3]*v[4] + v[5];
49855bd8deadSopenharmony_ci                v += 6;
49865bd8deadSopenharmony_ci                break;
49875bd8deadSopenharmony_ci              case AFFINE_3D_NV:  // ignores v[2], v[5], v[6..8], v[11]
49885bd8deadSopenharmony_ci                bounds[0] = bounds[0]*v[0] + bounds[0]*v[3] + v[9];
49895bd8deadSopenharmony_ci                bounds[1] = bounds[1]*v[1] + bounds[1]*v[4] + v[10];
49905bd8deadSopenharmony_ci                bounds[2] = bounds[2]*v[0] + bounds[2]*v[3] + v[9];
49915bd8deadSopenharmony_ci                bounds[3] = bounds[3]*v[1] + bounds[3]*v[4] + v[10];
49925bd8deadSopenharmony_ci                v += 12;
49935bd8deadSopenharmony_ci                break;
49945bd8deadSopenharmony_ci              case TRANSPOSE_AFFINE_3D_NV:  // ignores v[2], v[6], v[8..11]
49955bd8deadSopenharmony_ci                bounds[0] = bounds[0]*v[0] + bounds[0]*v[1] + v[3];
49965bd8deadSopenharmony_ci                bounds[1] = bounds[1]*v[4] + bounds[1]*v[5] + v[7];
49975bd8deadSopenharmony_ci                bounds[2] = bounds[2]*v[0] + bounds[2]*v[1] + v[3];
49985bd8deadSopenharmony_ci                bounds[3] = bounds[3]*v[4] + bounds[3]*v[5] + v[7];
49995bd8deadSopenharmony_ci                v += 12;
50005bd8deadSopenharmony_ci                break;
50015bd8deadSopenharmony_ci              default:  // generate INVALID_ENUM
50025bd8deadSopenharmony_ci              }
50035bd8deadSopenharmony_ci              if (bounds[0] > bounds[2]) {
50045bd8deadSopenharmony_ci                float t = bounds[2];
50055bd8deadSopenharmony_ci                bounds[2] = bounds[0];
50065bd8deadSopenharmony_ci                bounds[0] = t;
50075bd8deadSopenharmony_ci              }
50085bd8deadSopenharmony_ci              if (bounds[1] > bounds[3]) {
50095bd8deadSopenharmony_ci                float t = bounds[3];
50105bd8deadSopenharmony_ci                bounds[3] = bounds[1];
50115bd8deadSopenharmony_ci                bounds[1] = t;
50125bd8deadSopenharmony_ci              }
50135bd8deadSopenharmony_ci              if (hasBounds) {
50145bd8deadSopenharmony_ci                if (bounds[0] < boundsUnion[0]) {
50155bd8deadSopenharmony_ci                  boundsUnion[0] = bounds[0];
50165bd8deadSopenharmony_ci                }
50175bd8deadSopenharmony_ci                if (bounds[1] < boundsUnion[1]) {
50185bd8deadSopenharmony_ci                  boundsUnion[1] = bounds[1];
50195bd8deadSopenharmony_ci                }
50205bd8deadSopenharmony_ci                if (bounds[2] > boundsUnion[2]) {
50215bd8deadSopenharmony_ci                  boundsUnion[2] = bounds[2];
50225bd8deadSopenharmony_ci                }
50235bd8deadSopenharmony_ci                if (bounds[3] > boundsUnion[3]) {
50245bd8deadSopenharmony_ci                  boundsUnion[3] = bounds[3];
50255bd8deadSopenharmony_ci                }
50265bd8deadSopenharmony_ci              } else {
50275bd8deadSopenharmony_ci                for (int i=0; i<4; i++) {
50285bd8deadSopenharmony_ci                  boundsUnion[i] = bounds[i];
50295bd8deadSopenharmony_ci                }
50305bd8deadSopenharmony_ci                hasBounds = TRUE;
50315bd8deadSopenharmony_ci              }
50325bd8deadSopenharmony_ci            }
50335bd8deadSopenharmony_ci          }
50345bd8deadSopenharmony_ci          if (hasBounds) {
50355bd8deadSopenharmony_ci            boolean polygonSmoothEnable = IsEnabled(POLYGON_SMOOTH);
50365bd8deadSopenharmony_ci            int polygonModes[2];
50375bd8deadSopenharmony_ci            GetIntegerv(POLYGON_MODE, polygonModes);
50385bd8deadSopenharmony_ci            PolygonMode(GL_FRONT_AND_BACK, GL_FILL);
50395bd8deadSopenharmony_ci            Disable(GL_POLYGON_SMOOTH);
50405bd8deadSopenharmony_ci            Rectf(boundsUnion[0], boundsUnion[1], boundsUnion[2], boundsUnion[3]);
50415bd8deadSopenharmony_ci            PolygonMode(FRONT, polygonModes[0]);
50425bd8deadSopenharmony_ci            PolygonMode(BACK, polygonModes[1]);
50435bd8deadSopenharmony_ci            if (polygonSmoothEnable) {
50445bd8deadSopenharmony_ci              Enable(POLYGON_SMOOTH);
50455bd8deadSopenharmony_ci            } else {
50465bd8deadSopenharmony_ci              Disable(POLYGON_SMOOTH);
50475bd8deadSopenharmony_ci            }
50485bd8deadSopenharmony_ci          }
50495bd8deadSopenharmony_ci        }
50505bd8deadSopenharmony_ci
50515bd8deadSopenharmony_ci    The GetPathParameterfvNV query, used in the code above, is introduced
50525bd8deadSopenharmony_ci    in section 6.X.1 ("Path Object Parameter Queries").
50535bd8deadSopenharmony_ci
50545bd8deadSopenharmony_ci    The command
50555bd8deadSopenharmony_ci
50565bd8deadSopenharmony_ci         void CoverStrokePathInstancedNV(sizei numPaths,
50575bd8deadSopenharmony_ci                                         enum pathNameType, const void *paths,
50585bd8deadSopenharmony_ci                                         uint pathBase,
50595bd8deadSopenharmony_ci                                         enum coverMode,
50605bd8deadSopenharmony_ci                                         enum transformType,
50615bd8deadSopenharmony_ci                                         const float *transformValues);
50625bd8deadSopenharmony_ci
50635bd8deadSopenharmony_ci    covers a sequence of stroked paths and is equivalent to:
50645bd8deadSopenharmony_ci
50655bd8deadSopenharmony_ci        if (coverage == BOUNDING_BOX_OF_BOUNDING_BOXES_NV) {
50665bd8deadSopenharmony_ci          renderBoundingBox(PATH_STROKE_BOUNDING_BOX_NV,
50675bd8deadSopenharmony_ci                            numPaths,
50685bd8deadSopenharmony_ci                            pathNameType, paths,
50695bd8deadSopenharmony_ci                            pathBase,
50705bd8deadSopenharmony_ci                            transformType, transformValues);
50715bd8deadSopenharmony_ci        } else {
50725bd8deadSopenharmony_ci          const float *v = transformValues;
50735bd8deadSopenharmony_ci          for (int i = 0; i<numPaths; i++) {
50745bd8deadSopenharmony_ci            double m[16];
50755bd8deadSopenharmony_ci
50765bd8deadSopenharmony_ci            GetDoublev(MODELVIEW_MATRIX, m);  // save matrix
50775bd8deadSopenharmony_ci            v = applyTransformType(transformType, v);
50785bd8deadSopenharmony_ci            uint pathName;
50795bd8deadSopenharmony_ci            bool ok = getPathName(pathNameType, paths, pathBase, pathName);
50805bd8deadSopenharmony_ci            if (!ok)
50815bd8deadSopenharmony_ci              return;  // stop early
50825bd8deadSopenharmony_ci            if (IsPathNV(pathName)) {
50835bd8deadSopenharmony_ci              << set fragment shader instance ID to i >>
50845bd8deadSopenharmony_ci              CoverStrokePathNV(pathName, cover);
50855bd8deadSopenharmony_ci            }
50865bd8deadSopenharmony_ci            MatrixLoaddEXT(MODELVIEW, m);  // restore matrix
50875bd8deadSopenharmony_ci          }
50885bd8deadSopenharmony_ci        }
50895bd8deadSopenharmony_ci
50905bd8deadSopenharmony_ci    assuming these helper functions for applyTransformType,
50915bd8deadSopenharmony_ci    getPathName, and renderBoundingBox defined above.
50925bd8deadSopenharmony_ci
50935bd8deadSopenharmony_ci    5.X.2.4 Path Stenciling Then Covering
50945bd8deadSopenharmony_ci
50955bd8deadSopenharmony_ci    The following command combine the stencil and cover operations on
50965bd8deadSopenharmony_ci    paths into a single command.
50975bd8deadSopenharmony_ci
50985bd8deadSopenharmony_ci    The command
50995bd8deadSopenharmony_ci
51005bd8deadSopenharmony_ci        void StencilThenCoverFillPathNV(uint path, enum fillMode, uint mask, enum coverMode);
51015bd8deadSopenharmony_ci
51025bd8deadSopenharmony_ci    is equivalent to the two commands
51035bd8deadSopenharmony_ci
51045bd8deadSopenharmony_ci        StencilFillPathNV(path, fillMode, mask);
51055bd8deadSopenharmony_ci        CoverFillPathNV(path, coverMode);
51065bd8deadSopenharmony_ci
51075bd8deadSopenharmony_ci    unless either command would generate an error; for any such error
51085bd8deadSopenharmony_ci    other than OUT_OF_MEMORY, only that error is generated.
51095bd8deadSopenharmony_ci
51105bd8deadSopenharmony_ci    The command
51115bd8deadSopenharmony_ci
51125bd8deadSopenharmony_ci        void StencilThenCoverStrokePathNV(uint path, int reference, uint mask, enum coverMode);
51135bd8deadSopenharmony_ci
51145bd8deadSopenharmony_ci    is equivalent to the two commands
51155bd8deadSopenharmony_ci
51165bd8deadSopenharmony_ci        StencilStrokePathNV(uint path, int reference, uint mask);
51175bd8deadSopenharmony_ci        CoverStrokePathNV(uint path, enum coverMode);
51185bd8deadSopenharmony_ci
51195bd8deadSopenharmony_ci    unless either command would generate an error; for any such error
51205bd8deadSopenharmony_ci    other than OUT_OF_MEMORY, only that error is generated.
51215bd8deadSopenharmony_ci
51225bd8deadSopenharmony_ci    The command
51235bd8deadSopenharmony_ci
51245bd8deadSopenharmony_ci        void StencilThenCoverFillPathInstancedNV(sizei numPaths,
51255bd8deadSopenharmony_ci                                                 enum pathNameType, const void *paths,
51265bd8deadSopenharmony_ci                                                 uint pathBase,
51275bd8deadSopenharmony_ci                                                 enum fillMode, uint mask,
51285bd8deadSopenharmony_ci                                                 enum coverMode,
51295bd8deadSopenharmony_ci                                                 enum transformType,
51305bd8deadSopenharmony_ci                                                 const float *transformValues);
51315bd8deadSopenharmony_ci
51325bd8deadSopenharmony_ci    is equivalent to the two commands
51335bd8deadSopenharmony_ci
51345bd8deadSopenharmony_ci        StencilFillPathInstancedNV(sizei numPaths,
51355bd8deadSopenharmony_ci                                   enum pathNameType, const void *paths,
51365bd8deadSopenharmony_ci                                   uint pathBase,
51375bd8deadSopenharmony_ci                                   enum fillMode, uint mask,
51385bd8deadSopenharmony_ci                                   enum coverMode,
51395bd8deadSopenharmony_ci                                   enum transformType,
51405bd8deadSopenharmony_ci                                   const float *transformValues);
51415bd8deadSopenharmony_ci        CoverFillPathInstancedNV(sizei numPaths,
51425bd8deadSopenharmony_ci                                 enum pathNameType, const void *paths,
51435bd8deadSopenharmony_ci                                 uint pathBase,
51445bd8deadSopenharmony_ci                                 enum fillMode, uint mask,
51455bd8deadSopenharmony_ci                                 enum coverMode,
51465bd8deadSopenharmony_ci                                 enum transformType,
51475bd8deadSopenharmony_ci                                 const float *transformValues);
51485bd8deadSopenharmony_ci
51495bd8deadSopenharmony_ci    unless either command would generate an error; for any such error
51505bd8deadSopenharmony_ci    other than OUT_OF_MEMORY, only that error is generated.
51515bd8deadSopenharmony_ci
51525bd8deadSopenharmony_ci    The command
51535bd8deadSopenharmony_ci
51545bd8deadSopenharmony_ci        void StencilThenCoverStrokePathInstancedNV(sizei numPaths,
51555bd8deadSopenharmony_ci                                                   enum pathNameType, const void *paths,
51565bd8deadSopenharmony_ci                                                   uint pathBase,
51575bd8deadSopenharmony_ci                                                   int reference, uint mask,
51585bd8deadSopenharmony_ci                                                   enum coverMode,
51595bd8deadSopenharmony_ci                                                   enum transformType,
51605bd8deadSopenharmony_ci                                                   const float *transformValues);
51615bd8deadSopenharmony_ci
51625bd8deadSopenharmony_ci    is equivalent to the two commands
51635bd8deadSopenharmony_ci
51645bd8deadSopenharmony_ci        StencilStrokePathInstancedNV(sizei numPaths,
51655bd8deadSopenharmony_ci                                     enum pathNameType, const void *paths,
51665bd8deadSopenharmony_ci                                     uint pathBase,
51675bd8deadSopenharmony_ci                                     int reference, uint mask,
51685bd8deadSopenharmony_ci                                     enum transformType,
51695bd8deadSopenharmony_ci                                     const float *transformValues);
51705bd8deadSopenharmony_ci        CoverStrokePathInstancedNV(sizei numPaths,
51715bd8deadSopenharmony_ci                                   enum pathNameType, const void *paths,
51725bd8deadSopenharmony_ci                                   uint pathBase,
51735bd8deadSopenharmony_ci                                   enum coverMode,
51745bd8deadSopenharmony_ci                                   enum transformType,
51755bd8deadSopenharmony_ci                                   const float *transformValues);
51765bd8deadSopenharmony_ci
51775bd8deadSopenharmony_ci    unless either command would generate an error; for any such error
51785bd8deadSopenharmony_ci    other than OUT_OF_MEMORY, only that error is generated.
51795bd8deadSopenharmony_ci
51805bd8deadSopenharmony_ci -- Section 5.4 "Display Lists"
51815bd8deadSopenharmony_ci
51825bd8deadSopenharmony_ci    Add to the list of commands not compiled into display lists:
51835bd8deadSopenharmony_ci
51845bd8deadSopenharmony_ci    "Path objects:  GenPathsNV, DeletePathsNV."
51855bd8deadSopenharmony_ci
51865bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 3.2 (unabridged) Specification (State and
51875bd8deadSopenharmony_ciState Requests)
51885bd8deadSopenharmony_ci
51895bd8deadSopenharmony_ci -- Insert section 6.X "Path Object Queries" after 6.1.18 "Renderbuffer
51905bd8deadSopenharmony_ci    Object Queries"
51915bd8deadSopenharmony_ci
51925bd8deadSopenharmony_ci    6.X. Path Rendering Queries
51935bd8deadSopenharmony_ci
51945bd8deadSopenharmony_ci    6.X.1. Path Object Parameter Queries
51955bd8deadSopenharmony_ci
51965bd8deadSopenharmony_ci    The queries
51975bd8deadSopenharmony_ci
51985bd8deadSopenharmony_ci        void GetPathParameterivNV(uint path, enum pname, int *value);
51995bd8deadSopenharmony_ci        void GetPathParameterfvNV(uint path, enum pname, float *value);
52005bd8deadSopenharmony_ci
52015bd8deadSopenharmony_ci    obtains the current value of the /param/ path parameter of the path
52025bd8deadSopenharmony_ci    object named /name/; the error INVALID_OPERATION is generated if
52035bd8deadSopenharmony_ci    /name/ is not an existing path object.  /value/ is a pointer to a
52045bd8deadSopenharmony_ci    scalar or array of the appropriate type, int for GetPathParameterivNV
52055bd8deadSopenharmony_ci    and float for GetPathParameterfvNV, in which to place the returned
52065bd8deadSopenharmony_ci    data.
52075bd8deadSopenharmony_ci
52085bd8deadSopenharmony_ci    Table 6.readOnlyPathParameters
52095bd8deadSopenharmony_ci
52105bd8deadSopenharmony_ci        Name                         Type     Description
52115bd8deadSopenharmony_ci        ---------------------------  -------  ----------------------------
52125bd8deadSopenharmony_ci        PATH_COMMAND_COUNT_NV        int      Length of the path's
52135bd8deadSopenharmony_ci                                              command sequence
52145bd8deadSopenharmony_ci        PATH_COORD_COUNT_NV          int      Length of the path's
52155bd8deadSopenharmony_ci                                              coordinate sequence
52165bd8deadSopenharmony_ci        PATH_DASH_ARRAY_COUNT_NV     int      Length of the path's
52175bd8deadSopenharmony_ci                                              dash array
52185bd8deadSopenharmony_ci        PATH_COMPUTED_LENGTH_NV      float    Computed path-space
52195bd8deadSopenharmony_ci                                              length of all the
52205bd8deadSopenharmony_ci                                              segments in the path
52215bd8deadSopenharmony_ci                                              (see section 6.X.4)
52225bd8deadSopenharmony_ci        PATH_OBJECT_BOUNDING_BOX_NV  4*float  tight path-space bounding
52235bd8deadSopenharmony_ci                                              box around the path's
52245bd8deadSopenharmony_ci                                              covered fill region
52255bd8deadSopenharmony_ci        PATH_FILL_BOUNDING_BOX_NV    4*float  Conservative path-space
52265bd8deadSopenharmony_ci                                              bounding box around the
52275bd8deadSopenharmony_ci                                              path's covered fill region
52285bd8deadSopenharmony_ci        PATH_STROKE_BOUNDING_BOX_NV  4*float  Conservative path-space
52295bd8deadSopenharmony_ci                                              bounding box around the
52305bd8deadSopenharmony_ci                                              path's covered stroke region
52315bd8deadSopenharmony_ci
52325bd8deadSopenharmony_ci    /param/ must be one of the tokens listed in Table 5.pathParameters
52335bd8deadSopenharmony_ci    or Table 6.readOnlyPathParameters; otherwise the INVALID_ENUM
52345bd8deadSopenharmony_ci    error is generated.  The parameters from Table 5.pathParameters
52355bd8deadSopenharmony_ci    always return a single (scalar) value.  The parameters from
52365bd8deadSopenharmony_ci    Table 6.readOnlyPathParameters a single (scalar) value for all the
52375bd8deadSopenharmony_ci    parameters but the PATH_*_BOUNDING_BOX_NV parameters; these bounding
52385bd8deadSopenharmony_ci    box parameters return a vector of 4 values.  These four values are
52395bd8deadSopenharmony_ci    the minimum (x1,y1) corner of the respective path-space bounding
52405bd8deadSopenharmony_ci    box and the maximum (x2,y2) corner of the respective path-space
52415bd8deadSopenharmony_ci    orthogonally aligned bounding box, returned in (x1,y1,x2,y2) order.
52425bd8deadSopenharmony_ci    (This guarantees x1<=x2 and y1<=y2.)  Float parameters queried by
52435bd8deadSopenharmony_ci    GetPathParameterivNV are rounded to the nearest integer (where values
52445bd8deadSopenharmony_ci    with a floating-point fraction of 0.5 round up).
52455bd8deadSopenharmony_ci
52465bd8deadSopenharmony_ci    The PATH_OBJECT_BOUNDING_BOX_NV bounding box is intended to bound
52475bd8deadSopenharmony_ci    tightly the region of path space containing the path's outline.
52485bd8deadSopenharmony_ci    The PATH_FILL_BOUNDING_BOX_NV bounding box matches the rectangle
52495bd8deadSopenharmony_ci    region covered by the CoverFillPathNV command with the BOUNDING_BOX_NV
52505bd8deadSopenharmony_ci    /coverMode/.  With either the PATH_OBJECT_BOUNDING_BOX_NV or
52515bd8deadSopenharmony_ci    PATH_FILL_BOUNDING_BOX_NV bounding boxes of a path object, a point at
52525bd8deadSopenharmony_ci    (x,y) such that x<x1 or x>x2 or y<y1 or y>y2 is guaranteed to /not/
52535bd8deadSopenharmony_ci    be within the filled outline of the path.
52545bd8deadSopenharmony_ci
52555bd8deadSopenharmony_ci    The PATH_STROKE_BOUNDING_BOX_NV bounding box matches the rectangle
52565bd8deadSopenharmony_ci    region covered by the CoverFillPathNV command with the BOUNDING_BOX_NV
52575bd8deadSopenharmony_ci    /coverMode/.  With the PATH_STROKE_BOUNDING_BOX_NV bounding box of
52585bd8deadSopenharmony_ci    a path object, a point at (x,y) such that x<x1 or x>x2 or y<y1 or
52595bd8deadSopenharmony_ci    y>y2 is guaranteed to /not/ be within the stroked region of the path.
52605bd8deadSopenharmony_ci
52615bd8deadSopenharmony_ci    6.X.2. Path Object Varying Arrays Queries
52625bd8deadSopenharmony_ci
52635bd8deadSopenharmony_ci    Path objects support a variable number of commands, coordinates,
52645bd8deadSopenharmony_ci    and dash lengths.
52655bd8deadSopenharmony_ci
52665bd8deadSopenharmony_ci    The query
52675bd8deadSopenharmony_ci
52685bd8deadSopenharmony_ci        void GetPathCommandsNV(uint path, ubyte *commands);
52695bd8deadSopenharmony_ci
52705bd8deadSopenharmony_ci    returns the sequence of commands within the path object named /name/
52715bd8deadSopenharmony_ci    into the array named /commands/; the error INVALID_OPERATION is
52725bd8deadSopenharmony_ci    generated if /name/ is not an existing path object.  The number of
52735bd8deadSopenharmony_ci    commands returned is identical to the value of the path object's
52745bd8deadSopenharmony_ci    PATH_COMMAND_COUNT_NV parameter.  The application is responsible
52755bd8deadSopenharmony_ci    for ensuring /commands/ array has sufficient space.
52765bd8deadSopenharmony_ci
52775bd8deadSopenharmony_ci    Any path commands specified with a character alias value (from Table
52785bd8deadSopenharmony_ci    5.pathCommands) is returned as the command's token value instead.
52795bd8deadSopenharmony_ci
52805bd8deadSopenharmony_ci    The query
52815bd8deadSopenharmony_ci
52825bd8deadSopenharmony_ci        void GetPathCoordsNV(uint path, float *coords);
52835bd8deadSopenharmony_ci
52845bd8deadSopenharmony_ci    returns the sequence of coordinates within the path object named
52855bd8deadSopenharmony_ci    /name/ into the array named /coords/; the error INVALID_OPERATION
52865bd8deadSopenharmony_ci    is generated if /name/ is not an existing path object.  The number
52875bd8deadSopenharmony_ci    of commands returned is identical to the value of the path object's
52885bd8deadSopenharmony_ci    PATH_COORD_COUNT_NV parameter.  The application is responsible for
52895bd8deadSopenharmony_ci    ensuring /coords/ array has sufficient space.
52905bd8deadSopenharmony_ci
52915bd8deadSopenharmony_ci    Boolean coordinates such as the large/small and sweep flags for arcs
52925bd8deadSopenharmony_ci    are always returned as 1.0 or 0.0 for true and false respectively.
52935bd8deadSopenharmony_ci    Other coordinates are returned as they were specified.
52945bd8deadSopenharmony_ci
52955bd8deadSopenharmony_ci    The query
52965bd8deadSopenharmony_ci
52975bd8deadSopenharmony_ci        void GetPathDashArrayNV(uint path, float *dashArray);
52985bd8deadSopenharmony_ci
52995bd8deadSopenharmony_ci    returns the sequence of dash lengths within the path object named
53005bd8deadSopenharmony_ci    /name/ into the array named /coords/; the error INVALID_OPERATION is
53015bd8deadSopenharmony_ci    generated if /name/ is not an existing path object.  The number of
53025bd8deadSopenharmony_ci    dash lengths returned is identical to the value of the path object's
53035bd8deadSopenharmony_ci    PATH_DASH_ARRAY_COUNT_NV parameter.  The application is responsible
53045bd8deadSopenharmony_ci    for ensuring /dashArray/ has sufficient space.
53055bd8deadSopenharmony_ci
53065bd8deadSopenharmony_ci    6.X.3. Path Object Glyph Typographic Queries
53075bd8deadSopenharmony_ci
53085bd8deadSopenharmony_ci    GLYPH METRIC QUERIES
53095bd8deadSopenharmony_ci
53105bd8deadSopenharmony_ci    To facilitate proper text layout, the command
53115bd8deadSopenharmony_ci
53125bd8deadSopenharmony_ci        void GetPathMetricsNV(bitfield metricQueryMask,
53135bd8deadSopenharmony_ci                              sizei numPaths,
53145bd8deadSopenharmony_ci                              enum pathNameType, const void *paths,
53155bd8deadSopenharmony_ci                              uint pathBase,
53165bd8deadSopenharmony_ci                              sizei stride,
53175bd8deadSopenharmony_ci                              float *metrics);
53185bd8deadSopenharmony_ci
53195bd8deadSopenharmony_ci    queries glyph metrics associated with a sequence of path objects
53205bd8deadSopenharmony_ci    specified by the /glyphBase/, /count/, /pathNameType/, and /paths/
53215bd8deadSopenharmony_ci    parameters.  Metrics are associated with path objects specified by
53225bd8deadSopenharmony_ci    PathGlyphsNV or PathGlyphRangeNV (see section 5.X.1.3).
53235bd8deadSopenharmony_ci
53245bd8deadSopenharmony_ci    There are two kinds of metrics:
53255bd8deadSopenharmony_ci
53265bd8deadSopenharmony_ci    *  Per-glyph metrics that are typically different for each glyph.
53275bd8deadSopenharmony_ci
53285bd8deadSopenharmony_ci    *  Per-font face metrics that are identical for all glyphs belonging
53295bd8deadSopenharmony_ci       to a given font face.
53305bd8deadSopenharmony_ci
53315bd8deadSopenharmony_ci    Per-font face metrics are aggregate metrics such as the maximum
53325bd8deadSopenharmony_ci    ascender or descender for all the glyphs in the font face.
53335bd8deadSopenharmony_ci
53345bd8deadSopenharmony_ci    /metricQueryMask/ is a bitfield constructed from the bits listed
53355bd8deadSopenharmony_ci    in Table 6.perGlyphMetrics and Table 6.perFontFaceMetrics.  If a bit
53365bd8deadSopenharmony_ci    is set in /metricQueryMask/ not listed in these tables, the error
53375bd8deadSopenharmony_ci    INVALID_VALUE is generated.
53385bd8deadSopenharmony_ci
53395bd8deadSopenharmony_ci    /stride/ is the byte (machine units) offset separating each group of
53405bd8deadSopenharmony_ci    returned metrics for a given path object.  If /stride/ is negative
53415bd8deadSopenharmony_ci    or /stride/ is not a multiple of the size of float in bytes (machine
53425bd8deadSopenharmony_ci    units), the INVALID_VALUE error is generated.  The INVALID_OPERATION
53435bd8deadSopenharmony_ci    error is generated if /stride/ divided by the size of float in bytes
53445bd8deadSopenharmony_ci    is not either zero or else greater than or equal to the number of
53455bd8deadSopenharmony_ci    metrics specified for querying in the metricQueryMask (based on the
53465bd8deadSopenharmony_ci    number of specified bits specified in the mask) times the size of
53475bd8deadSopenharmony_ci    float in bytes.  A /stride/ of zero is specially handled; the value
53485bd8deadSopenharmony_ci    zero is interpreted to indicate the number of bytes (machine units)
53495bd8deadSopenharmony_ci    such that the all the metrics are written in a tightly packed array,
53505bd8deadSopenharmony_ci    so the size of float in bytes times the number of specified bits in
53515bd8deadSopenharmony_ci    the /metricQueryMask/ bitfield.
53525bd8deadSopenharmony_ci
53535bd8deadSopenharmony_ci    For path objects not created with either PathGlyphsNV or
53545bd8deadSopenharmony_ci    PathGlyphRangeNV or non-existent, all glyph metrics return -1.
53555bd8deadSopenharmony_ci
53565bd8deadSopenharmony_ci    This metric information for a path object is /not/ updated if
53575bd8deadSopenharmony_ci    the commands or coordinates or parameters of that path object are
53585bd8deadSopenharmony_ci    changed.
53595bd8deadSopenharmony_ci
53605bd8deadSopenharmony_ci    Figure 6.horizontalGlyphMetrics:  Horizontal Glyph Metrics
53615bd8deadSopenharmony_ci
53625bd8deadSopenharmony_ci                ^
53635bd8deadSopenharmony_ci                |    xMin         xMax
53645bd8deadSopenharmony_ci                |     |            |
53655bd8deadSopenharmony_ci                |     |   width    |
53665bd8deadSopenharmony_ci                |     |<---------->|
53675bd8deadSopenharmony_ci                |     |            |
53685bd8deadSopenharmony_ci                |     +============+ - - - - - - - - - - - yMax
53695bd8deadSopenharmony_ci                |     I            I   ^               ^
53705bd8deadSopenharmony_ci                |     I            I   | hBearingY     |
53715bd8deadSopenharmony_ci                |     I            I   |               |
53725bd8deadSopenharmony_ci      hBearingX |---->I  GLYPH     I   |        height |
53735bd8deadSopenharmony_ci                |     I   OUTLINE  I   |               |
53745bd8deadSopenharmony_ci            ----O-----I------------I------*--->        |
53755bd8deadSopenharmony_ci               /|     I    HERE    I      |            |
53765bd8deadSopenharmony_ci              / |     I            I      |            v
53775bd8deadSopenharmony_ci        origin  |     +============+ - - -|- - - - - - - - yMin
53785bd8deadSopenharmony_ci                |                         |
53795bd8deadSopenharmony_ci                |------------------------>|
53805bd8deadSopenharmony_ci                |   hAdvance              |
53815bd8deadSopenharmony_ci
53825bd8deadSopenharmony_ci    Figure 6.verticalGlyphMetrics:  Vertical Glyph Metrics
53835bd8deadSopenharmony_ci
53845bd8deadSopenharmony_ci               vBearingX
53855bd8deadSopenharmony_ci              |<---------|   origin
53865bd8deadSopenharmony_ci              |          | /
53875bd8deadSopenharmony_ci              |          |/
53885bd8deadSopenharmony_ci    ---------------------O----------------------------->
53895bd8deadSopenharmony_ci              |          |                  |    |
53905bd8deadSopenharmony_ci              |          |       vBearingY  |    |
53915bd8deadSopenharmony_ci              |          |                  v    |
53925bd8deadSopenharmony_ci     yMax - - +================+ - - - - - - - - |
53935bd8deadSopenharmony_ci              I          |     I     ^           |
53945bd8deadSopenharmony_ci              I          |     I     |           |
53955bd8deadSopenharmony_ci              I    GLYPH |     I     |           |
53965bd8deadSopenharmony_ci              I     OUTLINE    I     | height    |
53975bd8deadSopenharmony_ci              I      HERE|     I     |           |
53985bd8deadSopenharmony_ci              I          |     I     |           |
53995bd8deadSopenharmony_ci              I          |     I     |           |
54005bd8deadSopenharmony_ci              I          |     I     v           | vAdvance
54015bd8deadSopenharmony_ci     yMin - - +================+ - - -           |
54025bd8deadSopenharmony_ci              |          |     |                 v
54035bd8deadSopenharmony_ci              |          * - - - - - - - - - - - -
54045bd8deadSopenharmony_ci              |          |     |
54055bd8deadSopenharmony_ci             xMin        v   xMax
54065bd8deadSopenharmony_ci
54075bd8deadSopenharmony_ci    Table 6.perGlyphMetrics
54085bd8deadSopenharmony_ci
54095bd8deadSopenharmony_ci                                                             Bit number
54105bd8deadSopenharmony_ci                                                 Glyph       from LSB
54115bd8deadSopenharmony_ci        Bit field name                           metric tag  in bitmask  Description (units in path space)
54125bd8deadSopenharmony_ci        ---------------------------------------  ----------  ----------  -------------------------------------------
54135bd8deadSopenharmony_ci        GLYPH_WIDTH_BIT_NV                       width       0           Glyph's width
54145bd8deadSopenharmony_ci        GLYPH_HEIGHT_BIT_NV                      height      1           Glyph's height
54155bd8deadSopenharmony_ci        GLYPH_HORIZONTAL_BEARING_X_BIT_NV        hBearingX   2           Left side bearing for horizontal layout
54165bd8deadSopenharmony_ci        GLYPH_HORIZONTAL_BEARING_Y_BIT_NV        hBearingY   3           Top side bearing for horizontal layout
54175bd8deadSopenharmony_ci        GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV  hAdvance    4           Advance width for horizontal layout
54185bd8deadSopenharmony_ci        GLYPH_VERTICAL_BEARING_X_BIT_NV          vBearingX   5           Left side bearing for vertical layout
54195bd8deadSopenharmony_ci        GLYPH_VERTICAL_BEARING_Y_BIT_NV          vBearingY   6           Top side bearing for vertical layout
54205bd8deadSopenharmony_ci        GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV    vAdvance    7           Advance height for vertical layout
54215bd8deadSopenharmony_ci        GLYPH_HAS_KERNING_BIT_NV                 -           8           True if glyph has a kerning table.
54225bd8deadSopenharmony_ci
54235bd8deadSopenharmony_ci    Table 6.perFontFaceMetrics
54245bd8deadSopenharmony_ci
54255bd8deadSopenharmony_ci                                                 Bit number
54265bd8deadSopenharmony_ci                                                 from LSB
54275bd8deadSopenharmony_ci        Bit field name                           in bitmask  Description (units in path space)
54285bd8deadSopenharmony_ci        ---------------------------------------  ----------  ---------------------------------------------------
54295bd8deadSopenharmony_ci        FONT_X_MIN_BOUNDS_BIT_NV                 16          Horizontal minimum (left-most) of the font bounding
54305bd8deadSopenharmony_ci                                                             box.  The font bounding box (this metric and the
54315bd8deadSopenharmony_ci                                                             next 3) is large enough to contain any glyph from
54325bd8deadSopenharmony_ci                                                             the font face.
54335bd8deadSopenharmony_ci        FONT_Y_MIN_BOUNDS_BIT_NV                 17          Vertical minimum (bottom-most) of the font bounding
54345bd8deadSopenharmony_ci                                                             box.
54355bd8deadSopenharmony_ci        FONT_X_MAX_BOUNDS_BIT_NV                 18          Horizontal maximum (right-most) of the font
54365bd8deadSopenharmony_ci                                                             bounding box.
54375bd8deadSopenharmony_ci        FONT_Y_MAX_BOUNDS_BIT_NV                 19          Vertical maximum (top-most) of the font bounding
54385bd8deadSopenharmony_ci                                                             box.
54395bd8deadSopenharmony_ci        FONT_UNITS_PER_EM_BIT_NV                 20          Number of units in path space (font units) per
54405bd8deadSopenharmony_ci                                                             Em square for this font face.  This is typically
54415bd8deadSopenharmony_ci                                                             2048 for TrueType fonts, and 1000 for PostScript
54425bd8deadSopenharmony_ci                                                             fonts.
54435bd8deadSopenharmony_ci        FONT_ASCENDER_BIT_NV                     21          Typographic ascender of the font face.  For font
54445bd8deadSopenharmony_ci                                                             formats not supplying this information, this value
54455bd8deadSopenharmony_ci                                                             is the same as FONT_Y_MAX_BOUNDS_BIT_NV.
54465bd8deadSopenharmony_ci        FONT_DESCENDER_BIT_NV                    22          Typographic descender of the font face (always a
54475bd8deadSopenharmony_ci                                                             positive value).  For font formats not supplying
54485bd8deadSopenharmony_ci                                                             this information, this value is the same as
54495bd8deadSopenharmony_ci                                                             FONT_Y_MIN_BOUNDS_BIT_NV.
54505bd8deadSopenharmony_ci        FONT_HEIGHT_BIT_NV                       23          Vertical distance between two consecutive baselines
54515bd8deadSopenharmony_ci                                                             in the font face (always a positive value).
54525bd8deadSopenharmony_ci        FONT_MAX_ADVANCE_WIDTH_BIT_NV            24          Maximal advance width for all glyphs in this font
54535bd8deadSopenharmony_ci                                                             face.  (Intended to make word wrapping computations
54545bd8deadSopenharmony_ci                                                             easier.)
54555bd8deadSopenharmony_ci        FONT_MAX_ADVANCE_HEIGHT_BIT_NV           25          Maximal advance height for all glyphs in this
54565bd8deadSopenharmony_ci                                                             font face for vertical layout.  For font formats
54575bd8deadSopenharmony_ci                                                             not supplying this information, this value is the
54585bd8deadSopenharmony_ci                                                             same as FONT_HEIGHT_BIT_NV.
54595bd8deadSopenharmony_ci        FONT_UNDERLINE_POSITION_BIT_NV           26          Position of the underline line for this font face.
54605bd8deadSopenharmony_ci                                                             This position is the center of the underling stem.
54615bd8deadSopenharmony_ci        FONT_UNDERLINE_THICKNESS_BIT_NV          27          Thickness of the underline of this font face.
54625bd8deadSopenharmony_ci        FONT_HAS_KERNING_BIT_NV                  28          True if font face provides a kerning table
54635bd8deadSopenharmony_ci        FONT_NUM_GLYPH_INDICES_BIT_NV            29          Number of glyph indices for this font.
54645bd8deadSopenharmony_ci
54655bd8deadSopenharmony_ci    consulted by the GetPathSpacingNV command discussed below
54665bd8deadSopenharmony_ci    ("GLYPH SPACING QUERIES").
54675bd8deadSopenharmony_ci
54685bd8deadSopenharmony_ci    The query
54695bd8deadSopenharmony_ci
54705bd8deadSopenharmony_ci        void GetPathMetricRangeNV(bitfield metricQueryMask,
54715bd8deadSopenharmony_ci                                  uint firstPathName,
54725bd8deadSopenharmony_ci                                  sizei numPaths,
54735bd8deadSopenharmony_ci                                  sizei stride,
54745bd8deadSopenharmony_ci                                  float *metrics);
54755bd8deadSopenharmony_ci
54765bd8deadSopenharmony_ci    is equivalent to
54775bd8deadSopenharmony_ci
54785bd8deadSopenharmony_ci        int *array = malloc(sizeof(int)*numGlyphs);
54795bd8deadSopenharmony_ci        if (array) {
54805bd8deadSopenharmony_ci          for (int i=0; i<numGlyphs; i++) {
54815bd8deadSopenharmony_ci            array[i] = i + firstPathName;
54825bd8deadSopenharmony_ci          }
54835bd8deadSopenharmony_ci          GetPathMetricsNV(metricQueryMask,
54845bd8deadSopenharmony_ci                           numPaths,
54855bd8deadSopenharmony_ci                           INT, array,
54865bd8deadSopenharmony_ci                           pathBase,
54875bd8deadSopenharmony_ci                           stride, metrics);
54885bd8deadSopenharmony_ci          free(array);
54895bd8deadSopenharmony_ci        } else {
54905bd8deadSopenharmony_ci          // generate OUT_OF_MEMORY error
54915bd8deadSopenharmony_ci        }
54925bd8deadSopenharmony_ci
54935bd8deadSopenharmony_ci    GLYPH SPACING QUERIES
54945bd8deadSopenharmony_ci
54955bd8deadSopenharmony_ci    The query
54965bd8deadSopenharmony_ci
54975bd8deadSopenharmony_ci        void GetPathSpacingNV(enum pathListMode,
54985bd8deadSopenharmony_ci                              sizei numPaths,
54995bd8deadSopenharmony_ci                              enum pathNameType, const void *paths,
55005bd8deadSopenharmony_ci                              uint pathBase,
55015bd8deadSopenharmony_ci                              float advanceScale,
55025bd8deadSopenharmony_ci                              float kerningScale,
55035bd8deadSopenharmony_ci                              enum transformType,
55045bd8deadSopenharmony_ci                              float *returnedSpacing);
55055bd8deadSopenharmony_ci
55065bd8deadSopenharmony_ci    returns a sequence of /numPaths/-1 glyph spacing vectors in path
55075bd8deadSopenharmony_ci    space for spacing the specified sequence of path object pairs.
55085bd8deadSopenharmony_ci    The returned vectors are written into the /returnedSpacing/ array.
55095bd8deadSopenharmony_ci
55105bd8deadSopenharmony_ci    /pathListMode/ must be one of ADJACENT_PAIRS_NV,
55115bd8deadSopenharmony_ci    ACCUM_ADJACENT_PAIRS_NV, or FIRST_TO_REST_NV; otherwise the
55125bd8deadSopenharmony_ci    INVALID_ENUM error is generated.
55135bd8deadSopenharmony_ci
55145bd8deadSopenharmony_ci    If /numPaths/ is negative, the error INVALID_VALUE is generated
55155bd8deadSopenharmony_ci
55165bd8deadSopenharmony_ci    /pathNameType/ determines the type of elements of the /paths/ array
55175bd8deadSopenharmony_ci    and must be one of BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT, INT,
55185bd8deadSopenharmony_ci    UNSIGNED_INT, FLOAT, UTF8_NV, UTF16_NV, 2_BYTES, 3_BYTES, or 4_BYTES;
55195bd8deadSopenharmony_ci    otherwise the INVALID_ENUM error is generated.
55205bd8deadSopenharmony_ci
55215bd8deadSopenharmony_ci    /transformType/ must be either TRANSLATE_X_NV or TRANSLATE_2D_NV;
55225bd8deadSopenharmony_ci    otherwise the INVALID_ENUM error is generated.
55235bd8deadSopenharmony_ci
55245bd8deadSopenharmony_ci    In the absence of parameter errors, the following pseudo-code
55255bd8deadSopenharmony_ci    implements this query:
55265bd8deadSopenharmony_ci
55275bd8deadSopenharmony_ci        double accumX = 0,
55285bd8deadSopenharmony_ci               accumY = 0;
55295bd8deadSopenharmony_ci        float returnX = 0,
55305bd8deadSopenharmony_ci              returnY = 0;
55315bd8deadSopenharmony_ci        uint firstPath;
55325bd8deadSopenharmony_ci        bool ok = getPathName(pathNameType, paths, pathBase, firstPath);
55335bd8deadSopenharmony_ci        if (!ok)
55345bd8deadSopenharmony_ci          return;  // stop early
55355bd8deadSopenharmony_ci        for (int i = 0; i<numPaths-1; i++) {
55365bd8deadSopenharmony_ci          uint secondPath;
55375bd8deadSopenharmony_ci          bool ok = getPathName(pathNameType, paths, pathBase, secondPath);
55385bd8deadSopenharmony_ci          if (!ok)
55395bd8deadSopenharmony_ci            return;  // stop early
55405bd8deadSopenharmony_ci          if (transformType == TRANSLATE_X_NV) {
55415bd8deadSopenharmony_ci            returnedSpacing[i] = returnX;
55425bd8deadSopenharmony_ci          } else {
55435bd8deadSopenharmony_ci            // transformType == TRANSLATE_2D_NV
55445bd8deadSopenharmony_ci            returnedSpacing[2*i  ] = returnX;
55455bd8deadSopenharmony_ci            returnedSpacing[2*i+1] = returnY;
55465bd8deadSopenharmony_ci          }
55475bd8deadSopenharmony_ci          float x = advanceScale * advanceX(firstPath) +
55485bd8deadSopenharmony_ci                    kerningScale * kerningX(firstPath,secondPath);
55495bd8deadSopenharmony_ci          float y = kerningScale * kerningY(firstPath,secondPath);
55505bd8deadSopenharmony_ci          if (pathListMode == ACCUM_ADJACENT_PAIRS_NV) {
55515bd8deadSopenharmony_ci            returnX = accumX;
55525bd8deadSopenharmony_ci            returnY = accumY;
55535bd8deadSopenharmony_ci            accumX += x;
55545bd8deadSopenharmony_ci            accumY += y;
55555bd8deadSopenharmony_ci          } else {
55565bd8deadSopenharmony_ci            returnX = x;
55575bd8deadSopenharmony_ci            returnY = y;
55585bd8deadSopenharmony_ci          }
55595bd8deadSopenharmony_ci          if (pathListMode != FIRST_TO_REST_NV) {
55605bd8deadSopenharmony_ci            firstPath = secondPath;
55615bd8deadSopenharmony_ci          }
55625bd8deadSopenharmony_ci        }
55635bd8deadSopenharmony_ci
55645bd8deadSopenharmony_ci    The getPathName function is found in section 5.X.2.3 (Instanced Path
55655bd8deadSopenharmony_ci    Stenciling and Covering).
55665bd8deadSopenharmony_ci
55675bd8deadSopenharmony_ci    The advance, kerningX, and kerningY functions operate as follows:
55685bd8deadSopenharmony_ci
55695bd8deadSopenharmony_ci    The advance function returns the hAdvance metric of path object
55705bd8deadSopenharmony_ci    name passed to the function, but if the path object lacks glyph
55715bd8deadSopenharmony_ci    metrics, the difference between the horizontal bounds of the path
55725bd8deadSopenharmony_ci    object's bounding box (determined by PATH_OBJECT_BOUNDING_BOX_NV)
55735bd8deadSopenharmony_ci    are returned instead.  If the named path object passed to advance
55745bd8deadSopenharmony_ci    does not exist, zero is returned.
55755bd8deadSopenharmony_ci
55765bd8deadSopenharmony_ci    The kerningX and kerningY functions return the X and Y kerning
55775bd8deadSopenharmony_ci    distances respectively between the character codes of the first
55785bd8deadSopenharmony_ci    (typically left) and second (typically right) path objects if they
55795bd8deadSopenharmony_ci    belong to the same font face; otherwise, zero is returned.  If the
55805bd8deadSopenharmony_ci    vertical kerning metrics are unavailable for the font face or either
55815bd8deadSopenharmony_ci    named path object does not exist, zero is returned for kerningY.
55825bd8deadSopenharmony_ci    (When the FONT_HAS_KERNING_BIT_NV or GLYPH_HAS_KERNING_BIT_NV glyph
55835bd8deadSopenharmony_ci    metrics are false for the first path object name, kerningX and
55845bd8deadSopenharmony_ci    kerningY must return zero.)
55855bd8deadSopenharmony_ci
55865bd8deadSopenharmony_ci    Spacing information (horizontal advance or kerning) in a path object
55875bd8deadSopenharmony_ci    is not changed if the path's commands, coordinates, or parameters
55885bd8deadSopenharmony_ci    change--except in the case where the horizontal kerning value is
55895bd8deadSopenharmony_ci    determined by the first path's object bounding box.
55905bd8deadSopenharmony_ci
55915bd8deadSopenharmony_ci    6.X.4. Path Object Geometric Queries
55925bd8deadSopenharmony_ci
55935bd8deadSopenharmony_ci    The query
55945bd8deadSopenharmony_ci
55955bd8deadSopenharmony_ci        boolean IsPointInFillPathNV(uint path,
55965bd8deadSopenharmony_ci                                    uint mask, float x, float y);
55975bd8deadSopenharmony_ci
55985bd8deadSopenharmony_ci    computes the winding number of the path-space 2D (x,y) point given
55995bd8deadSopenharmony_ci    by /x/ and /y/ with respect to the path object named /path/ and
56005bd8deadSopenharmony_ci    returns TRUE if the winding count ANDed with /mask/ is non-zero;
56015bd8deadSopenharmony_ci    otherwise the query returns FALSE.  If the /mask/ parameter is zero,
56025bd8deadSopenharmony_ci    substitute the path object's PATH_FILL_MASK_NV parameter value
56035bd8deadSopenharmony_ci    when ANDing with the winding count.  The error INVALID_OPERATION is
56045bd8deadSopenharmony_ci    generated if /path/ does not exist.
56055bd8deadSopenharmony_ci
56065bd8deadSopenharmony_ci    This point-inside computation occurs in /path space/ rather than in
56075bd8deadSopenharmony_ci    the window space as the StencilFillPathNV command operates.
56085bd8deadSopenharmony_ci
56095bd8deadSopenharmony_ci    The query
56105bd8deadSopenharmony_ci
56115bd8deadSopenharmony_ci        boolean IsPointInStrokePathNV(uint path,
56125bd8deadSopenharmony_ci                                      float x, float y);
56135bd8deadSopenharmony_ci
56145bd8deadSopenharmony_ci    returns TRUE if the path-space 2D (x,y) point given by /x/ and
56155bd8deadSopenharmony_ci    /y/ is within the stroked region of the path object named /path/;
56165bd8deadSopenharmony_ci    otherwise the query returns FALSE.  The error INVALID_OPERATION is
56175bd8deadSopenharmony_ci    generated if /path/ does not exist.
56185bd8deadSopenharmony_ci
56195bd8deadSopenharmony_ci    The stroked region's stroke width is specified by the path object's
56205bd8deadSopenharmony_ci    stroke width parameter.
56215bd8deadSopenharmony_ci
56225bd8deadSopenharmony_ci    The stroked region is defined as in section 5.X.2.1 ("Path
56235bd8deadSopenharmony_ci    Stenciling") so accounts for the path object's current end cap,
56245bd8deadSopenharmony_ci    join style, and dashing parameters.
56255bd8deadSopenharmony_ci
56265bd8deadSopenharmony_ci    This point-inside computation occurs in /path space/ rather than in
56275bd8deadSopenharmony_ci    the window space as the StencilStrokePathNV command operates.
56285bd8deadSopenharmony_ci
56295bd8deadSopenharmony_ci    The query
56305bd8deadSopenharmony_ci
56315bd8deadSopenharmony_ci        float GetPathLengthNV(uint path,
56325bd8deadSopenharmony_ci                              sizei startSegment, sizei numSegments);
56335bd8deadSopenharmony_ci
56345bd8deadSopenharmony_ci    returns an approximation of the geometric length of a given portion
56355bd8deadSopenharmony_ci    of a path object named /path/.  The portion of the path measured is
56365bd8deadSopenharmony_ci    from the (0-indexed) /startSegment/ through the next /numSegments/.
56375bd8deadSopenharmony_ci    The returned length is measured in path-space units.  The error
56385bd8deadSopenharmony_ci    INVALID_OPERATION is generated if /path/ does not exist.
56395bd8deadSopenharmony_ci
56405bd8deadSopenharmony_ci    The geometric length of the path's measured portion depends only
56415bd8deadSopenharmony_ci    on the path's commands and associated coordinates for the indicated
56425bd8deadSopenharmony_ci    range of segments and the respective coordinates of these segments.
56435bd8deadSopenharmony_ci    The geometric length of the path does not, for example, depend on
56445bd8deadSopenharmony_ci    the path's dashing parameters.
56455bd8deadSopenharmony_ci
56465bd8deadSopenharmony_ci    The MOVE_TO_NV and RELATIVE_MOVE_TO_NV commands contribute zero
56475bd8deadSopenharmony_ci    units to the computed geometric length.  For all other path commands,
56485bd8deadSopenharmony_ci    a path segment's geometric length contribution /s/ is:
56495bd8deadSopenharmony_ci
56505bd8deadSopenharmony_ci        s = int(sqrt(fx(t)^2+fy(t)^2), t, 0, 1)
56515bd8deadSopenharmony_ci
56525bd8deadSopenharmony_ci    [[ int(f(t),t,a,b) computes the definite integration of the function
56535bd8deadSopenharmony_ci       f(t) over the interval [a,b]. ]]
56545bd8deadSopenharmony_ci
56555bd8deadSopenharmony_ci    where /fx/ and /fy/ is the partial derivative of the command's
56565bd8deadSopenharmony_ci    respective path segment parametric function found in Table
56575bd8deadSopenharmony_ci    5.pathCommands.
56585bd8deadSopenharmony_ci
56595bd8deadSopenharmony_ci    The return value, assuming no error, is the sum of all /s/ values
56605bd8deadSopenharmony_ci    for segments /startSegment/ through /startSegment/+/numSegments/-1
56615bd8deadSopenharmony_ci    inclusive.  If /numSegments/ is zero and no error is generated,
56625bd8deadSopenharmony_ci    0 is returned.
56635bd8deadSopenharmony_ci
56645bd8deadSopenharmony_ci    The INVALID_VALUE error is generated in any of the following
56655bd8deadSopenharmony_ci    circumstances:
56665bd8deadSopenharmony_ci
56675bd8deadSopenharmony_ci        *   /startSegment/ is negative,
56685bd8deadSopenharmony_ci
56695bd8deadSopenharmony_ci        *   /numSegments/ is negative,
56705bd8deadSopenharmony_ci
56715bd8deadSopenharmony_ci        *   /startSegment/+/numSegments/-1 is greater than the index of
56725bd8deadSopenharmony_ci            the final path segment.
56735bd8deadSopenharmony_ci
56745bd8deadSopenharmony_ci    If an error occurs, -1.0 is returned.  When no error occurs, the
56755bd8deadSopenharmony_ci    return value is always non-negative.
56765bd8deadSopenharmony_ci
56775bd8deadSopenharmony_ci    If /startSegment/ is zero and /numSegments/ is equal to the
56785bd8deadSopenharmony_ci    value of /path/'s PATH_COMMAND_COUNT_NV parameter and no error
56795bd8deadSopenharmony_ci    is generated, the value returned is identical to (equals) the value
56805bd8deadSopenharmony_ci    returned if GetPathParameterfvNV were used to query the value of
56815bd8deadSopenharmony_ci    /path/'s PATH_COMPUTED_LENGTH_NV parameter.
56825bd8deadSopenharmony_ci
56835bd8deadSopenharmony_ci    The query
56845bd8deadSopenharmony_ci
56855bd8deadSopenharmony_ci        boolean PointAlongPathNV(uint path,
56865bd8deadSopenharmony_ci                                 sizei startSegment, sizei numSegments,
56875bd8deadSopenharmony_ci                                 float distance,
56885bd8deadSopenharmony_ci                                 float *x, float *y,
56895bd8deadSopenharmony_ci                                 float *tangentX, float *tangentY);
56905bd8deadSopenharmony_ci
56915bd8deadSopenharmony_ci    returns the point lying a given distance along a given portion of a
56925bd8deadSopenharmony_ci    path object specified by /path/ and the unit-length tangent vector
56935bd8deadSopenharmony_ci    at that point.  The boolean return value is TRUE if /distance/
56945bd8deadSopenharmony_ci    is within (inclusive) the arc length of the range of segments from
56955bd8deadSopenharmony_ci    /startSegment/ to /startSegment/+/numSegments/-1; otherwise FALSE
56965bd8deadSopenharmony_ci    is returned.
56975bd8deadSopenharmony_ci
56985bd8deadSopenharmony_ci    The 2D point's (x,y) position is written to the values indicated
56995bd8deadSopenharmony_ci    by the /x/ and /y/ pointers respectively.  The tangent vector is
57005bd8deadSopenharmony_ci    written to the values indicated by the /tangentX/ and /tangentY/
57015bd8deadSopenharmony_ci    points.  However if /x/, /y/, /tangentX/, or /tangentY/ is a
57025bd8deadSopenharmony_ci    NULL pointer, no value is written to such NULL pointers.  Only the
57035bd8deadSopenharmony_ci    subpath consisting of the /numSegments/ path segments beginning with
57045bd8deadSopenharmony_ci    /startSegment/ (where the initial path segment has index 0) is used.
57055bd8deadSopenharmony_ci    PointAlongPathNV only considers this subpath.
57065bd8deadSopenharmony_ci
57075bd8deadSopenharmony_ci    If /distance/ is less than or equal to zero, the starting point
57085bd8deadSopenharmony_ci    of the path is used (and the query returns FALSE).  If /distance/
57095bd8deadSopenharmony_ci    is greater than the path length (i.e., the value returned when the
57105bd8deadSopenharmony_ci    GetPathLengthNV query is called with the same /startSegment/ and
57115bd8deadSopenharmony_ci    /numSegments/ parameters), the final point along the subpath is used
57125bd8deadSopenharmony_ci    (and the query returns FALSE).
57135bd8deadSopenharmony_ci
57145bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated if /path/ does not exist.
57155bd8deadSopenharmony_ci
57165bd8deadSopenharmony_ci    The error INVALID_VALUE is generated if /startSegment/
57175bd8deadSopenharmony_ci    or /numSegments/ are negative.  The error INVALID_VALUE is
57185bd8deadSopenharmony_ci    generated if /startSegment/ is greater than the index of /path/'s
57195bd8deadSopenharmony_ci    final path segment. The error INVALID_VALUE is generated if
57205bd8deadSopenharmony_ci    /startSegment/+/numSegments/-1 is less than zero or greater than
57215bd8deadSopenharmony_ci    the index of /path/'s final path segment.
57225bd8deadSopenharmony_ci
57235bd8deadSopenharmony_ci    Because it is not possible in general to compute exact distances along
57245bd8deadSopenharmony_ci    a path, an implementation is not required to use exact computation
57255bd8deadSopenharmony_ci    even for segments where such computations are possible.
57265bd8deadSopenharmony_ci
57275bd8deadSopenharmony_ci    Implementations are not required to compute distances exactly, as
57285bd8deadSopenharmony_ci    long as the satisfy the constraint that as /distance/ increases
57295bd8deadSopenharmony_ci    monotonically the returned point and tangent move forward
57305bd8deadSopenharmony_ci    monotonically along the path.
57315bd8deadSopenharmony_ci
57325bd8deadSopenharmony_ci    Implementations should use the same distance-along-a-path algorithm
57335bd8deadSopenharmony_ci    for PointAlongPathNV as is used for dashing a stroked path.  (The dash
57345bd8deadSopenharmony_ci    count and dashing array state of the path object is irrelevant to
57355bd8deadSopenharmony_ci    the results of this query.)
57365bd8deadSopenharmony_ci
57375bd8deadSopenharmony_ci    Where an implementation is able to determine that the point being
57385bd8deadSopenharmony_ci    queried lies exactly at a discontinuity or cusp, the incoming point
57395bd8deadSopenharmony_ci    and tangent should be returned.
57405bd8deadSopenharmony_ci
57415bd8deadSopenharmony_ci    6.X.5. Path Color and Texture Coordinate Generation Queries
57425bd8deadSopenharmony_ci
57435bd8deadSopenharmony_ci    The queries
57445bd8deadSopenharmony_ci
57455bd8deadSopenharmony_ci        void GetPathColorGenivNV(enum color, enum pname, int *value);
57465bd8deadSopenharmony_ci        void GetPathColorGenfvNV(enum color, enum pname, float *value);
57475bd8deadSopenharmony_ci
57485bd8deadSopenharmony_ci    return path color generation state.  /color/ must be one of
57495bd8deadSopenharmony_ci    PRIMARY_COLOR, PRIMARY_COLOR_NV, SECONDARY_COLOR_NV to return the
57505bd8deadSopenharmony_ci    requested color generation state for the primary, primary, and
57515bd8deadSopenharmony_ci    secondary color respectively.  /pname/ must be either PATH_GEN_MODE_NV,
57525bd8deadSopenharmony_ci    PATH_GEN_COLOR_FORMAT_NV, or PATH_GEN_COEFF_NV.
57535bd8deadSopenharmony_ci
57545bd8deadSopenharmony_ci    If /pname/ is PATH_GEN_MODE_NV, the scalar value of the respective
57555bd8deadSopenharmony_ci    color's path generation mode is written to the value referenced by
57565bd8deadSopenharmony_ci    the /value/ pointer.
57575bd8deadSopenharmony_ci
57585bd8deadSopenharmony_ci    If /pname/ is PATH_GEN_COLOR_FORMAT_NV, the scalar value of the
57595bd8deadSopenharmony_ci    respective color's path generation color format is written to the
57605bd8deadSopenharmony_ci    value reference by the /value/ pointer.
57615bd8deadSopenharmony_ci
57625bd8deadSopenharmony_ci    If /pname/ is PATH_GEN_COEFF_NV, 16 coefficients for the respective
57635bd8deadSopenharmony_ci    color's path generation are written to the array referenced by the
57645bd8deadSopenharmony_ci    /value/ pointer.  Assuming no error is generated, 16 coefficients
57655bd8deadSopenharmony_ci    are written no matter what the path color generation mode is though
57665bd8deadSopenharmony_ci    coefficients not accessed by the indicated path color generation
57675bd8deadSopenharmony_ci    mode are returned as zero.
57685bd8deadSopenharmony_ci
57695bd8deadSopenharmony_ci    The queries
57705bd8deadSopenharmony_ci
57715bd8deadSopenharmony_ci        void GetPathTexGenivNV(enum texCoordSet, enum pname, int *value);
57725bd8deadSopenharmony_ci        void GetPathTexGenfvNV(enum texCoordSet, enum pname, float *value);
57735bd8deadSopenharmony_ci
57745bd8deadSopenharmony_ci    return path texture coordinate set generation state.  /texCoordSet/
57755bd8deadSopenharmony_ci    indicates the texture coordinate set being queried and must be
57765bd8deadSopenharmony_ci    one of TEXTURE0 through TEXTUREn where /n/ is one less than the
57775bd8deadSopenharmony_ci    implementation-dependent value of MAX_TEXTURE_COORDS; otherwise
57785bd8deadSopenharmony_ci    INVALID_ENUM is generated.  /pname/ must be either PATH_GEN_MODE_NV
57795bd8deadSopenharmony_ci    PATH_GEN_COMPONENTS_NV, or PATH_GEN_COEFF_NV.
57805bd8deadSopenharmony_ci
57815bd8deadSopenharmony_ci    If /pname/ is PATH_GEN_MODE_NV, the scalar value of the respective
57825bd8deadSopenharmony_ci    texture coordinate set's path generation mode is written to the
57835bd8deadSopenharmony_ci    value referenced by the /value/ pointer.
57845bd8deadSopenharmony_ci
57855bd8deadSopenharmony_ci    If /pname/ is PATH_GEN_COMPONENTS_NV, the scalar value of the
57865bd8deadSopenharmony_ci    respective texture coordinate set's path generation number of
57875bd8deadSopenharmony_ci    components is written to the value reference by the /value/ pointer.
57885bd8deadSopenharmony_ci
57895bd8deadSopenharmony_ci    If /pname/ is PATH_GEN_COEFF_NV, 16 coefficients for the respective
57905bd8deadSopenharmony_ci    texture coordinate set's path generation are written to the array
57915bd8deadSopenharmony_ci    referenced by the /value/ pointer.  Assuming no error is generated, 16
57925bd8deadSopenharmony_ci    coefficients are written no matter what the path texture generation
57935bd8deadSopenharmony_ci    mode is though coefficients not accessed by the indicated path
57945bd8deadSopenharmony_ci    texture generation mode are returned as zero.
57955bd8deadSopenharmony_ci
57965bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications
57975bd8deadSopenharmony_ci
57985bd8deadSopenharmony_ci    Path objects are shared between AGL/GLX/WGL rendering contexts if
57995bd8deadSopenharmony_ci    and only if the rendering contexts share display lists.  No change
58005bd8deadSopenharmony_ci    is made to the AGL/GLX/WGL API.
58015bd8deadSopenharmony_ci
58025bd8deadSopenharmony_ci    Changes to path objects shared between multiple rendering contexts
58035bd8deadSopenharmony_ci    will be serialized (i.e., the changes, queries, deletions, and
58045bd8deadSopenharmony_ci    stencil/cover operations will occur in a specific order).
58055bd8deadSopenharmony_ci
58065bd8deadSopenharmony_ciAdditions to the OpenGL Shading Language
58075bd8deadSopenharmony_ci
58085bd8deadSopenharmony_ci    None
58095bd8deadSopenharmony_ci
58105bd8deadSopenharmony_ciGLX Protocol
58115bd8deadSopenharmony_ci
58125bd8deadSopenharmony_ci    XXX
58135bd8deadSopenharmony_ci
58145bd8deadSopenharmony_ciErrors
58155bd8deadSopenharmony_ci
58165bd8deadSopenharmony_ci    XXX
58175bd8deadSopenharmony_ci
58185bd8deadSopenharmony_ciDependencies on ARB_program_interface_query.
58195bd8deadSopenharmony_ci
58205bd8deadSopenharmony_ci    When ARB_program_interface_query is not supported, all references to
58215bd8deadSopenharmony_ci    FRAGMENT_INPUT_NV and ProgramPathFragmentInputGenNV should be ignored.
58225bd8deadSopenharmony_ci
58235bd8deadSopenharmony_ciDependencies on Core Profile and OpenGL ES
58245bd8deadSopenharmony_ci
58255bd8deadSopenharmony_ci    When NV_path_rendering is advertised, the following functionality
58265bd8deadSopenharmony_ci    must be supported...
58275bd8deadSopenharmony_ci
58285bd8deadSopenharmony_ci    References to the following commands should be ignored:
58295bd8deadSopenharmony_ci
58305bd8deadSopenharmony_ci        PathColorGenNV
58315bd8deadSopenharmony_ci        PathTexGenNV
58325bd8deadSopenharmony_ci        PathFogGenNV
58335bd8deadSopenharmony_ci        GetPathColorGenivNV
58345bd8deadSopenharmony_ci        GetPathColorGenfvNV
58355bd8deadSopenharmony_ci        GetPathTexGenivNV
58365bd8deadSopenharmony_ci        GetPathTexGenfvNV
58375bd8deadSopenharmony_ci
58385bd8deadSopenharmony_ci    including the state set and queried by these commands.
58395bd8deadSopenharmony_ci
58405bd8deadSopenharmony_ci    References to the following tokens should be ignored:
58415bd8deadSopenharmony_ci
58425bd8deadSopenharmony_ci        PATH_FOG_GEN_MODE_NV
58435bd8deadSopenharmony_ci        PRIMARY_COLOR
58445bd8deadSopenharmony_ci        PRIMARY_COLOR_NV
58455bd8deadSopenharmony_ci        SECONDARY_COLOR_NV
58465bd8deadSopenharmony_ci        PATH_GEN_COLOR_FORMAT_NV
58475bd8deadSopenharmony_ci
58485bd8deadSopenharmony_ci    References to the following GLSL built-in variables should be ignored:
58495bd8deadSopenharmony_ci
58505bd8deadSopenharmony_ci        gl_TexCoord
58515bd8deadSopenharmony_ci        gl_MaxTextureCoords
58525bd8deadSopenharmony_ci        gl_Color
58535bd8deadSopenharmony_ci        gl_FrontColor
58545bd8deadSopenharmony_ci        gl_BackColor
58555bd8deadSopenharmony_ci        gl_SecondaryColor
58565bd8deadSopenharmony_ci        gl_FrontSecondaryColor
58575bd8deadSopenharmony_ci        gl_BackSecondaryColor
58585bd8deadSopenharmony_ci        gl_FogFragCoord
58595bd8deadSopenharmony_ci
58605bd8deadSopenharmony_ci    The following types are defined as alias to the GL tokens:
58615bd8deadSopenharmony_ci
58625bd8deadSopenharmony_ci        2_BYTES_NV                                      0x1407 // from GL compat
58635bd8deadSopenharmony_ci        3_BYTES_NV                                      0x1408 // from GL compat
58645bd8deadSopenharmony_ci        4_BYTES_NV                                      0x1409 // from GL compat
58655bd8deadSopenharmony_ci        EYE_LINEAR_NV                                   0x2400 // from GL compat
58665bd8deadSopenharmony_ci        OBJECT_LINEAR_NV                                0x2401 // from GL compat
58675bd8deadSopenharmony_ci        CONSTANT_NV                                     0x8576 // from GL compat
58685bd8deadSopenharmony_ci
58695bd8deadSopenharmony_ci    The following entry points (specified by the EXT_direct_state_access
58705bd8deadSopenharmony_ci    extension) MUST be supported:
58715bd8deadSopenharmony_ci
58725bd8deadSopenharmony_ci        void MatrixLoadfEXT(enum matrixMode, const float *m);
58735bd8deadSopenharmony_ci        void MatrixLoaddEXT(enum matrixMode, const double *m);
58745bd8deadSopenharmony_ci
58755bd8deadSopenharmony_ci        void MatrixMultfEXT(enum matrixMode, const float *m);
58765bd8deadSopenharmony_ci        void MatrixMultdEXT(enum matrixMode, const double *m);
58775bd8deadSopenharmony_ci
58785bd8deadSopenharmony_ci        void MatrixLoadTransposefEXT(enum matrixMode, const float *m);
58795bd8deadSopenharmony_ci        void MatrixLoadTransposedEXT(enum matrixMode, const float *m);
58805bd8deadSopenharmony_ci
58815bd8deadSopenharmony_ci        void MatrixMultTransposefEXT(enum matrixMode, const float *m);
58825bd8deadSopenharmony_ci        void MatrixMultTransposedEXT(enum matrixMode, const float *m);
58835bd8deadSopenharmony_ci
58845bd8deadSopenharmony_ci        void MatrixLoadIdentityEXT(enum matrixMode);
58855bd8deadSopenharmony_ci
58865bd8deadSopenharmony_ci        void MatrixRotatefEXT(enum matrixMode, float angle,
58875bd8deadSopenharmony_ci                              float x, float y, float z);
58885bd8deadSopenharmony_ci        void MatrixRotatedEXT(enum matrixMode, double angle,
58895bd8deadSopenharmony_ci                              double x, double y, double z);
58905bd8deadSopenharmony_ci
58915bd8deadSopenharmony_ci        void MatrixScalefEXT(enum matrixMode,
58925bd8deadSopenharmony_ci                             float x, float y, float z);
58935bd8deadSopenharmony_ci        void MatrixScaledEXT(enum matrixMode,
58945bd8deadSopenharmony_ci                             double x, double y, double z);
58955bd8deadSopenharmony_ci
58965bd8deadSopenharmony_ci        void MatrixTranslatefEXT(enum matrixMode,
58975bd8deadSopenharmony_ci                                 float x, float y, float z);
58985bd8deadSopenharmony_ci        void MatrixTranslatedEXT(enum matrixMode,
58995bd8deadSopenharmony_ci                                 double x, double y, double z);
59005bd8deadSopenharmony_ci
59015bd8deadSopenharmony_ci        void MatrixOrthoEXT(enum matrixMode, double l, double r,
59025bd8deadSopenharmony_ci                            double b, double t, double n, double f);
59035bd8deadSopenharmony_ci        void MatrixFrustumEXT(enum matrixMode, double l, double r,
59045bd8deadSopenharmony_ci                              double b, double t, double n, double f);
59055bd8deadSopenharmony_ci
59065bd8deadSopenharmony_ci        void MatrixPushEXT(enum matrixMode);
59075bd8deadSopenharmony_ci        void MatrixPopEXT(enum matrixMode);
59085bd8deadSopenharmony_ci
59095bd8deadSopenharmony_ci    These commands must support the PATH_PROJECTION_NV and PATH_MODELVIEW_NV
59105bd8deadSopenharmony_ci    tokens for matrixMode.  The associated modelview and projection matrix
59115bd8deadSopenharmony_ci    state, including matrix stacks, MUST be supported.  These token values
59125bd8deadSopenharmony_ci    for matrices are supported:
59135bd8deadSopenharmony_ci
59145bd8deadSopenharmony_ci        PATH_PROJECTION_NV                                    0x1701
59155bd8deadSopenharmony_ci        PATH_MODELVIEW_NV                                     0x1700
59165bd8deadSopenharmony_ci
59175bd8deadSopenharmony_ci        PATH_MODELVIEW_STACK_DEPTH_NV                         0x0BA3
59185bd8deadSopenharmony_ci        PATH_MODELVIEW_MATRIX_NV                              0x0BA6
59195bd8deadSopenharmony_ci        PATH_MAX_MODELVIEW_STACK_DEPTH_NV                     0x0D36
59205bd8deadSopenharmony_ci        PATH_TRANSPOSE_MODELVIEW_MATRIX_NV                    0x84E3
59215bd8deadSopenharmony_ci        PATH_PROJECTION_STACK_DEPTH_NV                        0x0BA4
59225bd8deadSopenharmony_ci        PATH_PROJECTION_MATRIX_NV                             0x0BA7
59235bd8deadSopenharmony_ci        PATH_MAX_PROJECTION_STACK_DEPTH_NV                    0x0D38
59245bd8deadSopenharmony_ci        PATH_TRANSPOSE_PROJECTION_MATRIX_NV                   0x84E4
59255bd8deadSopenharmony_ci
59265bd8deadSopenharmony_ci    The last 8 tokens are supported by GetFloatv, GetIntegerv, GetDoublev
59275bd8deadSopenharmony_ci    to query associated path modelview and projection state.
59285bd8deadSopenharmony_ci
59295bd8deadSopenharmony_ci    The values of sc, tc, rc, and qc discussed in section 5.X.2.2 "Path
59305bd8deadSopenharmony_ci    Covering" are always zero in a Core profile context as these values
59315bd8deadSopenharmony_ci    involve deprecated state.
59325bd8deadSopenharmony_ci
59335bd8deadSopenharmony_ciNew State
59345bd8deadSopenharmony_ci
59355bd8deadSopenharmony_ci -- NEW table 6.X, "Path (state per context)" following Table 6.33, "Renderbuffer"
59365bd8deadSopenharmony_ci
59375bd8deadSopenharmony_ci    Get Value                            Type     Get Command          Initial Value   Description               Section       Attribute
59385bd8deadSopenharmony_ci    -----------------------------------  -------  -------------------  --------------  ------------------------  ------------  --------------
59395bd8deadSopenharmony_ci    PATH_GEN_MODE_NV                     2xZ4     GetPathColorGenivNV  NONE            path's color              6.X.5         lighting
59405bd8deadSopenharmony_ci                                                                                       generation mode
59415bd8deadSopenharmony_ci    PATH_GEN_COLOR_FORMAT_NV             2xZ6     GetPathColorGenivNV  NONE            path's color              6.X.5         lighting
59425bd8deadSopenharmony_ci                                                                                       generation color format
59435bd8deadSopenharmony_ci    PATH_GEN_COEFF_NV                    2x16xR   GetPathColorGenfvNV  all 0's         path's color gen mode     6.X.5         lighting
59445bd8deadSopenharmony_ci                                                                                       generation coefficients
59455bd8deadSopenharmony_ci    PATH_GEN_MODE_NV                     nxZ4     GetPathTexGenivNV    NONE            path's texture            6.X.5         texture
59465bd8deadSopenharmony_ci                                                                                       generation mode
59475bd8deadSopenharmony_ci    PATH_GEN_COMPONENTS_NV               nxZ5     GetPathTexGenivNV    0               path's texture            6.X.5         texture
59485bd8deadSopenharmony_ci                                                                                       generation number of
59495bd8deadSopenharmony_ci                                                                                       components
59505bd8deadSopenharmony_ci    PATH_GEN_COEFF_NV                    nx16xR   GetPathTexGenfvNV    all 0's         path's texture            6.X.5         texture
59515bd8deadSopenharmony_ci                                                                                       generation coefficients
59525bd8deadSopenharmony_ci    PATH_FOG_GEN_MODE_NV                 Z2       GetIntegerv          FRAGMENT_DEPTH  path's fog generation     5.X.2.1       fog
59535bd8deadSopenharmony_ci                                                                                       mode
59545bd8deadSopenharmony_ci    PATH_ERROR_POSITION_NV               Z        GetIntegerv          -1              last path string          5.X.1.2       -
59555bd8deadSopenharmony_ci                                                                                       error position
59565bd8deadSopenharmony_ci    PATH_STENCIL_FUNC_NV                 Z8       GetIntegerv          ALWAYS          path stenciling function  5.X.2.1       stencil-buffer
59575bd8deadSopenharmony_ci    PATH_STENCIL_REF_NV                  Z+       GetIntegerv          0               path stenciling           5.X.2.1       stencil-buffer
59585bd8deadSopenharmony_ci                                                                                       reference value
59595bd8deadSopenharmony_ci    PATH_STENCIL_VALUE_MASK_NV           Z+       GetIntegerv          1's             path stencil read mask    5.X.2.1       stencil-buffer
59605bd8deadSopenharmony_ci    PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV  R        GetFloatv            0               path stencil depth        5.X.2.1       polygon
59615bd8deadSopenharmony_ci                                                                                       offset factor
59625bd8deadSopenharmony_ci    PATH_STENCIL_DEPTH_OFFSET_UNITS_NV   R        GetFloatv            0               path stencil depth        5.X.2.1       polygon
59635bd8deadSopenharmony_ci                                                                                       units factor
59645bd8deadSopenharmony_ci    PATH_COVER_DEPTH_FUNC_NV             Z8       GetIntegerv          LESS            path covering depth       5.X.2.2       depth-buffer
59655bd8deadSopenharmony_ci                                                                                       function
59665bd8deadSopenharmony_ci
59675bd8deadSopenharmony_ci    where n is the implementation-dependent number of texture coordinate
59685bd8deadSopenharmony_ci    sets (MAX_TEXTURE_COORDS).
59695bd8deadSopenharmony_ci
59705bd8deadSopenharmony_ci -- NEW table 6.Y, "Path (state per path object)" following Table 6.X
59715bd8deadSopenharmony_ci
59725bd8deadSopenharmony_ci    Get Value                        Type     Get Command           Initial Value         Description                       Section       Attribute
59735bd8deadSopenharmony_ci    -------------------------------  -------  --------------------  --------------------  --------------------------------  ------------  ---------
59745bd8deadSopenharmony_ci    -                                nxZ8*    GetPathCommandsNV     -                     path's sequence of path commands  6.X.1         -
59755bd8deadSopenharmony_ci    -                                mxR      GetPathCoordsNV       -                     path's sequence of path           6.X.1         -
59765bd8deadSopenharmony_ci                                                                                          coordinates
59775bd8deadSopenharmony_ci    -                                cxR      GetPathDashArrayNV    -                     dash array contents               5.X.1.5       -
59785bd8deadSopenharmony_ci    PATH_COMMAND_COUNT_NV            Z+       GetPathParameterivNV  -                     path's count of path commands     6.X.1         -
59795bd8deadSopenharmony_ci    PATH_COORD_COUNT_NV              Z+       GetPathParameterivNV  -                     path's count of path coordinates  6.X.1         -
59805bd8deadSopenharmony_ci    PATH_COMPUTED_LENGTH_NV          R+       GetPathParameterfvNV  -                     GL's calculation of the path's    6.X.1         -
59815bd8deadSopenharmony_ci                                                                                          length
59825bd8deadSopenharmony_ci    PATH_STROKE_WIDTH_NV             R+       GetPathParameterfvNV  1.0                   stroke width                      5.X.1.5       -
59835bd8deadSopenharmony_ci    PATH_INITIAL_END_CAP_NV          Z4       GetPathParameterivNV  FLAT                  path's initial end cap style      5.X.1.5       -
59845bd8deadSopenharmony_ci    PATH_TERMINAL_END_CAP_NV         Z4       GetPathParameterivNV  FLAT                  path's terminal end cap style     5.X.1.5       -
59855bd8deadSopenharmony_ci    PATH_JOIN_STYLE_NV               Z4       GetPathParameterivNV  MITER_REVERT_NV       path's join style                 5.X.1.5       -
59865bd8deadSopenharmony_ci    PATH_MITER_LIMIT_NV              R+       GetPathParameterfvNV  4                     path's miter limit                5.X.1.5       -
59875bd8deadSopenharmony_ci    PATH_DASH_ARRAY_COUNT_NV         Z+       GetPathParameterivNV  0                     path's count of dashes in the     5.X.1.5       -
59885bd8deadSopenharmony_ci                                                                                          path's dash array                 5.X.1.5       -
59895bd8deadSopenharmony_ci    PATH_DASH_OFFSET_NV              R        GetPathParameterfvNV  0.0                   path's dash offset                5.X.1.5       -
59905bd8deadSopenharmony_ci    PATH_DASH_OFFSET_RESET_NV        Z2       GetPathParameterivNV  MOVE_TO_CONTINUES_NV  path's dash offset reset          5.X.1.5       -
59915bd8deadSopenharmony_ci    PATH_CLIENT_LENGTH_NV            R+       GetPathParameterfvNV  0.0                   the client-supplied calculation   5.X.1.5       -
59925bd8deadSopenharmony_ci                                                                                          of the path's length
59935bd8deadSopenharmony_ci    PATH_INITIAL_DASH_CAP_NV         Z4       GetPathParameterivNV  FLAT                  path's initial dash cap style     5.X.1.5       -
59945bd8deadSopenharmony_ci    PATH_TERMINAL_DASH_CAP_NV        Z4       GetPathParameterivNV  FLAT                  path's terminal dash cap style    5.X.1.5       -
59955bd8deadSopenharmony_ci    PATH_FILL_MODE_NV                Z3       GetPathParameterivNV  COUNT_UP_NV           path's default fill mode          5.X.1.5       -
59965bd8deadSopenharmony_ci    PATH_FILL_MASK_NV                Z+       GetPathParameterivNV  all 1's               path's default fill mask          5.X.1.5       -
59975bd8deadSopenharmony_ci    PATH_FILL_COVER_MODE_NV          Z4       GetPathParameterivNV  CONVEX_HULL_NV        path's default fill cover mode    5.X.1.5       -
59985bd8deadSopenharmony_ci    PATH_STROKE_COVER_MODE_NV        Z4       GetPathParameterivNV  CONVEX_HULL_NV        path's default stroke cover mode  5.X.1.5       -
59995bd8deadSopenharmony_ci    PATH_STROKE_MASK_NV              Z+       GetPathParameterivNV  all 1's               path's default stroke mask        5.X.1.5       -
60005bd8deadSopenharmony_ci    PATH_STROKE_BOUND_NV             R[0,1]   GetPathParameterfvNV  0.2 (20%)             path's stroke approximation       5.X.1.5       -
60015bd8deadSopenharmony_ci                                                                                          bound
60025bd8deadSopenharmony_ci    PATH_OBJECT_BOUNDING_BOX_NV      R4       GetPathParameterfvNV  -                     path's outline bounding box       6.X.1         -
60035bd8deadSopenharmony_ci    PATH_FILL_BOUNDING_BOX_NV        R4       GetPathParameterfvNV  -                     path's fill bounding box          6.X.1         -
60045bd8deadSopenharmony_ci    PATH_STROKE_BOUNDING_BOX_NV      R4       GetPathParameterfvNV  -                     path's stroke bounding box        6.X.1         -
60055bd8deadSopenharmony_ci
60065bd8deadSopenharmony_ci    where n is the number of commands in a path object, m is the number
60075bd8deadSopenharmony_ci    of coordinates in a path object, and c is the dash array count of
60085bd8deadSopenharmony_ci    a path object.
60095bd8deadSopenharmony_ci
60105bd8deadSopenharmony_ci -- NEW table 6.Z, "Path Glyph Metrics (state per path object)" following Table 6.Z
60115bd8deadSopenharmony_ci
60125bd8deadSopenharmony_ci    Get Value                                Type     Get Command            Initial Value  Description                  Section       Attribute
60135bd8deadSopenharmony_ci    ---------------------------------------  -------  ---------------------  -------------  ---------------------------  ------------  ---------
60145bd8deadSopenharmony_ci    GLYPH_WIDTH_BIT_NV                       R        GetPathMetricsNV  see 5.X.1.3    path's glyph width                6.X.3         -
60155bd8deadSopenharmony_ci    GLYPH_HEIGHT_BIT_NV                      R        GetPathMetricsNV  see 5.X.1.3    path's glyph height               6.X.3         -
60165bd8deadSopenharmony_ci    GLYPH_HORIZONTAL_BEARING_X_BIT_NV        R        GetPathMetricsNV  see 5.X.1.3    path's glyph left side bearing    6.X.3         -
60175bd8deadSopenharmony_ci                                                                                       for horizontal layout
60185bd8deadSopenharmony_ci    GLYPH_HORIZONTAL_BEARING_Y_BIT_NV        R        GetPathMetricsNV  see 5.X.1.3    path's glyph top side bearing     6.X.3         -
60195bd8deadSopenharmony_ci                                                                                       for horizontal layout
60205bd8deadSopenharmony_ci    GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV  R        GetPathMetricsNV  see 5.X.1.3    path's glyph advance width        6.X.3         -
60215bd8deadSopenharmony_ci                                                                                       for horizontal layout
60225bd8deadSopenharmony_ci    GLYPH_VERTICAL_BEARING_X_BIT_NV          R        GetPathMetricsNV  see 5.X.1.3    path's glyph left side bearing    6.X.3         -
60235bd8deadSopenharmony_ci                                                                                       for vertical layout
60245bd8deadSopenharmony_ci    GLYPH_VERTICAL_BEARING_Y_BIT_NV          R        GetPathMetricsNV  see 5.X.1.3    path's glyph top side bearing     6.X.3         -
60255bd8deadSopenharmony_ci                                                                                       for vertical layout
60265bd8deadSopenharmony_ci    GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV    R        GetPathMetricsNV  see 5.X.1.3    path's glyph advance width        6.X.3         -
60275bd8deadSopenharmony_ci                                                                                       for vertical layout
60285bd8deadSopenharmony_ci    GLYPH_HAS_KERNING_BIT_NV                 B        GetPathMetricsNV  see 5.X.1.3    whether or not glyph has kerning  6.X.3         -
60295bd8deadSopenharmony_ci                                                                                       table
60305bd8deadSopenharmony_ci
60315bd8deadSopenharmony_ci -- NEW table 6.W, "Path Font Metrics (state per path object though identical for glyphs from the same font face)" following Table 6.Z
60325bd8deadSopenharmony_ci
60335bd8deadSopenharmony_ci    Get Value                        Type     Get Command       Initial Value  Description                              Section       Attribute
60345bd8deadSopenharmony_ci    -------------------------------  -------  ----------------  -------------  ---------------------------------------  ------------  ---------
60355bd8deadSopenharmony_ci    FONT_X_MIN_BOUNDS_BIT_NV         R        GetPathMetricsNV  see 5.X.1.3    path's horizontal minimum (left-most)    6.X.3         -
60365bd8deadSopenharmony_ci                                                                               of the font bounding box
60375bd8deadSopenharmony_ci    FONT_Y_MIN_BOUNDS_BIT_NV         R        GetPathMetricsNV  see 5.X.1.3    path's vertical minimum (bottom-most)    6.X.3         -
60385bd8deadSopenharmony_ci                                                                               of the font bounding box
60395bd8deadSopenharmony_ci    FONT_X_MAX_BOUNDS_BIT_NV         R        GetPathMetricsNV  see 5.X.1.3    path's horizontal maximum (right-most)   6.X.3         -
60405bd8deadSopenharmony_ci                                                                               of the font bounding box
60415bd8deadSopenharmony_ci    FONT_Y_MAX_BOUNDS_BIT_NV         R        GetPathMetricsNV  see 5.X.1.3    path's vertical maximum (top-most)       6.X.3         -
60425bd8deadSopenharmony_ci                                                                               of the font bounding box
60435bd8deadSopenharmony_ci    FONT_UNITS_PER_EM_BIT_NV         R        GetPathMetricsNV  see 5.X.1.3    path's number of units in path space     6.X.3         -
60445bd8deadSopenharmony_ci                                                                               (font units) per Em square for font
60455bd8deadSopenharmony_ci                                                                               face
60465bd8deadSopenharmony_ci    FONT_ASCENDER_BIT_NV             R        GetPathMetricsNV  see 5.X.1.3    path's typographical ascender (in font   6.X.3         -
60475bd8deadSopenharmony_ci                                                                               units) of the font face
60485bd8deadSopenharmony_ci    FONT_DESCENDER_BIT_NV            R        GetPathMetricsNV  see 5.X.1.3    path's typographical descender (in font  6.X.3         -
60495bd8deadSopenharmony_ci                                                                               units) of the font face
60505bd8deadSopenharmony_ci    FONT_HEIGHT_BIT_NV               R+       GetPathMetricsNV  see 5.X.1.3    path's font face vertical distance       6.X.3         -
60515bd8deadSopenharmony_ci                                                                               between two consecutive baselines
60525bd8deadSopenharmony_ci                                                                               (in font units)
60535bd8deadSopenharmony_ci    FONT_MAX_ADVANCE_WIDTH_BIT_NV    R        GetPathMetricsNV  see 5.X.1.3    path's maximal advance width (in font    6.X.3         -
60545bd8deadSopenharmony_ci                                                                               units) for all glyphs in font face
60555bd8deadSopenharmony_ci    FONT_MAX_ADVANCE_HEIGHT_BIT_NV   R        GetPathMetricsNV  see 5.X.1.3    path's maximal advance height (in font   6.X.3         -
60565bd8deadSopenharmony_ci                                                                               units) for all glyphs in font face
60575bd8deadSopenharmony_ci                                                                               for vertical layout
60585bd8deadSopenharmony_ci    FONT_UNDERLINE_POSITION_BIT_NV   R        GetPathMetricsNV  see 5.X.1.3    path's position (in font units) of the   6.X.3         -
60595bd8deadSopenharmony_ci                                                                               center of underline line for font face
60605bd8deadSopenharmony_ci    FONT_UNDERLINE_THICKNESS_BIT_NV  R        GetPathMetricsNV  see 5.X.1.3    thickness (in font units) of the         6.X.3         -
60615bd8deadSopenharmony_ci                                                                               underline for font face
60625bd8deadSopenharmony_ci    FONT_HAS_KERNING_BIT_NV          B        GetPathMetricsNV  see 5.X.1.3    whether or not glyph has kerning         6.X.3         -
60635bd8deadSopenharmony_ci                                                                               table
60645bd8deadSopenharmony_ci    FONT_NUM_GLYPH_INDICES_BIT_NV    Z+       GetPathMetricsNV  see 5.X.1.3    number of glyph indices in font face     6.X.3         -
60655bd8deadSopenharmony_ci
60665bd8deadSopenharmony_ci    Increment "n" in the Type field of the "Program Interface State"
60675bd8deadSopenharmony_ci    table by 1 to correspond to the FRAGMENT_INPUT_NV program interface.
60685bd8deadSopenharmony_ci
60695bd8deadSopenharmony_ci    Add the following rows to the table labeled "Program Object Resource
60705bd8deadSopenharmony_ci    State" (only fragment input resources support this state):
60715bd8deadSopenharmony_ci
60725bd8deadSopenharmony_ci                                                        Initial
60735bd8deadSopenharmony_ci    Get Value               Type  Get Command           Value      Description                                  Sec.
60745bd8deadSopenharmony_ci    ----------------------  ----  --------------------  ---------  -------------------------------------------  -----
60755bd8deadSopenharmony_ci    PATH_GEN_MODE_NV         Z4    GetProgramResourceiv  NONE       Path fragment input generation mode
60765bd8deadSopenharmony_ci    PATH_GEN_COMPONENTS_NV   Z5    GetProgramResourceiv  0          Number of path fragment input components
60775bd8deadSopenharmony_ci    PATH_GEN_COEFF_NV        16*R  GetProgramResourceiv  all zeros  Path fragment input generation coefficients
60785bd8deadSopenharmony_ci
60795bd8deadSopenharmony_ciNew Implementation Dependent State
60805bd8deadSopenharmony_ci
60815bd8deadSopenharmony_ci    None
60825bd8deadSopenharmony_ci
60835bd8deadSopenharmony_ciNVIDIA Implementation Details
60845bd8deadSopenharmony_ci
60855bd8deadSopenharmony_ci -- API revision 1.0
60865bd8deadSopenharmony_ci
60875bd8deadSopenharmony_ci    Released in NVIDIA Driver Release 275.33 (June 2011).
60885bd8deadSopenharmony_ci
60895bd8deadSopenharmony_ci -- API revision 1.1
60905bd8deadSopenharmony_ci
60915bd8deadSopenharmony_ci    Follow-on release (circa September 2011) adds these path
60925bd8deadSopenharmony_ci    commands for ISO PDF 32000 support:
60935bd8deadSopenharmony_ci
60945bd8deadSopenharmony_ci        GL_RESTART_PATH_NV
60955bd8deadSopenharmony_ci        GL_DUP_FIRST_CUBIC_CURVE_TO_NV
60965bd8deadSopenharmony_ci        GL_DUP_LAST_CUBIC_CURVE_TO_NV
60975bd8deadSopenharmony_ci        GL_RECT_NV
60985bd8deadSopenharmony_ci
60995bd8deadSopenharmony_ci    These path commands are not operational (generate GL_INVALID_ENUM
61005bd8deadSopenharmony_ci    errors) if used in 275.xx or 280.xx drivers.
61015bd8deadSopenharmony_ci
61025bd8deadSopenharmony_ci    Follow-on release (circa September 2011) adds these transformType
61035bd8deadSopenharmony_ci    parameters:
61045bd8deadSopenharmony_ci
61055bd8deadSopenharmony_ci        GL_NONE
61065bd8deadSopenharmony_ci        GL_TRANSLATE_3D_NV
61075bd8deadSopenharmony_ci        GL_AFFINE_3D_NV
61085bd8deadSopenharmony_ci        GL_TRANSPOSE_AFFINE_3D_NV
61095bd8deadSopenharmony_ci
61105bd8deadSopenharmony_ci    These transformType tokens are not operational (generate
61115bd8deadSopenharmony_ci    GL_INVALID_ENUM errors) if used in 275.xx or 280.xx drivers.
61125bd8deadSopenharmony_ci
61135bd8deadSopenharmony_ci -- API revision 1.2
61145bd8deadSopenharmony_ci
61155bd8deadSopenharmony_ci    Follow-on release (circa December 2013) adding these commands:
61165bd8deadSopenharmony_ci
61175bd8deadSopenharmony_ci        void glMatrixLoad3x2fNV(GLenum matrixMode, const GLfloat *m);
61185bd8deadSopenharmony_ci        void glMatrixLoad3x3fNV(GLenum matrixMode, const GLfloat *m);
61195bd8deadSopenharmony_ci        void glMatrixLoadTranspose3x3fNV(GLenum matrixMode, const GLfloat *m);
61205bd8deadSopenharmony_ci
61215bd8deadSopenharmony_ci        void glMatrixMult3x2fNV(GLenum matrixMode, const GLfloat *m);
61225bd8deadSopenharmony_ci        void glMatrixMult3x3fNV(GLenum matrixMode, const GLfloat *m);
61235bd8deadSopenharmony_ci        void glMatrixMultTranspose3x3fNV(GLenum matrixMode, const GLfloat *m);
61245bd8deadSopenharmony_ci
61255bd8deadSopenharmony_ci        void glStencilThenCoverFillPathNV(GLuint path, GLenum fillMode,
61265bd8deadSopenharmony_ci                                          GLuint mask, GLenum coverMode);
61275bd8deadSopenharmony_ci        void glStencilThenCoverStrokePathNV(GLuint path, GLint reference,
61285bd8deadSopenharmony_ci                                            GLuint mask, GLenum coverMode);
61295bd8deadSopenharmony_ci        void glStencilThenCoverFillPathInstancedNV(GLsizei numPaths,
61305bd8deadSopenharmony_ci                                                   GLenum pathNameType,
61315bd8deadSopenharmony_ci                                                   const void *paths,
61325bd8deadSopenharmony_ci                                                   GLuint pathBase,
61335bd8deadSopenharmony_ci                                                   GLenum fillMode, uint mask,
61345bd8deadSopenharmony_ci                                                   GLenum coverMode,
61355bd8deadSopenharmony_ci                                                   GLenum transformType,
61365bd8deadSopenharmony_ci                                                   const GLfloat *transformValues);
61375bd8deadSopenharmony_ci        void glStencilThenCoverStrokePathInstancedNV(GLsizei numPaths,
61385bd8deadSopenharmony_ci                                                     GLenum pathNameType,
61395bd8deadSopenharmony_ci                                                     const void *paths,
61405bd8deadSopenharmony_ci                                                     GLuint pathBase,
61415bd8deadSopenharmony_ci                                                     GLint reference, uint mask,
61425bd8deadSopenharmony_ci                                                     GLenum coverMode,
61435bd8deadSopenharmony_ci                                                     GLenum transformType,
61445bd8deadSopenharmony_ci                                                     const GLfloat *transformValues);
61455bd8deadSopenharmony_ci        enum glPathGlyphIndexRangeNV(GLenum fontTarget,
61465bd8deadSopenharmony_ci                                     const void *fontName,
61475bd8deadSopenharmony_ci                                     GLbitfield fontStyle,
61485bd8deadSopenharmony_ci                                     GLuint pathParameterTemplate,
61495bd8deadSopenharmony_ci                                     GLfloat emScale,
61505bd8deadSopenharmony_ci                                     GLuint baseAndCount[2]);
61515bd8deadSopenharmony_ci
61525bd8deadSopenharmony_ci    If the window system's GetProcAddress mechanism for GL commands returns
61535bd8deadSopenharmony_ci    NULL for these function names, these API revision 1.2 features are
61545bd8deadSopenharmony_ci    not available.  Likewise the these tokens are not supported either.
61555bd8deadSopenharmony_ci
61565bd8deadSopenharmony_ci        GL_ROUNDED_RECT_NV
61575bd8deadSopenharmony_ci        GL_RELATIVE_ROUNDED_RECT_NV
61585bd8deadSopenharmony_ci        GL_ROUNDED_RECT2_NV
61595bd8deadSopenharmony_ci        GL_RELATIVE_ROUNDED_RECT2_NV
61605bd8deadSopenharmony_ci        GL_ROUNDED_RECT4_NV
61615bd8deadSopenharmony_ci        GL_RELATIVE_ROUNDED_RECT4_NV
61625bd8deadSopenharmony_ci        GL_ROUNDED_RECT8_NV
61635bd8deadSopenharmony_ci        GL_RELATIVE_ROUNDED_RECT8_NV
61645bd8deadSopenharmony_ci        GL_RELATIVE_RECT_NV
61655bd8deadSopenharmony_ci
61665bd8deadSopenharmony_ci    These tokens may be returned by glPathGlyphIndexRangeNV:
61675bd8deadSopenharmony_ci
61685bd8deadSopenharmony_ci        GL_FONT_GLYPHS_AVAILABLE_NV
61695bd8deadSopenharmony_ci        GL_FONT_TARGET_UNAVAILABLE_NV
61705bd8deadSopenharmony_ci        GL_FONT_UNAVAILABLE_NV
61715bd8deadSopenharmony_ci        GL_FONT_UNINTELLIGIBLE_NV
61725bd8deadSopenharmony_ci
61735bd8deadSopenharmony_ci -- API revision 1.3
61745bd8deadSopenharmony_ci
61755bd8deadSopenharmony_ci    Follow-on release (circa May 2014, first appearing in the 337.88
61765bd8deadSopenharmony_ci    drivers) adding these commands:
61775bd8deadSopenharmony_ci
61785bd8deadSopenharmony_ci    These new path commands:
61795bd8deadSopenharmony_ci
61805bd8deadSopenharmony_ci        GL_CONIC_CURVE_TO_NV
61815bd8deadSopenharmony_ci        GL_RELATIVE_CONIC_CURVE_TO_NV
61825bd8deadSopenharmony_ci        GL_RELATIVE_RECT_NV
61835bd8deadSopenharmony_ci
61845bd8deadSopenharmony_ci    New path glyph metric query:
61855bd8deadSopenharmony_ci
61865bd8deadSopenharmony_ci        GL_FONT_NUM_GLYPH_INDICES_BIT_NV
61875bd8deadSopenharmony_ci
61885bd8deadSopenharmony_ci    New return values from glyph index path specification commands:
61895bd8deadSopenharmony_ci
61905bd8deadSopenharmony_ci        GL_FONT_UNINTELLIGIBLE_NV
61915bd8deadSopenharmony_ci        GL_STANDARD_FONT_FORMAT_NV
61925bd8deadSopenharmony_ci
61935bd8deadSopenharmony_ci    New programInferface token:
61945bd8deadSopenharmony_ci
61955bd8deadSopenharmony_ci        FRAGMENT_INPUT_NV
61965bd8deadSopenharmony_ci
61975bd8deadSopenharmony_ci    New (aliased) matrix tokens for ES support:
61985bd8deadSopenharmony_ci
61995bd8deadSopenharmony_ci        PATH_PROJECTION_NV
62005bd8deadSopenharmony_ci        PATH_MODELVIEW_NV
62015bd8deadSopenharmony_ci
62025bd8deadSopenharmony_ci        PATH_MODELVIEW_STACK_DEPTH_NV
62035bd8deadSopenharmony_ci        PATH_MODELVIEW_MATRIX_NV
62045bd8deadSopenharmony_ci        PATH_MAX_MODELVIEW_STACK_DEPTH_NV
62055bd8deadSopenharmony_ci        PATH_TRANSPOSE_MODELVIEW_MATRIX_NV
62065bd8deadSopenharmony_ci        PATH_PROJECTION_STACK_DEPTH_NV
62075bd8deadSopenharmony_ci        PATH_PROJECTION_MATRIX_NV
62085bd8deadSopenharmony_ci        PATH_MAX_PROJECTION_STACK_DEPTH_NV
62095bd8deadSopenharmony_ci        PATH_TRANSPOSE_PROJECTION_MATRIX_NV
62105bd8deadSopenharmony_ci
62115bd8deadSopenharmony_ci    New glyph index path specification commands:
62125bd8deadSopenharmony_ci
62135bd8deadSopenharmony_ci        enum glPathGlyphIndexArrayNV(GLuint firstPathName,
62145bd8deadSopenharmony_ci                                     GLenum fontTarget,
62155bd8deadSopenharmony_ci                                     const void *fontName,
62165bd8deadSopenharmony_ci                                     GLbitfield fontStyle,
62175bd8deadSopenharmony_ci                                     GLuint firstGlyphIndex,
62185bd8deadSopenharmony_ci                                     GLsizei numGlyphs,
62195bd8deadSopenharmony_ci                                     GLuint pathParameterTemplate,
62205bd8deadSopenharmony_ci                                     GLfloat emScale);
62215bd8deadSopenharmony_ci        enum glPathMemoryGlyphIndexArrayNV(GLuint firstPathName,
62225bd8deadSopenharmony_ci                                           GLenum fontTarget,
62235bd8deadSopenharmony_ci                                           GLsizeiptr fontSize,
62245bd8deadSopenharmony_ci                                           const void *fontData,
62255bd8deadSopenharmony_ci                                           GLsizei faceIndex,
62265bd8deadSopenharmony_ci                                           GLuint firstGlyphIndex,
62275bd8deadSopenharmony_ci                                           GLsizei numGlyphs,
62285bd8deadSopenharmony_ci                                           GLuint pathParameterTemplate,
62295bd8deadSopenharmony_ci                                           GLfloat emScale);
62305bd8deadSopenharmony_ci
62315bd8deadSopenharmony_ci    GLSL-related commands:
62325bd8deadSopenharmony_ci
62335bd8deadSopenharmony_ci        void glProgramPathFragmentInputGenNV(GLuint program,
62345bd8deadSopenharmony_ci                                             GLint location,
62355bd8deadSopenharmony_ci                                             GLenum genMode,
62365bd8deadSopenharmony_ci                                             GLint components,
62375bd8deadSopenharmony_ci                                             const GLfloat *coeffs);
62385bd8deadSopenharmony_ci
62395bd8deadSopenharmony_ci        void glGetProgramResourcefvNV(GLuint program, GLenum programInterface,
62405bd8deadSopenharmony_ci                                      GLuint index, GLsizei propCount,
62415bd8deadSopenharmony_ci                                      const GLenum *props, GLsizei bufSize,
62425bd8deadSopenharmony_ci                                      GLsizei *length, GLfloat *params);
62435bd8deadSopenharmony_ci
62445bd8deadSopenharmony_ci    If the window system's GetProcAddress mechanism for GL commands returns
62455bd8deadSopenharmony_ci    NULL for these function names, these API revision 1.3 features are
62465bd8deadSopenharmony_ci    not available.  Likewise the these tokens are not supported either.
62475bd8deadSopenharmony_ci
62485bd8deadSopenharmony_ci -- Performance improvements:
62495bd8deadSopenharmony_ci
62505bd8deadSopenharmony_ci    Release 304.xx and on substantially improves the performance of
62515bd8deadSopenharmony_ci    path rendering stencil and cover operations on NVIDIA Fermi- and
62525bd8deadSopenharmony_ci    Kepler-based GPUs (GeForce 400 Series and on).
62535bd8deadSopenharmony_ci
62545bd8deadSopenharmony_ci    Release 314.xx improves the performance of initially specifying or
62555bd8deadSopenharmony_ci    modifying a path object prior to stenciling or covering the paths.
62565bd8deadSopenharmony_ci
62575bd8deadSopenharmony_ci -- Bugs:
62585bd8deadSopenharmony_ci
62595bd8deadSopenharmony_ci    Due to NVIDIA driver bug 1315267, path objects were not actually
62605bd8deadSopenharmony_ci    shared among contexts prior to Driver release 320.xx (July 2013).
62615bd8deadSopenharmony_ci
62625bd8deadSopenharmony_ciIssues
62635bd8deadSopenharmony_ci
62645bd8deadSopenharmony_ci    1.  What should this extension be called?
62655bd8deadSopenharmony_ci
62665bd8deadSopenharmony_ci        RESOLVED:  NV_path_rendering
62675bd8deadSopenharmony_ci
62685bd8deadSopenharmony_ci        The extension adds an entirely new rendering paradigm for filled
62695bd8deadSopenharmony_ci        and stroked paths, hence "path rendering".
62705bd8deadSopenharmony_ci
62715bd8deadSopenharmony_ci        "path" alone was considered but deemed to vague.
62725bd8deadSopenharmony_ci
62735bd8deadSopenharmony_ci    2.  Should this extension support specifying paths based on glyphs in fonts?
62745bd8deadSopenharmony_ci
62755bd8deadSopenharmony_ci        RESOLVED:  Yes.
62765bd8deadSopenharmony_ci
62775bd8deadSopenharmony_ci        There are several problems solved by including first-class path
62785bd8deadSopenharmony_ci        specification via glyphs in fonts.
62795bd8deadSopenharmony_ci
62805bd8deadSopenharmony_ci        1)  Support for glyphs from fonts are an expected part of nearly
62815bd8deadSopenharmony_ci        all path rendering systems.  Not including glyph support will force
62825bd8deadSopenharmony_ci        all path rendering applications to build their own glyph system.
62835bd8deadSopenharmony_ci
62845bd8deadSopenharmony_ci        2)  Fonts, particularly for Asian languages, can be large.
62855bd8deadSopenharmony_ci        By putting glyph specification from fonts directly into
62865bd8deadSopenharmony_ci        the extension, implementations will have the opportunity to
62875bd8deadSopenharmony_ci        cache commonly loaded font glyphs, including shared on-GPU
62885bd8deadSopenharmony_ci        representations.
62895bd8deadSopenharmony_ci
62905bd8deadSopenharmony_ci        3)  Also because fonts have many glyphs, first-pass specification
62915bd8deadSopenharmony_ci        of a range of glyphs allows the GL implementation to load glyphs
62925bd8deadSopenharmony_ci        sparsely in response to use.  It isn't appropriate to burden
62935bd8deadSopenharmony_ci        applications with the burden of properly caching large sets of
62945bd8deadSopenharmony_ci        glyphs from fonts.  So while Unicode glyphs 0 through 2^21-1
62955bd8deadSopenharmony_ci        might be loaded for an entire Unicode font, the GL implementation
62965bd8deadSopenharmony_ci        could only actually load queried and used path objects.
62975bd8deadSopenharmony_ci
62985bd8deadSopenharmony_ci        4)  Locating font files tends to be very system-specific.  To the
62995bd8deadSopenharmony_ci        extent OpenGL supports cross-platform rendering, minimizing
63005bd8deadSopenharmony_ci        system-specific aspects of rendering increases the cross-platform
63015bd8deadSopenharmony_ci        nature of OpenGL applications.
63025bd8deadSopenharmony_ci
63035bd8deadSopenharmony_ci        5)  I still feel bad about glutBitmapCharacter and
63045bd8deadSopenharmony_ci        glutStrokeCharacter being so lame; I thought something better
63055bd8deadSopenharmony_ci        would take their place but nothing has.
63065bd8deadSopenharmony_ci
63075bd8deadSopenharmony_ci    3.  Should this extension provide a one-shot (single-pass) way to fill
63085bd8deadSopenharmony_ci        and stroke path objects?
63095bd8deadSopenharmony_ci
63105bd8deadSopenharmony_ci        RESOLVED:  No.
63115bd8deadSopenharmony_ci
63125bd8deadSopenharmony_ci        The two-pass decoupling of path rendering into stenciling and
63135bd8deadSopenharmony_ci        covering operations has lots of advantages.
63145bd8deadSopenharmony_ci
63155bd8deadSopenharmony_ci        Some of the advantages are:
63165bd8deadSopenharmony_ci
63175bd8deadSopenharmony_ci        1)  The cover step has complete control over how the fragment
63185bd8deadSopenharmony_ci            shader is configured.  GLSL, assembly, or fixed-function
63195bd8deadSopenharmony_ci            (glTexEnv, glFog, etc.) fragment shading can all be used
63205bd8deadSopenharmony_ci            without conflating the path's coverage determination with
63215bd8deadSopenharmony_ci            the shading.
63225bd8deadSopenharmony_ci
63235bd8deadSopenharmony_ci        1a) If shading resources are used to implement the path coverage
63245bd8deadSopenharmony_ci            determination such as interpolants or textures, these
63255bd8deadSopenharmony_ci            resources aren't over-subscribed as could occur in a
63265bd8deadSopenharmony_ci            one-step API.
63275bd8deadSopenharmony_ci
63285bd8deadSopenharmony_ci        2)  GPUs can accelerate stencil-only rendering during the stencil
63295bd8deadSopenharmony_ci            step in ways that are rasterization and bandwidth efficient.
63305bd8deadSopenharmony_ci
63315bd8deadSopenharmony_ci        3)  Path rendering standards all allow a rendered path to be clipped
63325bd8deadSopenharmony_ci            by another arbitrary (clipping) path.  This can even be
63335bd8deadSopenharmony_ci            done recursively sometimes.  When the stencil coverage
63345bd8deadSopenharmony_ci            determination is a separate step from the shading, such
63355bd8deadSopenharmony_ci            clipping operations are easy to accomplish as simply multiple
63365bd8deadSopenharmony_ci            stenciled stencil steps.  Otherwise clipping a path to another
63375bd8deadSopenharmony_ci            path is a complex intersection and re-tessellation task.
63385bd8deadSopenharmony_ci
63395bd8deadSopenharmony_ci        4)  A two-step stencil, then cover" approach makes it
63405bd8deadSopenharmony_ci            straightforward to guarantee that pixels and samples are
63415bd8deadSopenharmony_ci            only visited once per path rendering as path rendering
63425bd8deadSopenharmony_ci            standards require.
63435bd8deadSopenharmony_ci
63445bd8deadSopenharmony_ci        5)  Unconventional but efficient algorithms such as reverse
63455bd8deadSopenharmony_ci            Painter's algorithm are straightforward to implement when
63465bd8deadSopenharmony_ci            stencil and covering steps are decoupled.  In this case,
63475bd8deadSopenharmony_ci            the stencil buffer simply never allows a pixel to be shaded
63485bd8deadSopenharmony_ci            a second time once covered.
63495bd8deadSopenharmony_ci
63505bd8deadSopenharmony_ci        6)  Dilations and erosions can be performed with the two-step
63515bd8deadSopenharmony_ci            approach.  You can fill a shape and then stroke the shape
63525bd8deadSopenharmony_ci            to dilate the shape.  Then cover with both fill and stroking.
63535bd8deadSopenharmony_ci
63545bd8deadSopenharmony_ci        7)  Novel stroking effects such as pin-striping are easy to
63555bd8deadSopenharmony_ci            accomplish.  You can stroke a path with a stroke width of 7.5
63565bd8deadSopenharmony_ci            to write stencil to 1 and then stroke the same curve with
63575bd8deadSopenharmony_ci            a stroke width of 3.1 to write a stencil of 0.  Then cover
63585bd8deadSopenharmony_ci            stroked path with a stroke width of 7.5 and accomplish the
63595bd8deadSopenharmony_ci            pen-striping.
63605bd8deadSopenharmony_ci
63615bd8deadSopenharmony_ci    4.  What string formats should be supported for paths?
63625bd8deadSopenharmony_ci
63635bd8deadSopenharmony_ci        UNRESOLVED:  Definitely SVG and PostScript.  Perhaps Silverlight?
63645bd8deadSopenharmony_ci
63655bd8deadSopenharmony_ci        Silverlight's path syntax is very similar to SVG but allows
63665bd8deadSopenharmony_ci        infinity values and the specification of the fill mode.
63675bd8deadSopenharmony_ci
63685bd8deadSopenharmony_ci        Adobe's Type 2 charstring format, part of Adobe's Compact
63695bd8deadSopenharmony_ci        Font Format (CFF) standard, provides yet another encoding
63705bd8deadSopenharmony_ci        of a path outline.  This is a binary, rather than textual,
63715bd8deadSopenharmony_ci        format that exists within OpenType and Type 2 font formats.
63725bd8deadSopenharmony_ci        It includes glyph hinting information.  The utility of accepting
63735bd8deadSopenharmony_ci        the Type 2 charstring format is not sufficient for inclusion for
63745bd8deadSopenharmony_ci        a number of reasons.  Content creation tools don't target this
63755bd8deadSopenharmony_ci        format for arbitrary path descriptions.  This extension already
63765bd8deadSopenharmony_ci        provides commands (glPathGlyphsNV and glPathGlyphRangeNV) for
63775bd8deadSopenharmony_ci        specifying path objects from font glyphs.  And the font hinting
63785bd8deadSopenharmony_ci        information the format provides would just be ignored.
63795bd8deadSopenharmony_ci
63805bd8deadSopenharmony_ci    5.  Should there be a query to return a path as a string?
63815bd8deadSopenharmony_ci
63825bd8deadSopenharmony_ci        RESOLVED: No, returning dynamic strings of variable length is too hard.
63835bd8deadSopenharmony_ci
63845bd8deadSopenharmony_ci        Unlike parsing which is straightforward but slightly difficult,
63855bd8deadSopenharmony_ci        building a string from the results of glGetPathCommandsNV and
63865bd8deadSopenharmony_ci        glGetPathCoordsNV is not hard.  But there's no one "right"
63875bd8deadSopenharmony_ci        way to build a string for a given path.
63885bd8deadSopenharmony_ci
63895bd8deadSopenharmony_ci        There are  various string encodings of varying compactness and
63905bd8deadSopenharmony_ci        readability.  How much precision is really required for converting
63915bd8deadSopenharmony_ci        a floating-point coordinate to a string representation varies?
63925bd8deadSopenharmony_ci
63935bd8deadSopenharmony_ci    6.  Should path rendering allow per-vertex specification of attributes?
63945bd8deadSopenharmony_ci
63955bd8deadSopenharmony_ci        RESOLVED:  No.
63965bd8deadSopenharmony_ci
63975bd8deadSopenharmony_ci        There is no allowance for the specification of interpolants
63985bd8deadSopenharmony_ci        (colors, texture coordinates, etc.) specified per control point.
63995bd8deadSopenharmony_ci        Assigning per-vertex values to control points doesn't really
64005bd8deadSopenharmony_ci        make sense in the context of path rendering.  Instead a mechanism
64015bd8deadSopenharmony_ci        for generating color, texture coordinate, and fog generation as
64025bd8deadSopenharmony_ci        a linear function of object space.
64035bd8deadSopenharmony_ci
64045bd8deadSopenharmony_ci        The glPathTexGenNV, glPathColorGenNV, and glPathFogGenNV commands
64055bd8deadSopenharmony_ci        provide this mechanism.
64065bd8deadSopenharmony_ci
64075bd8deadSopenharmony_ci        glPathColorGenNV, glPathTexGenNV, and glPathFogGenNV
64085bd8deadSopenharmony_ci        provide a way to specify coefficients for plane equations based
64095bd8deadSopenharmony_ci        on the object-space or eye-space (x,y,1) position of a fragment
64105bd8deadSopenharmony_ci        generating by covering a filled or stroked path.
64115bd8deadSopenharmony_ci
64125bd8deadSopenharmony_ci        For those used to conventional 3D graphics where geometry is
64135bd8deadSopenharmony_ci        defined by meshes of triangles, not having per-vertex attributes
64145bd8deadSopenharmony_ci        sounds really strange.  But this is the natural situation for
64155bd8deadSopenharmony_ci        path rendering.  Paths do not really have vertices but rather
64165bd8deadSopenharmony_ci        control points.
64175bd8deadSopenharmony_ci
64185bd8deadSopenharmony_ci    7.  Should path rendering use the existing texture coordinate
64195bd8deadSopenharmony_ci        generation state (glTexGen)?
64205bd8deadSopenharmony_ci
64215bd8deadSopenharmony_ci        RESOLVED:  No, this extension should have its own path-specific
64225bd8deadSopenharmony_ci        texture coordinate generation state controlled by glPathColorGenNV
64235bd8deadSopenharmony_ci        and glPathTexGenNV.
64245bd8deadSopenharmony_ci
64255bd8deadSopenharmony_ci        The existing texture coordinate generation state has modes such
64265bd8deadSopenharmony_ci        as sphere, normal, and reflection mapping that make no sense for
64275bd8deadSopenharmony_ci        path rendering (since there are no per-vertex normals).
64285bd8deadSopenharmony_ci
64295bd8deadSopenharmony_ci        Also it is very desirable to keep the per-vertex attribute
64305bd8deadSopenharmony_ci        computations (normal transformation, lighting, texture coordinate
64315bd8deadSopenharmony_ci        generation) completely separate from the varying computations
64325bd8deadSopenharmony_ci        for path rendering.  This means the vertex processing program
64335bd8deadSopenharmony_ci        needed for path rendering isn't changed by state updates intended
64345bd8deadSopenharmony_ci        to control geometric and image primitives.
64355bd8deadSopenharmony_ci
64365bd8deadSopenharmony_ci    8.  How does path rendering work if all the fixed-function state,
64375bd8deadSopenharmony_ci        particularly the modelview and projection matrices and named vertex
64385bd8deadSopenharmony_ci        attributes (primary color, etc.) have been deprecated?
64395bd8deadSopenharmony_ci
64405bd8deadSopenharmony_ci        RESOLVED:  ARB_compatibility (for OpenGL 3.1) or the Compatibility
64415bd8deadSopenharmony_ci        profile (for OpenGL 3.2 and up) is useful and supports the
64425bd8deadSopenharmony_ci        glPathColorGenNV, glPathTexGenNV, and glPathFogGenNV commands
64435bd8deadSopenharmony_ci        to interact properly with fixed-function OpenGL.
64445bd8deadSopenharmony_ci
64455bd8deadSopenharmony_ci        NV_path_rendering assumes that the modelview and projection
64465bd8deadSopenharmony_ci        matrices combine to transform the path into clip space.
64475bd8deadSopenharmony_ci        Without these matrices, there's no way to get the path
64485bd8deadSopenharmony_ci        transformed.  Therefore these matrices are introduced through
64495bd8deadSopenharmony_ci        EXT_direct_state_access commands when only the Core profile is
64505bd8deadSopenharmony_ci        supported.
64515bd8deadSopenharmony_ci
64525bd8deadSopenharmony_ci        Without ARB_compatibility or the Compatibility profile, there is
64535bd8deadSopenharmony_ci        no way for GLSL to access built-in varyings as these have been
64545bd8deadSopenharmony_ci        deprecated.  This means generated or passed-through colors and
64555bd8deadSopenharmony_ci        texture coordinate sets are inaccessible.  There's also no longer
64565bd8deadSopenharmony_ci        a way to compile a fragment shader that doesn't have a vertex
64575bd8deadSopenharmony_ci        shader.  The ARB_separate_shader_objects extension (core in OpenGL
64585bd8deadSopenharmony_ci        4.1) now allows a fragment shader to be specified in a program
64595bd8deadSopenharmony_ci        object with a vertex shader.  The ARB_program_interface_query
64605bd8deadSopenharmony_ci        extension (core in OpenGL 4.3) allows queries to specific program
64615bd8deadSopenharmony_ci        object resources.  The glProgramPathFragmentInputGenNV provides
64625bd8deadSopenharmony_ci        a means, in combination with the ARB_separate_shader_objects and
64635bd8deadSopenharmony_ci        ARB_program_interface_query extensions, to configure fragment
64645bd8deadSopenharmony_ci        input generation for GLSL fragment shaders use during the "cover"
64655bd8deadSopenharmony_ci        step of path rendering without reference to fixed-function
64665bd8deadSopenharmony_ci        mechanisms.
64675bd8deadSopenharmony_ci
64685bd8deadSopenharmony_ci        See the "Dependencies on Core Profile and OpenGL ES" section
64695bd8deadSopenharmony_ci        and issue 133 for more details about the Core profile support.
64705bd8deadSopenharmony_ci
64715bd8deadSopenharmony_ci    9.  How does a GLSL fragment shader processing fragment generated by
64725bd8deadSopenharmony_ci        covering path access fragment varyings?
64735bd8deadSopenharmony_ci
64745bd8deadSopenharmony_ci        RESOLVED:  The obvious way is to used the gl_TexCoord[], gl_Color,
64755bd8deadSopenharmony_ci        and gl_SecondaryColor built-in varyings for texture coordinate
64765bd8deadSopenharmony_ci        sets, primary color, and secondary color respectively.
64775bd8deadSopenharmony_ci
64785bd8deadSopenharmony_ci        Any user-specified varyings will be undefined since there is no
64795bd8deadSopenharmony_ci        upstream geometry or vertex shader to write them.
64805bd8deadSopenharmony_ci
64815bd8deadSopenharmony_ci    10. How should the command token values be assigned?
64825bd8deadSopenharmony_ci
64835bd8deadSopenharmony_ci        RESOLVED:  Consistent with OpenVG's enumeration values but ALSO using
64845bd8deadSopenharmony_ci        the SVG command characters too.
64855bd8deadSopenharmony_ci
64865bd8deadSopenharmony_ci        The two token addition (missing from OpenVG's supported commands)
64875bd8deadSopenharmony_ci        are relative and absolute 7-component partial elliptical arc
64885bd8deadSopenharmony_ci        tokens (GL_ARC_TO_NV and GL_RELATIVE_ARC_TO_NV) that include the
64895bd8deadSopenharmony_ci        large/small and sweep flags as coordinates.  These corresponds
64905bd8deadSopenharmony_ci        to the SVG 'arcto' commands.
64915bd8deadSopenharmony_ci
64925bd8deadSopenharmony_ci        Using character codes, in addition to tokens, allows simpler
64935bd8deadSopenharmony_ci        path descriptions coded with C character arrays (strings) such
64945bd8deadSopenharmony_ci        as "MLLCz" instead of the equivalent verbose aggregate array
64955bd8deadSopenharmony_ci        initializer { GL_MOVE_TO_NV, GL_LINE_TO_NV, GL_LINE_TO_NV,
64965bd8deadSopenharmony_ci        GL_CUBIC_CURVE_TO_NV, GL_CLOSE_PATH_NV }.
64975bd8deadSopenharmony_ci
64985bd8deadSopenharmony_ci        Also note there are NO character codes for the eight 5-component
64995bd8deadSopenharmony_ci        partial elliptical arc commands because these commands lack
65005bd8deadSopenharmony_ci        exact analogues in the SVG path command syntax.
65015bd8deadSopenharmony_ci
65025bd8deadSopenharmony_ci        There are also commands corresponding to PostScript's circular arc
65035bd8deadSopenharmony_ci        commands (arc, arcn, and arct), also without character aliases.
65045bd8deadSopenharmony_ci
65055bd8deadSopenharmony_ci        Unfortunately the path command token values do NOT match the
65065bd8deadSopenharmony_ci        SVGPathSeg interface path segment type values because these
65075bd8deadSopenharmony_ci        values overlap with the OpenVG enumeration values.
65085bd8deadSopenharmony_ci
65095bd8deadSopenharmony_ci        Excepting the printable ASCII character command tokens, absolute
65105bd8deadSopenharmony_ci        command token values should always be even, while relative
65115bd8deadSopenharmony_ci        command token values should always be odd.
65125bd8deadSopenharmony_ci
65135bd8deadSopenharmony_ci    11. Why are the glyph metric bits in the order they are specified?
65145bd8deadSopenharmony_ci
65155bd8deadSopenharmony_ci        RESOLVED:  The glyph metric order matches the FreeType 2 library's
65165bd8deadSopenharmony_ci        FT_Glyph_Metrics structure for the per-glyph metrics. The
65175bd8deadSopenharmony_ci        per-font metric order matches the FreeType 2 library's FT_FaceRec
65185bd8deadSopenharmony_ci        structure.
65195bd8deadSopenharmony_ci
65205bd8deadSopenharmony_ci        Kerning information for a font face can be queried with the
65215bd8deadSopenharmony_ci        separate query glGetPathSpacingNV because the kerning displacement
65225bd8deadSopenharmony_ci        is not per-glyph, but rather dependent on a sequence of two
65235bd8deadSopenharmony_ci        glyphs.
65245bd8deadSopenharmony_ci
65255bd8deadSopenharmony_ci    12. What glyph metric information is beyond the scope of this extension?
65265bd8deadSopenharmony_ci
65275bd8deadSopenharmony_ci        RESOLVED:  Metrics for vertical kerning, bi-directional layout,
65285bd8deadSopenharmony_ci        ligatures, etc.  are beyond the scope of this extension.
65295bd8deadSopenharmony_ci
65305bd8deadSopenharmony_ci        Kerning information for horizontal layout is available.
65315bd8deadSopenharmony_ci
65325bd8deadSopenharmony_ci        The scope of the metrics provided by this extension are sufficient
65335bd8deadSopenharmony_ci        for basic kerned and non-kerned horizontal and non-kerned vertical
65345bd8deadSopenharmony_ci        text layout.
65355bd8deadSopenharmony_ci
65365bd8deadSopenharmony_ci        Applications that want more sophisticated metric information
65375bd8deadSopenharmony_ci        should either query the metrics from the corresponding system
65385bd8deadSopenharmony_ci        font directly or load the glyph outline data entirely from the
65395bd8deadSopenharmony_ci        application.
65405bd8deadSopenharmony_ci
65415bd8deadSopenharmony_ci    13. What glyph outline information is beyond the scope of this
65425bd8deadSopenharmony_ci        extension?
65435bd8deadSopenharmony_ci
65445bd8deadSopenharmony_ci        RESOLVED:  For now, normal (indicated by GL_NONE), italic,
65455bd8deadSopenharmony_ci        bold, and bold/italic font faces are supported.  Other styles
65465bd8deadSopenharmony_ci        (small caps, etc.) may be added with future extensions to this
65475bd8deadSopenharmony_ci        extension, but the four supported font styles are sufficient.
65485bd8deadSopenharmony_ci
65495bd8deadSopenharmony_ci        This is consistent with FreeType 2's support for  the
65505bd8deadSopenharmony_ci        FT_STYLE_FLAG_ITALIC and FT_STYLE_FLAG_BOLD flags.
65515bd8deadSopenharmony_ci
65525bd8deadSopenharmony_ci    14. Should horizontal kerning information always be available?
65535bd8deadSopenharmony_ci
65545bd8deadSopenharmony_ci        RESOLVED:  Yes, if the font provides this kerning information.
65555bd8deadSopenharmony_ci
65565bd8deadSopenharmony_ci    15. Why is the horizontal kerning information for a pair of path
65575bd8deadSopenharmony_ci        objects returned as a 2D (x,y) displacement?
65585bd8deadSopenharmony_ci
65595bd8deadSopenharmony_ci        RESOLVED:  TrueType fonts always return kerning information
65605bd8deadSopenharmony_ci        as a sequence of horizontal displacements in x, but not y (the
65615bd8deadSopenharmony_ci        displacement is assumed to be zero in y).  However PostScript
65625bd8deadSopenharmony_ci        fonts can support a 2D displacement.
65635bd8deadSopenharmony_ci
65645bd8deadSopenharmony_ci        This matches the behavior of FreeType 2's FT_Get_Kerning function.
65655bd8deadSopenharmony_ci
65665bd8deadSopenharmony_ci        Note that the returned (x,y) float pairs are NOT immediately
65675bd8deadSopenharmony_ci        suitable to be used as values for the /transformValues/
65685bd8deadSopenharmony_ci        array parameter to StencilFillPathInstancedNV,
65695bd8deadSopenharmony_ci        StencilStrokePathInstancedNV, CoverFillPathInstancedNV, or
65705bd8deadSopenharmony_ci        CoverStrokePathInstancedNV with a /transformType/ parameter
65715bd8deadSopenharmony_ci        of TRANSLATE_2D_NV.  The application would be responsible for
65725bd8deadSopenharmony_ci        accumulating the various translates to provide proper horizontal
65735bd8deadSopenharmony_ci        layout.  When all the y values are zero (as will often be the
65745bd8deadSopenharmony_ci        case), GL_TRANSLATE_1D_NV could be used instead.
65755bd8deadSopenharmony_ci
65765bd8deadSopenharmony_ci    16. Should the path name zero be treated specially?
65775bd8deadSopenharmony_ci
65785bd8deadSopenharmony_ci        RESOLVED:  No.  There's no need for specially handling the zero
65795bd8deadSopenharmony_ci        name for a path object.
65805bd8deadSopenharmony_ci
65815bd8deadSopenharmony_ci    17. What tokens for color should glPathColorGenNV accept?
65825bd8deadSopenharmony_ci
65835bd8deadSopenharmony_ci        RESOLVED:  GL_PRIMARY_COLOR (from OpenGL 1.3), GL_PRIMARY_COLOR_NV
65845bd8deadSopenharmony_ci        (from NV_register_combiners), and GL_SECONDARY_COLOR_NV (from
65855bd8deadSopenharmony_ci        NV_register_combiners).
65865bd8deadSopenharmony_ci
65875bd8deadSopenharmony_ci        GL_PRIMARY_COLOR and GL_PRIMARY_COLOR_NV have different token
65885bd8deadSopenharmony_ci        values; to avoid an API pitfall, both are accepted.
65895bd8deadSopenharmony_ci
65905bd8deadSopenharmony_ci        (There is no core GL_SECONDARY_COLOR token.)
65915bd8deadSopenharmony_ci
65925bd8deadSopenharmony_ci    18. Should two-sided color be supported for path rendering?
65935bd8deadSopenharmony_ci
65945bd8deadSopenharmony_ci        RESOLVED:  No.  No path rendering standards support this concept.
65955bd8deadSopenharmony_ci
65965bd8deadSopenharmony_ci        Two-sided lighting could be simulated with two passes and face
65975bd8deadSopenharmony_ci        culling.
65985bd8deadSopenharmony_ci
65995bd8deadSopenharmony_ci    19. How do PostScript's user path operators correspond to
66005bd8deadSopenharmony_ci        NV_path_rendering's path command tokens?
66015bd8deadSopenharmony_ci
66025bd8deadSopenharmony_ci        RESOLVED:
66035bd8deadSopenharmony_ci
66045bd8deadSopenharmony_ci            PostScript path
66055bd8deadSopenharmony_ci            operator         Path command token
66065bd8deadSopenharmony_ci            ---------------  -----------------------------
66075bd8deadSopenharmony_ci            arc              GL_CIRCULAR_CCW_ARC_TO_NV
66085bd8deadSopenharmony_ci            arcn             GL_CIRCULAR_CW_ARC_TO_NV
66095bd8deadSopenharmony_ci            arcto            GL_CIRCULAR_TANGENT_ARC_TO_NV
66105bd8deadSopenharmony_ci            closepath        GL_CLOSE_PATH_NV
66115bd8deadSopenharmony_ci            curveto          GL_CUBIC_CURVE_TO_NV
66125bd8deadSopenharmony_ci            lineto           GL_LINE_TO_NV
66135bd8deadSopenharmony_ci            moveto           GL_MOVE_TO_NV
66145bd8deadSopenharmony_ci            rcurveto         GL_RELATIVE_CUBIC_CURVE_TO_NV
66155bd8deadSopenharmony_ci            rlineto          GL_RELATIVE_LINE_TO_NV
66165bd8deadSopenharmony_ci            rmoveto          GL_RELATIVE_MOVE_TO_NV
66175bd8deadSopenharmony_ci            setbbox          /ignored/
66185bd8deadSopenharmony_ci            ucache           /ignored/
66195bd8deadSopenharmony_ci
66205bd8deadSopenharmony_ci        The setbbox (set bounding box) operator "establishes a bounding
66215bd8deadSopenharmony_ci        box for the current path, within which the coordinates of all
66225bd8deadSopenharmony_ci        subsequent path construction operators must fall."  There is
66235bd8deadSopenharmony_ci        no such requirement in this extension so this bounding box
66245bd8deadSopenharmony_ci        information is parsed but ignored.
66255bd8deadSopenharmony_ci
66265bd8deadSopenharmony_ci        The ucache (user cache) operator "notifies the PostScript
66275bd8deadSopenharmony_ci        interpreter that the enclosing user path is to be retained in
66285bd8deadSopenharmony_ci        the cache if the path is not already there."  This notion that
66295bd8deadSopenharmony_ci        paths are expensive and so must be cached is not particularly
66305bd8deadSopenharmony_ci        applicable to this extension because all path object are in
66315bd8deadSopenharmony_ci        some sense cached.  Therefore the ucache operator is parsed
66325bd8deadSopenharmony_ci        but ignored.
66335bd8deadSopenharmony_ci
66345bd8deadSopenharmony_ci    20. How do OpenVG 1.1's commands (as enumerated by the VGPathCommand
66355bd8deadSopenharmony_ci        and VGPathCommand enumerations) correspond to NV_path_rendering's
66365bd8deadSopenharmony_ci        path command tokens?
66375bd8deadSopenharmony_ci
66385bd8deadSopenharmony_ci        RESOLVED:
66395bd8deadSopenharmony_ci
66405bd8deadSopenharmony_ci            OpenVG path
66415bd8deadSopenharmony_ci            segment command    Path command token
66425bd8deadSopenharmony_ci            -----------------  ----------------------------------------
66435bd8deadSopenharmony_ci            VG_CLOSE_PATH      GL_CLOSE_PATH_NV
66445bd8deadSopenharmony_ci            VG_CUBIC_TO        GL_CUBIC_CURVE_TO_NV
66455bd8deadSopenharmony_ci            VG_CUBIC_TO_ABS    "
66465bd8deadSopenharmony_ci            VG_CUBIC_TO_REL    GL_RELATIVE_CUBIC_CURVE_TO_NV
66475bd8deadSopenharmony_ci            VG_HLINE_TO        GL_HORIZONTAL_LINE_TO_NV
66485bd8deadSopenharmony_ci            VG_HLINE_TO_ABS    "
66495bd8deadSopenharmony_ci            VG_HLINE_TO_REL    GL_RELATIVE_HORIZONTAL_LINE_TO_NV
66505bd8deadSopenharmony_ci            VG_LCCWARC_TO      GL_LARGE_CCW_ARC_TO_NV
66515bd8deadSopenharmony_ci            VG_LCCWARC_TO_ABS  "
66525bd8deadSopenharmony_ci            VG_LCCWARC_TO_REL  GL_RELATIVE_LARGE_CCW_ARC_TO_NV
66535bd8deadSopenharmony_ci            VG_LCWARC_TO       GL_LARGE_CW_ARC_TO_NV
66545bd8deadSopenharmony_ci            VG_LCWARC_TO_ABS   "
66555bd8deadSopenharmony_ci            VG_LCWARC_TO_REL   GL_RELATIVE_LARGE_CW_ARC_TO_NV
66565bd8deadSopenharmony_ci            VG_LINE_TO         GL_LINE_TO_NV
66575bd8deadSopenharmony_ci            VG_LINE_TO_ABS     "
66585bd8deadSopenharmony_ci            VG_LINE_TO_REL     GL_RELATIVE_LINE_TO_NV
66595bd8deadSopenharmony_ci            VG_MOVE_TO         GL_MOVE_TO_NV
66605bd8deadSopenharmony_ci            VG_MOVE_TO_ABS     "
66615bd8deadSopenharmony_ci            VG_MOVE_TO_REL     GL_RELATIVE_MOVE_TO_NV
66625bd8deadSopenharmony_ci            VG_QUAD_TO         GL_QUADRATIC_CURVE_TO_NV
66635bd8deadSopenharmony_ci            VG_QUAD_TO_ABS     "
66645bd8deadSopenharmony_ci            VG_QUAD_TO_REL     GL_RELATIVE_QUADRATIC_CURVE_TO_NV
66655bd8deadSopenharmony_ci            VG_SCCWARC_TO      GL_SMALL_CCW_ARC_TO_NV
66665bd8deadSopenharmony_ci            VG_SCCWARC_TO_ABS  "
66675bd8deadSopenharmony_ci            VG_SCCWARC_TO_REL  GL_RELATIVE_SMALL_CCW_ARC_TO_NV
66685bd8deadSopenharmony_ci            VG_SCUBIC_TO       GL_SMOOTH_CUBIC_TO_NV
66695bd8deadSopenharmony_ci            VG_SCUBIC_TO_ABS   "
66705bd8deadSopenharmony_ci            VG_SCUBIC_TO_REL   GL_RELATIVE_SMOOTH_CUBIC_TO_NV
66715bd8deadSopenharmony_ci            VG_SCWARC_TO       GL_SMALL_CW_ARC_TO_NV
66725bd8deadSopenharmony_ci            VG_SCWARC_TO_ABS   "
66735bd8deadSopenharmony_ci            VG_SCWARC_TO_REL   GL_RELATIVE_SMALL_CW_ARC_TO_NV
66745bd8deadSopenharmony_ci            VG_SQUAD_TO        GL_SMOOTH_QUADRATIC_CURVE_TO_NV
66755bd8deadSopenharmony_ci            VG_SQUAD_TO_ABS    "
66765bd8deadSopenharmony_ci            VG_SQUAD_TO_REL    GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV
66775bd8deadSopenharmony_ci            VG_VLINE_TO        GL_VERTICAL_LINE_TO_NV
66785bd8deadSopenharmony_ci            VG_VLINE_TO_ABS    "
66795bd8deadSopenharmony_ci            VG_VLINE_TO_REL    GL_RELATIVE_VERTICAL_LINE_TO_NV
66805bd8deadSopenharmony_ci
66815bd8deadSopenharmony_ci    21. What should the initial GL_PATH_FILL_MODE_NV state be?
66825bd8deadSopenharmony_ci
66835bd8deadSopenharmony_ci        RESOLVED:  GL_PATH_FILL_MODE_NV should initially be
66845bd8deadSopenharmony_ci        GL_COUNT_UP_NV.
66855bd8deadSopenharmony_ci
66865bd8deadSopenharmony_ci        This is consistent with SVG default non-zero fill rule and the
66875bd8deadSopenharmony_ci        typical usage of PostScript.
66885bd8deadSopenharmony_ci
66895bd8deadSopenharmony_ci        However this is the opposite of Silverlight's default fill rule
66905bd8deadSopenharmony_ci        which is even-odd.
66915bd8deadSopenharmony_ci
66925bd8deadSopenharmony_ci    22. Should we support a GL_PATH_FORMAT_SL3_NV for Silverlight 3.0 be
66935bd8deadSopenharmony_ci        added?
66945bd8deadSopenharmony_ci
66955bd8deadSopenharmony_ci        UNRESOLVED:  Silverlight 3.0's path markup syntax includes
66965bd8deadSopenharmony_ci        support for two extensions of the SVG 1.1 path grammar:  1)
66975bd8deadSopenharmony_ci        specification of a fill rule ("F0" is even-odd, "F1" is non-zero)
66985bd8deadSopenharmony_ci        at the beginning of the string; and 2) allowing "Infinity",
66995bd8deadSopenharmony_ci        "-Infinity" and "NaN" (all case-sensitive) as special values
67005bd8deadSopenharmony_ci        allowed instead of standard numerical values.
67015bd8deadSopenharmony_ci
67025bd8deadSopenharmony_ci        Seems like a reasonable thing to support.
67035bd8deadSopenharmony_ci
67045bd8deadSopenharmony_ci        The fill rule specification is straightforward.  This would
67055bd8deadSopenharmony_ci        simply allow the path object's GL_PATH_FILL_MODE_NV parameter to
67065bd8deadSopenharmony_ci        be specified as part of the path string specification.  The "F0"
67075bd8deadSopenharmony_ci        or "F1" would not be treated as an actual path command however.
67085bd8deadSopenharmony_ci
67095bd8deadSopenharmony_ci        Note that Silverlight's default fill rule if none is specified is
67105bd8deadSopenharmony_ci        EvenOdd whereas NV_path_rendering's default GL_PATH_FILL_MODE_NV
67115bd8deadSopenharmony_ci        is GL_COUNT_UP_NV (essentially a non-zero rule).  So specifying a
67125bd8deadSopenharmony_ci        path with the Silverlight format would have a different initial
67135bd8deadSopenharmony_ci        value for GL_PATH_FILL_MODE_NV if "F0" or no initial F
67145bd8deadSopenharmony_ci        command is specified.
67155bd8deadSopenharmony_ci
67165bd8deadSopenharmony_ci        What exactly would it mean to allow infinite and not-a-number
67175bd8deadSopenharmony_ci        values for the coordinate values of a path object?  Infinite is
67185bd8deadSopenharmony_ci        probably representable today by simply writing a number with a
67195bd8deadSopenharmony_ci        sufficiently large enough magnitude.  Allowing not-a-number is
67205bd8deadSopenharmony_ci        probably more
67215bd8deadSopenharmony_ci
67225bd8deadSopenharmony_ci    23. Should there be some maximum specified limit for the number of
67235bd8deadSopenharmony_ci        command (and hence coordinates) in a path object?
67245bd8deadSopenharmony_ci
67255bd8deadSopenharmony_ci        RESOLVED:  No.  The standards for path rendering do no generally
67265bd8deadSopenharmony_ci        have limits on path command lengths.
67275bd8deadSopenharmony_ci
67285bd8deadSopenharmony_ci        For extreme cases, the OUT_OF_MEMORY error would be generated but
67295bd8deadSopenharmony_ci        that is considered an exceptional case due to memory exhaustion,
67305bd8deadSopenharmony_ci        not simply the specification of a huge path.
67315bd8deadSopenharmony_ci
67325bd8deadSopenharmony_ci    24. Should there be some maximum specified limit for the dash array?
67335bd8deadSopenharmony_ci
67345bd8deadSopenharmony_ci        RESOLVED:  No.  The standards for path rendering do not generally
67355bd8deadSopenharmony_ci        have a limit on the dash array length.
67365bd8deadSopenharmony_ci
67375bd8deadSopenharmony_ci    25. How do the client-defined clip planes and the clip volume interact
67385bd8deadSopenharmony_ci        with path rendering?
67395bd8deadSopenharmony_ci
67405bd8deadSopenharmony_ci        RESOLVED:  Stenciled and covered paths are affected by both the
67415bd8deadSopenharmony_ci        clip volume and client-defined clip planes.
67425bd8deadSopenharmony_ci
67435bd8deadSopenharmony_ci        Clip planes affect the set of accessible pixels for stenciling
67445bd8deadSopenharmony_ci        and covering operations (see the "ACCESSIBLE SAMPLES WITH RESPECT
67455bd8deadSopenharmony_ci        TO A TRANSFORMED PATH" subsection of section 5.X.2.1).
67465bd8deadSopenharmony_ci
67475bd8deadSopenharmony_ci    26. What should the end cap style be called that adds no additional
67485bd8deadSopenharmony_ci        cap region to a stroked path?
67495bd8deadSopenharmony_ci
67505bd8deadSopenharmony_ci        RESOLSVED:  FLAT.
67515bd8deadSopenharmony_ci
67525bd8deadSopenharmony_ci        FLAT is already an existing OpenGL token name.  Silverlight and
67535bd8deadSopenharmony_ci        the OpenXML Paper Specification (XPS) calls this end cap style
67545bd8deadSopenharmony_ci        "flat".  However PostScript, Flash, OpenVG, SVG, Quartz 2D,
67555bd8deadSopenharmony_ci        and Cairo Graphics all call this end cap style "butt".
67565bd8deadSopenharmony_ci
67575bd8deadSopenharmony_ci        Using FLAT also avoids verbalizing the awkward phrase "butt
67585bd8deadSopenharmony_ci        stroking" (not that there's anything wrong with that).
67595bd8deadSopenharmony_ci
67605bd8deadSopenharmony_ci    27. Should the PostScript grammar for user-defined paths be supported?
67615bd8deadSopenharmony_ci
67625bd8deadSopenharmony_ci        RESOLVED:  Yes.  PostScript has commands (arc, arcn, arct) that
67635bd8deadSopenharmony_ci        do not correspond to precisely to SVG command.  This is
67645bd8deadSopenharmony_ci        particularly true of arct.
67655bd8deadSopenharmony_ci
67665bd8deadSopenharmony_ci        Applications have been generating paths according to the syntax
67675bd8deadSopenharmony_ci        of Level 2 PostScript for a long time.
67685bd8deadSopenharmony_ci
67695bd8deadSopenharmony_ci        Level 2 PostScript also has support for binary encoding that
67705bd8deadSopenharmony_ci        makes it significantly more compact and less expensive to parse
67715bd8deadSopenharmony_ci        than the SVG grammar.
67725bd8deadSopenharmony_ci
67735bd8deadSopenharmony_ci        The binary encoding allows precise floating-point (and compact
67745bd8deadSopenharmony_ci        fixed-point) values to be specified.
67755bd8deadSopenharmony_ci
67765bd8deadSopenharmony_ci    28. Should the PostScript grammar support big-endian, little-endian,
67775bd8deadSopenharmony_ci        and native numeric encodings?
67785bd8deadSopenharmony_ci
67795bd8deadSopenharmony_ci        RESOLVED:  Yes, yes, yes.
67805bd8deadSopenharmony_ci
67815bd8deadSopenharmony_ci    29. Should the PostScript grammar support encoded user paths?
67825bd8deadSopenharmony_ci
67835bd8deadSopenharmony_ci        RESOLVED:  Yes.
67845bd8deadSopenharmony_ci
67855bd8deadSopenharmony_ci    30. How should the PostScript grammar support strings?
67865bd8deadSopenharmony_ci
67875bd8deadSopenharmony_ci        UNRESOLVED:  Hexadecimal encoded data, that is strings enclosed
67885bd8deadSopenharmony_ci        in < and >, are supported.
67895bd8deadSopenharmony_ci
67905bd8deadSopenharmony_ci        Strings for ASCII base-85 encoded data, that is strings enclosed
67915bd8deadSopenharmony_ci        in <~ and ~>, are supported for the data-array and operator-string
67925bd8deadSopenharmony_ci        production
67935bd8deadSopenharmony_ci
67945bd8deadSopenharmony_ci        Also the short-binary-string, be-long-binary-string, and
67955bd8deadSopenharmony_ci        le-long-binary-string productions allow very compact and precise
67965bd8deadSopenharmony_ci        encoding of operator strings through binary encoding.
67975bd8deadSopenharmony_ci
67985bd8deadSopenharmony_ci        Strings for literal text, that is strings enclosed in ( and ),
67995bd8deadSopenharmony_ci        are NOT supported.
68005bd8deadSopenharmony_ci
68015bd8deadSopenharmony_ci        The rationale for not supporting literal text is this format
68025bd8deadSopenharmony_ci        is awkward for encoding the operator-string production (though
68035bd8deadSopenharmony_ci        PostScript does technically allow it) and is not compact.
68045bd8deadSopenharmony_ci
68055bd8deadSopenharmony_ci    31. Should the PostScript grammar support Binary Object Sequences?
68065bd8deadSopenharmony_ci
68075bd8deadSopenharmony_ci        RESOLVED:  No.
68085bd8deadSopenharmony_ci
68095bd8deadSopenharmony_ci        Binary Object Sequences are intended to support complex
68105bd8deadSopenharmony_ci        (potentially nested) data structures and are over-kill for
68115bd8deadSopenharmony_ci        user paths.
68125bd8deadSopenharmony_ci
68135bd8deadSopenharmony_ci    32. Why are the binary tokens in the PS grammar assigned the values
68145bd8deadSopenharmony_ci        they are assigned?
68155bd8deadSopenharmony_ci
68165bd8deadSopenharmony_ci        RESOLVED:  These values are from the "Binary Tokens" section of
68175bd8deadSopenharmony_ci        the PostScript Language Reference Manual.
68185bd8deadSopenharmony_ci
68195bd8deadSopenharmony_ci    33. Why are the binary encodings for the path commands in the PS
68205bd8deadSopenharmony_ci        grammar assigned the specified values?
68215bd8deadSopenharmony_ci
68225bd8deadSopenharmony_ci        RESOLVED:  These values match PostScript's system name table
68235bd8deadSopenharmony_ci        values.  These are documented in the "System Name Encodings"
68245bd8deadSopenharmony_ci        appendix of the PostScript Language Reference Manual.
68255bd8deadSopenharmony_ci        Specifically (in decimal):
68265bd8deadSopenharmony_ci
68275bd8deadSopenharmony_ci            Index  Name
68285bd8deadSopenharmony_ci            -----  ---------
68295bd8deadSopenharmony_ci            22     closepath
68305bd8deadSopenharmony_ci            99     lineto
68315bd8deadSopenharmony_ci            107    moveto
68325bd8deadSopenharmony_ci            133    rlineto
68335bd8deadSopenharmony_ci            134    rmoveto
68345bd8deadSopenharmony_ci            143    setbbox
68355bd8deadSopenharmony_ci            43     curveto
68365bd8deadSopenharmony_ci            122    rcurveto
68375bd8deadSopenharmony_ci            5      arc
68385bd8deadSopenharmony_ci            6      arcn
68395bd8deadSopenharmony_ci            7      arct
68405bd8deadSopenharmony_ci            177    ucache
68415bd8deadSopenharmony_ci
68425bd8deadSopenharmony_ci    34. Why do glGetPathCommandsNV, glGetPathCoordsNV, and
68435bd8deadSopenharmony_ci        glGetPathDashArrayNV have their own queries?  Could there not
68445bd8deadSopenharmony_ci        simply be a token for glGetPathParameteriv/glGetPathParameterfvNV
68455bd8deadSopenharmony_ci        to return this state?
68465bd8deadSopenharmony_ci
68475bd8deadSopenharmony_ci        RESOLVED:  These queries for path commands, coordinates, and
68485bd8deadSopenharmony_ci        the path's dash array return a variable payload of data so are
68495bd8deadSopenharmony_ci        more like glGetTexImage than glGetIntegerv/glGetFloatv which
68505bd8deadSopenharmony_ci        return a static amount of data.
68515bd8deadSopenharmony_ci
68525bd8deadSopenharmony_ci        APIs that return variable amounts of data are prone to buffer
68535bd8deadSopenharmony_ci        overflows.  It is somewhat more obvious these commands return
68545bd8deadSopenharmony_ci        a variable amount of data if they have their own API calls, than
68555bd8deadSopenharmony_ci        simply having certain token values to a multi-purpose glGet* call
68565bd8deadSopenharmony_ci        that mysteriously returns varying amounts of data for these token
68575bd8deadSopenharmony_ci        values while all the other tokens return static amounts of data.
68585bd8deadSopenharmony_ci
68595bd8deadSopenharmony_ci        This resolution follows the existing precedent from
68605bd8deadSopenharmony_ci        core OpenGL where glGetColorTable is distinct from
68615bd8deadSopenharmony_ci        glGetColorTableParameter{fv,iv}.  Same with glGetConvolutionFilter
68625bd8deadSopenharmony_ci        and glGetHistogram relative to glGetConvolutionParameter{fv,iv}
68635bd8deadSopenharmony_ci        and glGetHistogramParameter{fv,iv}.
68645bd8deadSopenharmony_ci
68655bd8deadSopenharmony_ci        (There is a poor precedent for having an OpenGL query return both
68665bd8deadSopenharmony_ci        static and varying amounts of data based on a pname parameter.
68675bd8deadSopenharmony_ci        glGetMap{dv,fv,iv} returns varying data when GL_COEFF is queried
68685bd8deadSopenharmony_ci        while GL_ORDER and GL_DOMAIN return n and 2*n values respectively
68695bd8deadSopenharmony_ci        where n is the dimensionality of the map target.  This isn't a
68705bd8deadSopenharmony_ci        good precedent and is obscure.)
68715bd8deadSopenharmony_ci
68725bd8deadSopenharmony_ci    35. How should the GL_PATH_*_BOUNDING_BOX_NV path parameters be
68735bd8deadSopenharmony_ci        returned?
68745bd8deadSopenharmony_ci
68755bd8deadSopenharmony_ci        RESOLVED:  In (x1,y1,x2,y2) order where (x1,y1) is the minimum
68765bd8deadSopenharmony_ci        bounds of the bounding box and (x2,y2) is the maximum bounds.
68775bd8deadSopenharmony_ci
68785bd8deadSopenharmony_ci        This is contrary to the precedent of GL_SCISSOR_BOX query
68795bd8deadSopenharmony_ci        which returns the scissor as an (x,y,width,height) 4-tuple.
68805bd8deadSopenharmony_ci        While that makes sense for a scissor box, particularly given how
68815bd8deadSopenharmony_ci        the scissor is specified with glScissor, it is not a convenient
68825bd8deadSopenharmony_ci        way to specify a bounding box.
68835bd8deadSopenharmony_ci
68845bd8deadSopenharmony_ci        The (x1,y1,x2,y2) format also makes the
68855bd8deadSopenharmony_ci        glCover{Fill|Stroke}PathInstancedNV pseudo-code work nicely
68865bd8deadSopenharmony_ci        with glRectf.  See the renderBoundingBox pseudo-code.
68875bd8deadSopenharmony_ci
68885bd8deadSopenharmony_ci        The (x1,y1,x2,y2) format is also consistent with the way
68895bd8deadSopenharmony_ci        FreeType 2 provides per-font face bounds information through
68905bd8deadSopenharmony_ci        the GL_FONT_X_MIN_BOUNDS_BIT_NV, GL_FONT_Y_MIN_BOUNDS_BIT_NV,
68915bd8deadSopenharmony_ci        GL_FONT_X_MAX_BOUNDS_BIT_NV, and GL_FONT_Y_MAX_BOUNDS_BIT_NV
68925bd8deadSopenharmony_ci        metric queries.
68935bd8deadSopenharmony_ci
68945bd8deadSopenharmony_ci    36. Why is font loading part of this extension?  Shouldn't OpenGL
68955bd8deadSopenharmony_ci        stick with just rendering and not involved itself with fonts?
68965bd8deadSopenharmony_ci
68975bd8deadSopenharmony_ci        RESOLVED:  An explicit goal of this extension is to provide
68985bd8deadSopenharmony_ci        GPU-accelerated path rendering that INCLUDES excellent support
68995bd8deadSopenharmony_ci        for glyphs and their associated metrics.
69005bd8deadSopenharmony_ci
69015bd8deadSopenharmony_ci        The fact is all the major existing standards for path rendering
69025bd8deadSopenharmony_ci        (PostScript, SVG, OpenVG, Java 2D, Quartz 2D, Flash) include
69035bd8deadSopenharmony_ci        first-class font and glyph support.
69045bd8deadSopenharmony_ci
69055bd8deadSopenharmony_ci        Not including font and glyph support would be a glaring omission
69065bd8deadSopenharmony_ci        that would make this extension much less useful to simple OpenGL
69075bd8deadSopenharmony_ci        applications that don't want to incorporate large font libraries.
69085bd8deadSopenharmony_ci
69095bd8deadSopenharmony_ci        Additionally font loading is notoriously platform dependent.
69105bd8deadSopenharmony_ci        This extension provides a simple platform-independent mechanism to
69115bd8deadSopenharmony_ci        rendezvous with standard font names.  However an implementation of
69125bd8deadSopenharmony_ci        this extension can make use of whatever platform-specific font
69135bd8deadSopenharmony_ci        services the platform provides (such as through DirectWrite,
69145bd8deadSopenharmony_ci        etc.).
69155bd8deadSopenharmony_ci
69165bd8deadSopenharmony_ci        Fonts, particularly for Asian languages or designed to support a
69175bd8deadSopenharmony_ci        large portion of Unicode, are large.  Populating their complete
69185bd8deadSopenharmony_ci        outlines can consume substantial amounts of system and video
69195bd8deadSopenharmony_ci        memory.  Many applications on a system are likely to access
69205bd8deadSopenharmony_ci        the same collections of fonts.  Having fonts loaded by name
69215bd8deadSopenharmony_ci        allows GL implementations to coordinate the efficient sharing
69225bd8deadSopenharmony_ci        of font outline data among multiple GL application instances.
69235bd8deadSopenharmony_ci        This font sharing can have a substantial reduction in the total
69245bd8deadSopenharmony_ci        system resources devoted to font data which is not possible if
69255bd8deadSopenharmony_ci        the GL is unable to be aware of duplicated font outline data
69265bd8deadSopenharmony_ci        within the system.
69275bd8deadSopenharmony_ci
69285bd8deadSopenharmony_ci        Font formats change and evolve over time.  Building font format
69295bd8deadSopenharmony_ci        knowledge into applications will ultimately be limiting long-term.
69305bd8deadSopenharmony_ci
69315bd8deadSopenharmony_ci        Fonts are really properly thought of as system resources.
69325bd8deadSopenharmony_ci        They represent intellectual property that is typically licensed
69335bd8deadSopenharmony_ci        on a per-system basis.  Building font access into the GL promotes
69345bd8deadSopenharmony_ci        use of the system's properly licensed fonts.  Most applications
69355bd8deadSopenharmony_ci        do not want to be encumbered by licensing issues associated with
69365bd8deadSopenharmony_ci        fonts so to the extent that the API makes access to system fonts
69375bd8deadSopenharmony_ci        easier, that promotes properly licensed use of fonts.
69385bd8deadSopenharmony_ci
69395bd8deadSopenharmony_ci    37. What is the typographical philosophy for this extension?
69405bd8deadSopenharmony_ci
69415bd8deadSopenharmony_ci        RESOLVED:  This extension relies on other standards to provide
69425bd8deadSopenharmony_ci        its typographic backbone and philosophy.
69435bd8deadSopenharmony_ci
69445bd8deadSopenharmony_ci        The character set supported depends on the Unicode standard.
69455bd8deadSopenharmony_ci
69465bd8deadSopenharmony_ci        Specific font formats supported depend on the system but the
69475bd8deadSopenharmony_ci        expectation is that standard TrueType, PostScript, and OpenType
69485bd8deadSopenharmony_ci        fonts can be used through this extension.  The metrics from such
69495bd8deadSopenharmony_ci        fonts will generally be "passed through" the glGetPathMetricsNV
69505bd8deadSopenharmony_ci        query.
69515bd8deadSopenharmony_ci
69525bd8deadSopenharmony_ci        The naming of fonts is consistent with the underlying system
69535bd8deadSopenharmony_ci        with the expectation that the system's naming is consistent with
69545bd8deadSopenharmony_ci        modern web standards for identifying fonts in web content.
69555bd8deadSopenharmony_ci
69565bd8deadSopenharmony_ci        While the specific set of supported fonts may vary from system to
69575bd8deadSopenharmony_ci        system based on the available installed fonts, the expectation is
69585bd8deadSopenharmony_ci        that standard TrueType fonts such as Arial, New Courier, Georgia,
69595bd8deadSopenharmony_ci        etc. will be available on systems that support this extension.
69605bd8deadSopenharmony_ci
69615bd8deadSopenharmony_ci        For applications that demand a set of glyphs that are guaranteed
69625bd8deadSopenharmony_ci        to be available, the GL_STANDARD_FONT_NAME font target is
69635bd8deadSopenharmony_ci        available for the names "Sans", "Serif", and "Mono" and these
69645bd8deadSopenharmony_ci        fonts are understood to match a set of glyphs consistent with the
69655bd8deadSopenharmony_ci        DejaVu font set populated with at least the Latin-1 character set.
69665bd8deadSopenharmony_ci
69675bd8deadSopenharmony_ci        The underlying font engine is likely to be FreeType 2 or the
69685bd8deadSopenharmony_ci        system's native font engine (such as DirectWrite for newer
69695bd8deadSopenharmony_ci        Windows versions).
69705bd8deadSopenharmony_ci
69715bd8deadSopenharmony_ci    38. What is the path rendering philosophy for this extension?
69725bd8deadSopenharmony_ci
69735bd8deadSopenharmony_ci        RESOLVED:  Two-step stencil-based GPU-acceleration + broad-tent
69745bd8deadSopenharmony_ci        support for the accepted functionality of path rendering.
69755bd8deadSopenharmony_ci
69765bd8deadSopenharmony_ci        This extension assumes that the two-step "stencil, then cover"
69775bd8deadSopenharmony_ci        stencil-based approach to GPU-accelerating path rendering.
69785bd8deadSopenharmony_ci
69795bd8deadSopenharmony_ci        Both stenciling and stroking are supported.  Strokes are
69805bd8deadSopenharmony_ci        first-class representations and not treated as fills that
69815bd8deadSopenharmony_ci        approximate the stroked region.  For pragmatic reasons, cubic
69825bd8deadSopenharmony_ci        Bezier segments, conic segments, and partial elliptical
69835bd8deadSopenharmony_ci        (non-circular) arcs path segments are assumed to be approximated
69845bd8deadSopenharmony_ci        by a sequence of quadratic Bezier path segments that guarantee
69855bd8deadSopenharmony_ci        G1 continuity.
69865bd8deadSopenharmony_ci
69875bd8deadSopenharmony_ci        The contrapositive of this approach is an avoidance of schemes
69885bd8deadSopenharmony_ci        based on tessellation of path outlines.
69895bd8deadSopenharmony_ci
69905bd8deadSopenharmony_ci        Paths are defined using both cubic and quadratic Bezier curves.
69915bd8deadSopenharmony_ci        This broadly allows path content from TrueType (based on quadratic
69925bd8deadSopenharmony_ci        Bezier curves) and PostScript and its font families (based on
69935bd8deadSopenharmony_ci        cubic Bezier curves) to be supported.
69945bd8deadSopenharmony_ci
69955bd8deadSopenharmony_ci        Arcs are drawn consistent with both SVG (partial elliptical arcs)
69965bd8deadSopenharmony_ci        and PostScript (circular arcs and circular tangent arcs).
69975bd8deadSopenharmony_ci
69985bd8deadSopenharmony_ci        The set of stroking options is a union of the stroking features
69995bd8deadSopenharmony_ci        of OpenVG, SVG, XML Paper Specification (XPS), PostScript, and
70005bd8deadSopenharmony_ci        other standards.  For example, XPS supports dash caps that other
70015bd8deadSopenharmony_ci        standards lack.
70025bd8deadSopenharmony_ci
70035bd8deadSopenharmony_ci        The path queries support the key path queries supported by OpenVG.
70045bd8deadSopenharmony_ci
70055bd8deadSopenharmony_ci    39. Should there be an API for assigning path metric information to
70065bd8deadSopenharmony_ci        a path object?
70075bd8deadSopenharmony_ci
70085bd8deadSopenharmony_ci        RESOLVED:  No.
70095bd8deadSopenharmony_ci
70105bd8deadSopenharmony_ci        Path metrics are available when a path object is created with
70115bd8deadSopenharmony_ci        glPathGlyphsNV or glPathGlyphRangeNV.  In these cases, the font
70125bd8deadSopenharmony_ci        supplies the metric data for these path objects.
70135bd8deadSopenharmony_ci
70145bd8deadSopenharmony_ci        It might be useful to allow these metrics to be specified for an
70155bd8deadSopenharmony_ci        arbitrary path object.  This way user-defined path objects could
70165bd8deadSopenharmony_ci        appear to have metrics available as if they had been specified
70175bd8deadSopenharmony_ci        by glPathGlyphsNV or glPathGlyphRangeNV.
70185bd8deadSopenharmony_ci
70195bd8deadSopenharmony_ci        Supporting the specification of path metrics would require new
70205bd8deadSopenharmony_ci        API.  Something like glPathMetricsNV perhaps?  Or having parameter
70215bd8deadSopenharmony_ci        names for the font metrics supported by glPathParameter{f,i}v?
70225bd8deadSopenharmony_ci        The later approach would probably require new tokens and would
70235bd8deadSopenharmony_ci        mean glGetPathParameter{f,i}v should support these tokens too.
70245bd8deadSopenharmony_ci
70255bd8deadSopenharmony_ci        Since the metrics are for information purposes only, meaning
70265bd8deadSopenharmony_ci        the rendering functionality for paths never involves the metrics
70275bd8deadSopenharmony_ci        (unlike other path parameters), it seems odd to allow information
70285bd8deadSopenharmony_ci        to be specified just so it can be queried by the application.
70295bd8deadSopenharmony_ci        This doesn't feel like essential functionality though its
70305bd8deadSopenharmony_ci        absence may be missed by library developers that want to "fake"
70315bd8deadSopenharmony_ci        font loaders.
70325bd8deadSopenharmony_ci
70335bd8deadSopenharmony_ci    40. What happens when an input path object to glWeightPathsNV,
70345bd8deadSopenharmony_ci        glInterpolatePathsNV contains an arc command when there are two
70355bd8deadSopenharmony_ci        or more path objects involved?
70365bd8deadSopenharmony_ci
70375bd8deadSopenharmony_ci        RESOLVED:  An INVALID_OPERATION error is generated.
70385bd8deadSopenharmony_ci
70395bd8deadSopenharmony_ci        In general, arc commands are not "closed" under linear
70405bd8deadSopenharmony_ci        combination.  Said another way, the linear combination of two
70415bd8deadSopenharmony_ci        or more arcs is not, in general, itself an arc of the same form.
70425bd8deadSopenharmony_ci
70435bd8deadSopenharmony_ci        glCopyPathNV copies outlines for path objects containing any
70445bd8deadSopenharmony_ci        valid commands including arc commands.
70455bd8deadSopenharmony_ci
70465bd8deadSopenharmony_ci    41. When a path object is created from other existing path objects
70475bd8deadSopenharmony_ci        through the glWeightPathsNV, glInterpolatePathsNV, or glCopyPathNV
70485bd8deadSopenharmony_ci        commands, where does the new path's parameters come from?
70495bd8deadSopenharmony_ci
70505bd8deadSopenharmony_ci        RESOLVED:  While the path commands are interpolated on a
70515bd8deadSopenharmony_ci        command-by-command basis with these commands, the path parameters
70525bd8deadSopenharmony_ci        should be copied from the first path object specified.
70535bd8deadSopenharmony_ci
70545bd8deadSopenharmony_ci        So for glWeightPathsNV, glInterpolatePathsNV, and glCopyPathNV,
70555bd8deadSopenharmony_ci        the path parameters from the path[0], pathA, and srcPath
70565bd8deadSopenharmony_ci        parameters respectively.
70575bd8deadSopenharmony_ci
70585bd8deadSopenharmony_ci    42. How is the glyph metric and kerning information specified for
70595bd8deadSopenharmony_ci        a path object created from other existing path objects through the
70605bd8deadSopenharmony_ci        glWeightPathsNV, glInterpolatePathsNV, or glCopyPathNV commands,
70615bd8deadSopenharmony_ci        where does the new path's parameters come from?
70625bd8deadSopenharmony_ci
70635bd8deadSopenharmony_ci        RESOLVED:  The path metric information is set to negative one
70645bd8deadSopenharmony_ci        for glWeightPathsNV and glInterpolatePathsNV.
70655bd8deadSopenharmony_ci
70665bd8deadSopenharmony_ci        There's no reasonable way to weight the metric information.
70675bd8deadSopenharmony_ci        Metric information is tuned to a particular glyph.
70685bd8deadSopenharmony_ci
70695bd8deadSopenharmony_ci        More explicitly, the path metric information from the first path
70705bd8deadSopenharmony_ci        object to be combined is NOT copied (as the parameters are).
70715bd8deadSopenharmony_ci
70725bd8deadSopenharmony_ci        However glCopyPathNV does copy the glyph metric and kerning
70735bd8deadSopenharmony_ci        information (since only one path object is involved so there's
70745bd8deadSopenharmony_ci        no combination of outlines).
70755bd8deadSopenharmony_ci
70765bd8deadSopenharmony_ci    43. Should there be a way to specify different stroking parameters
70775bd8deadSopenharmony_ci        (stroke width, end caps, etc.) within the command sequence of
70785bd8deadSopenharmony_ci        a path?
70795bd8deadSopenharmony_ci
70805bd8deadSopenharmony_ci        RESOLVED:  No.
70815bd8deadSopenharmony_ci
70825bd8deadSopenharmony_ci        Existing path rendering standards keep the stroking parameters
70835bd8deadSopenharmony_ci        constant for a given path's outline.  For example, there's not
70845bd8deadSopenharmony_ci        support for a dashed stroked segment of width 5.0 as well as a
70855bd8deadSopenharmony_ci        non-dashed stroked segment with width 9.4 in the same path.
70865bd8deadSopenharmony_ci
70875bd8deadSopenharmony_ci        This wouldn't be impossible to support; commands that changed
70885bd8deadSopenharmony_ci        stroking parameters could be supported within the command
70895bd8deadSopenharmony_ci        sequence.  However it would complicate the meaning of the path
70905bd8deadSopenharmony_ci        parameters for stroking; these parameters could be considered
70915bd8deadSopenharmony_ci        defaults for stroking parameters if stroking parameters are not
70925bd8deadSopenharmony_ci        otherwise specified.  There's also the complication of when
70935bd8deadSopenharmony_ci        new stroking parameters would latch into place.  Would it be
70945bd8deadSopenharmony_ci        immediately (mid path?) or not latch until the next "moveto"
70955bd8deadSopenharmony_ci        command?  And how would such commands be weighted/interpolated?
70965bd8deadSopenharmony_ci
70975bd8deadSopenharmony_ci        Attempting to support changing stroking parameters within a path
70985bd8deadSopenharmony_ci        appears to open up a complicated can of worms.
70995bd8deadSopenharmony_ci
71005bd8deadSopenharmony_ci        The same rendering effect can be achieved with the
71015bd8deadSopenharmony_ci        gl{Stencil,Cover}StrokePathInstancedNV commands using multiple
71025bd8deadSopenharmony_ci        path object, each with the appropriate stroking parameters for
71035bd8deadSopenharmony_ci        the appropriate path segments.
71045bd8deadSopenharmony_ci
71055bd8deadSopenharmony_ci    44. What should the query token for the path color and texture
71065bd8deadSopenharmony_ci        coordinate generation coefficients be named?
71075bd8deadSopenharmony_ci
71085bd8deadSopenharmony_ci        RESOLVED:  GL_PATH_GEN_COEFF_NV.
71095bd8deadSopenharmony_ci
71105bd8deadSopenharmony_ci        Alternatively this could be GL_PATH_GEN_COEFF_NV (plural),
71115bd8deadSopenharmony_ci        but that doesn't match the precedent set by GL_COEFF used by
71125bd8deadSopenharmony_ci        glGetMap{f,d}v.  These existing queries return a plurality of
71135bd8deadSopenharmony_ci        coefficients too.
71145bd8deadSopenharmony_ci
71155bd8deadSopenharmony_ci    45. What should the number of coefficients returned when querying the
71165bd8deadSopenharmony_ci        path color and texture coordinate generation coefficients depend
71175bd8deadSopenharmony_ci        on the current path color or texture coordinate generation mode or
71185bd8deadSopenharmony_ci        should a fixed maximum number of coefficients always be returned?
71195bd8deadSopenharmony_ci
71205bd8deadSopenharmony_ci        RESOLVED:  A fixed maximum of 16 coefficients should always
71215bd8deadSopenharmony_ci        be returned.
71225bd8deadSopenharmony_ci
71235bd8deadSopenharmony_ci        It is error-prone and likely to result in obscure buffer
71245bd8deadSopenharmony_ci        overflow cases if the number of coefficients returned depends
71255bd8deadSopenharmony_ci        on the respective current path generation mode.  It is better
71265bd8deadSopenharmony_ci        to simply always return 16 values.  Unused coefficients by the
71275bd8deadSopenharmony_ci        current generation mode should always be returned as zero.
71285bd8deadSopenharmony_ci
71295bd8deadSopenharmony_ci    46. How does glGetPathLengthNV compare to OpenVG's vgPathLength?
71305bd8deadSopenharmony_ci
71315bd8deadSopenharmony_ci        RESOLVED:  glGetPathLengthNV and vgPathLength compute
71325bd8deadSopenharmony_ci        essentially the same result except glGetPathLengthNV returns
71335bd8deadSopenharmony_ci        0 when /numSegments/ is 0 whereas vgPathLength considers this
71345bd8deadSopenharmony_ci        case an error.
71355bd8deadSopenharmony_ci
71365bd8deadSopenharmony_ci    47. Where does all the discussion of partial elliptical arc
71375bd8deadSopenharmony_ci        parameterization come from?
71385bd8deadSopenharmony_ci
71395bd8deadSopenharmony_ci        RESOLVED:  This discussion is based on and fully consistent with:
71405bd8deadSopenharmony_ci
71415bd8deadSopenharmony_ci            http://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes
71425bd8deadSopenharmony_ci
71435bd8deadSopenharmony_ci    48. Where does the parameterization of the
71445bd8deadSopenharmony_ci        GL_CIRCULAR_TANGENT_ARC_TO_NV come from?
71455bd8deadSopenharmony_ci
71465bd8deadSopenharmony_ci        RESOLVED:  The GL_CIRCULAR_TANGENT_ARC_TO_NV is based on the
71475bd8deadSopenharmony_ci        PostScript arct command (which is based on arcto) for user paths.
71485bd8deadSopenharmony_ci
71495bd8deadSopenharmony_ci        See the gs_arcto routine in:
71505bd8deadSopenharmony_ci
71515bd8deadSopenharmony_ci            http://svn.ghostscript.com/ghostscript/trunk/gs/base/gspath1.c
71525bd8deadSopenharmony_ci
71535bd8deadSopenharmony_ci    49. How should fog coordinate generation work for path rendering?
71545bd8deadSopenharmony_ci
71555bd8deadSopenharmony_ci        RESOLVED:  The glPathFogGenNV command controls how generation
71565bd8deadSopenharmony_ci        of the fog coordinate operates for path rendering commands.
71575bd8deadSopenharmony_ci
71585bd8deadSopenharmony_ci        The GL_FOG enable is tricky because it controls both per-vertex and
71595bd8deadSopenharmony_ci        per-fragment processing state (unlike per-vertex lighting and texture
71605bd8deadSopenharmony_ci        coordinate generation).
71615bd8deadSopenharmony_ci
71625bd8deadSopenharmony_ci        Simply using the existing fixed-function fog coordinate state is
71635bd8deadSopenharmony_ci        undesirable because that 1) entangles fog coordinate generation
71645bd8deadSopenharmony_ci        with conventional vertex processing and path vertex processing,
71655bd8deadSopenharmony_ci        and 2) the NV_fog_distance extension allows a non-linear fog
71665bd8deadSopenharmony_ci        coordinate to be generated through the GL_EYE_RADIAL_NV mode.
71675bd8deadSopenharmony_ci
71685bd8deadSopenharmony_ci        The fog coordinate generation for path rendering can either
71695bd8deadSopenharmony_ci        use the fog coordinate "as is" for the entire covered path or
71705bd8deadSopenharmony_ci        have the fog coordinate be the negated perspective-divided
71715bd8deadSopenharmony_ci        eye-space Z component (which can vary, but only linearly).
71725bd8deadSopenharmony_ci
71735bd8deadSopenharmony_ci    50. What should glyph metrics return for path objects not specified
71745bd8deadSopenharmony_ci        by glPathGlyphsNV or glPathGlyphRangeNV?
71755bd8deadSopenharmony_ci
71765bd8deadSopenharmony_ci        RESOLVED:  All queried metrics should return the value -1.
71775bd8deadSopenharmony_ci
71785bd8deadSopenharmony_ci        Negative values are out-of-range for many of the metric values so
71795bd8deadSopenharmony_ci        negative values provide a reliable indicator that a path object
71805bd8deadSopenharmony_ci        was not specified from a glyph.
71815bd8deadSopenharmony_ci
71825bd8deadSopenharmony_ci    51. How should the fill mode state of path objects created from
71835bd8deadSopenharmony_ci        glyphs be initialized?
71845bd8deadSopenharmony_ci
71855bd8deadSopenharmony_ci        RESOLVED:  The initial GL_PATH_FILL_MODE_NV for path objects
71865bd8deadSopenharmony_ci        created from glyphs depends on the source font's convention.
71875bd8deadSopenharmony_ci
71885bd8deadSopenharmony_ci        Typically TrueType and newer (all?) PostScript fonts depend on the
71895bd8deadSopenharmony_ci        non-zero fill rule.  TrueType fonts assume a clockwise outline
71905bd8deadSopenharmony_ci        winding (hence will use GL_COUNT_DOWN_NV) while PostScript
71915bd8deadSopenharmony_ci        fonts assume a counterclockwise outline winding (hence will
71925bd8deadSopenharmony_ci        use GL_COUNT_UP_NV).
71935bd8deadSopenharmony_ci
71945bd8deadSopenharmony_ci        It's unlikely an actual font will use GL_INVERT as its
71955bd8deadSopenharmony_ci        GL_PATH_FILL_MODE_NV but the possibility is allowed.
71965bd8deadSopenharmony_ci
71975bd8deadSopenharmony_ci    52. Should other path object parameters other than the fill mode be
71985bd8deadSopenharmony_ci        initialized specially when path objects are specified from glyphs?
71995bd8deadSopenharmony_ci
72005bd8deadSopenharmony_ci        RESOLVED:  No.
72015bd8deadSopenharmony_ci
72025bd8deadSopenharmony_ci        In theory, other path parameters such as stroke width, join style,
72035bd8deadSopenharmony_ci        etc. could all be specified from the font.  In practice, most
72045bd8deadSopenharmony_ci        font forms don't provide such parameters.
72055bd8deadSopenharmony_ci
72065bd8deadSopenharmony_ci        At least one font format, Bitstream's PFA format, does provide
72075bd8deadSopenharmony_ci        such information though how applicable these parameters are to
72085bd8deadSopenharmony_ci        a path object is unclear.  The availability of these parameters
72095bd8deadSopenharmony_ci        appears to be intended as a way to bold or otherwise dilate the
72105bd8deadSopenharmony_ci        glyph's outline rather than being intended for stroking.
72115bd8deadSopenharmony_ci
72125bd8deadSopenharmony_ci        SVG supports stroking of fonts but the stroke-width tag is
72135bd8deadSopenharmony_ci        specified in the current user coordinate system rather than
72145bd8deadSopenharmony_ci        depending on the particular font or its glyphs.
72155bd8deadSopenharmony_ci
72165bd8deadSopenharmony_ci    53. How should the integers passed to glPathGlyphsNV and
72175bd8deadSopenharmony_ci        glPathGlyphRangeNV be mapped to actual glyph outlines for a font?
72185bd8deadSopenharmony_ci
72195bd8deadSopenharmony_ci        RESOLVED:  The integers that come from the charcode array or
72205bd8deadSopenharmony_ci        the firstGlyph to firstGlyph+numGlyphs-1 range are treated as
72215bd8deadSopenharmony_ci        Unicode character codes if the font has a meaningful mapping of
72225bd8deadSopenharmony_ci        Unicode to its glyphs.
72235bd8deadSopenharmony_ci
72245bd8deadSopenharmony_ci        The existence of a meaningful mapping from Unicode to glyph
72255bd8deadSopenharmony_ci        outlines is the expected situation.  For fonts without a
72265bd8deadSopenharmony_ci        meaningful mapping to Unicode character codes (such as custom
72275bd8deadSopenharmony_ci        symbol fonts), the font's standard mapping of character codes to
72285bd8deadSopenharmony_ci        glyphs should be used.  This situation should be rare, probably
72295bd8deadSopenharmony_ci        due to a font that is poorly authored, very old, or custom built.
72305bd8deadSopenharmony_ci
72315bd8deadSopenharmony_ci    54. How are typographical situations such as ligatures, composite
72325bd8deadSopenharmony_ci        characters, glyph substitution, and language-dependent character
72335bd8deadSopenharmony_ci        sequence conversion handled?
72345bd8deadSopenharmony_ci
72355bd8deadSopenharmony_ci        RESOLVED:  If a particular behavior is desired for how such
72365bd8deadSopenharmony_ci        situations are handled, that is up to the application software
72375bd8deadSopenharmony_ci        using this extension.
72385bd8deadSopenharmony_ci
72395bd8deadSopenharmony_ci        For example, in the case of ligatures, multiple Unicode characters
72405bd8deadSopenharmony_ci        may map to a single ligature glyph.  Support for ligatures is
72415bd8deadSopenharmony_ci        a stylistic typographic decision and the application is free to
72425bd8deadSopenharmony_ci        handle this in any of a number of ways; this extension neither
72435bd8deadSopenharmony_ci        forces nor precludes specific approaches to handle ligatures.
72445bd8deadSopenharmony_ci        The application can overlap existing glyphs to create the
72455bd8deadSopenharmony_ci        appearance of a path object by rendering the individual multiple
72465bd8deadSopenharmony_ci        Unicode characters overlapped; a ligature character that is
72475bd8deadSopenharmony_ci        part of the Unicode character set could be selected; or the
72485bd8deadSopenharmony_ci        application could create its own custom path object in this
72495bd8deadSopenharmony_ci        situation and render it.
72505bd8deadSopenharmony_ci
72515bd8deadSopenharmony_ci        For composite characters, the underlying font engine used to
72525bd8deadSopenharmony_ci        implement this extension may construct composite characters.
72535bd8deadSopenharmony_ci        Or this may be a situation where, due to limitations of the
72545bd8deadSopenharmony_ci        font or font engine, possibly in combination, this is treated as
72555bd8deadSopenharmony_ci        an unknown or missing character where implementation-dependent
72565bd8deadSopenharmony_ci        handling is possible.  Such a situation could also exist for a
72575bd8deadSopenharmony_ci        ligature character specified by Unicode.
72585bd8deadSopenharmony_ci
72595bd8deadSopenharmony_ci        In general, higher level details of text presentation such
72605bd8deadSopenharmony_ci        as ligatures, composite characters, glyph substitution, and
72615bd8deadSopenharmony_ci        language-dependent character sequence conversion are beyond the
72625bd8deadSopenharmony_ci        scope of this extension.
72635bd8deadSopenharmony_ci
72645bd8deadSopenharmony_ci        See the Unicode FAQ on "Ligatures, Digraphs and Presentation
72655bd8deadSopenharmony_ci        Forms":
72665bd8deadSopenharmony_ci
72675bd8deadSopenharmony_ci            http://www.unicode.org/faq/ligature_digraph.html
72685bd8deadSopenharmony_ci
72695bd8deadSopenharmony_ci        In complicated typographical situations, the assumption is that
72705bd8deadSopenharmony_ci        the application will construct the appropriate inter-glyph
72715bd8deadSopenharmony_ci        transformation values (the transformValues and transformType
72725bd8deadSopenharmony_ci        for glStencilFillPathInstancedNV and glCoverFillPathInstancedNV)
72735bd8deadSopenharmony_ci        and build digraphs or other presentation forms.
72745bd8deadSopenharmony_ci
72755bd8deadSopenharmony_ci    55. Are relative path commands converted to absolute commands upon
72765bd8deadSopenharmony_ci        path specification?
72775bd8deadSopenharmony_ci
72785bd8deadSopenharmony_ci        RESOLVED:  No, relative commands are first-class and are
72795bd8deadSopenharmony_ci        maintained as relative commands.
72805bd8deadSopenharmony_ci
72815bd8deadSopenharmony_ci        This includes when relative commands are created by copying,
72825bd8deadSopenharmony_ci        interpolating, or weighting existing path objects.  Relative path
72835bd8deadSopenharmony_ci        commands must match identical relative path commands and their
72845bd8deadSopenharmony_ci        relatively control points are weighted as relative position
72855bd8deadSopenharmony_ci        offsets.
72865bd8deadSopenharmony_ci
72875bd8deadSopenharmony_ci        Another implication if this is that if an application modifying
72885bd8deadSopenharmony_ci        the control points with glPathSubCoordsNV, those edits can effect
72895bd8deadSopenharmony_ci        the outline of subsequent relative commands that depend on the
72905bd8deadSopenharmony_ci        modified coordinates.
72915bd8deadSopenharmony_ci
72925bd8deadSopenharmony_ci        The same applies to changing commands.  Editing commands with
72935bd8deadSopenharmony_ci        glPathSubCommandsNV can change how coordinates are interpreted
72945bd8deadSopenharmony_ci        for the edited commands and subsequent relative commands.
72955bd8deadSopenharmony_ci
72965bd8deadSopenharmony_ci        In other words, if a path object is modified or edited, the
72975bd8deadSopenharmony_ci        outline of the path is the same as if the path object had been
72985bd8deadSopenharmony_ci        specified from scratch with the same command and coordinate
72995bd8deadSopenharmony_ci        sequences.
73005bd8deadSopenharmony_ci
73015bd8deadSopenharmony_ci    56. What does this extension do with so-called "hinting" in outline
73025bd8deadSopenharmony_ci        font glyphs?
73035bd8deadSopenharmony_ci
73045bd8deadSopenharmony_ci        RESOLVED:  When a path object is specified from the glyph of a
73055bd8deadSopenharmony_ci        font, the path object's outline is specified from the "ideal"
73065bd8deadSopenharmony_ci        resolution-independent form of the glyph.
73075bd8deadSopenharmony_ci
73085bd8deadSopenharmony_ci        This is because a path object is rendered (stenciled or covered)
73095bd8deadSopenharmony_ci        from a resolution-independent form.  There is an implicit
73105bd8deadSopenharmony_ci        assumption in the specified transformation and rendering process
73115bd8deadSopenharmony_ci        that the process is unaware of the device coordinate grid.
73125bd8deadSopenharmony_ci
73135bd8deadSopenharmony_ci        This means there's not the knowledge of device coordinate space
73145bd8deadSopenharmony_ci        necessary to apply hinting information.
73155bd8deadSopenharmony_ci
73165bd8deadSopenharmony_ci        In TrueType terms, this amounts to the path object's outline for
73175bd8deadSopenharmony_ci        a TrueType glyph being the glyph's "master outline".  This means
73185bd8deadSopenharmony_ci        the TrueType instructions associated with the glyph are ignored
73195bd8deadSopenharmony_ci        and not executed.
73205bd8deadSopenharmony_ci
73215bd8deadSopenharmony_ci        While it is beyond the scope of this extension, there's nothing
73225bd8deadSopenharmony_ci        in this extension that keeps an application in decoding itself the
73235bd8deadSopenharmony_ci        TrueType master outline of a glyph and performing the grid-fitted
73245bd8deadSopenharmony_ci        outline generation at a given arbitrary device resolution.
73255bd8deadSopenharmony_ci        Then this fitted outline could be specified for a path object.
73265bd8deadSopenharmony_ci        The key observation is that doing so makes the resulting outline
73275bd8deadSopenharmony_ci        resolution-dependent which obviates much of the advantage of
73285bd8deadSopenharmony_ci        this extension's ability to render from a resolution-independent
73295bd8deadSopenharmony_ci        outline.
73305bd8deadSopenharmony_ci
73315bd8deadSopenharmony_ci        Rather than relying on hinting for legibility, applications using
73325bd8deadSopenharmony_ci        this extension are likely to rely on multisampling or multiple
73335bd8deadSopenharmony_ci        jittered rendering passes for antialiasing and assume a certain
73345bd8deadSopenharmony_ci        amount of grayscale appearance as a consequence.
73355bd8deadSopenharmony_ci
73365bd8deadSopenharmony_ci    57. If a font format has bitmap font data, is that used?
73375bd8deadSopenharmony_ci
73385bd8deadSopenharmony_ci        RESOLVED:  No, only resolution-independent outline data is used;
73395bd8deadSopenharmony_ci        bitmap data is ignored.  Bitmap-only font formats won't be loaded.
73405bd8deadSopenharmony_ci
73415bd8deadSopenharmony_ci        In the FreeType 2 API, the information available is comparable
73425bd8deadSopenharmony_ci        to calling FT_Load_Glyph with the FT_LOAD_NO_SCALE and
73435bd8deadSopenharmony_ci        FT_LOAD_NO_BITMAP flags specified.
73445bd8deadSopenharmony_ci
73455bd8deadSopenharmony_ci    58. How is antialiasing of path object rendering accomplished?
73465bd8deadSopenharmony_ci
73475bd8deadSopenharmony_ci        RESOLVED:  Multisampling is the expected way that antialiasing
73485bd8deadSopenharmony_ci        will be accomplished when rendering path objects.
73495bd8deadSopenharmony_ci
73505bd8deadSopenharmony_ci        Recall in multisampling that the stencil buffer is maintained
73515bd8deadSopenharmony_ci        at per-sample resolution.  This means the coverage determined
73525bd8deadSopenharmony_ci        by stenciling path objects should be accurate to the sample
73535bd8deadSopenharmony_ci        resolution.
73545bd8deadSopenharmony_ci
73555bd8deadSopenharmony_ci        If a multisampled framebuffer provides N samples per pixel, that
73565bd8deadSopenharmony_ci        means that there are N+1 possible coverage weightings of a given
73575bd8deadSopenharmony_ci        path with respect to that pixel, assuming a single "stencil, then
73585bd8deadSopenharmony_ci        cover step", equal weighting of samples in the final pixel color,
73595bd8deadSopenharmony_ci        and the samples for a given pixel belonging to a single pixel.
73605bd8deadSopenharmony_ci
73615bd8deadSopenharmony_ci        One explicit goal of this extension is to maintain a separation
73625bd8deadSopenharmony_ci        between coverage and opacity.  The two concepts are often
73635bd8deadSopenharmony_ci        conflated treating both as percentages and then modulating
73645bd8deadSopenharmony_ci        opacity with coverage.  Conflating the two leads to coverage
73655bd8deadSopenharmony_ci        bleeding at what should be sharp, though transparent, edges and
73665bd8deadSopenharmony_ci        corners.
73675bd8deadSopenharmony_ci
73685bd8deadSopenharmony_ci        In this extension, the stencil buffer maintains coverage and
73695bd8deadSopenharmony_ci        the alpha channel for RGBA colors, which is per-sample when the
73705bd8deadSopenharmony_ci        framebuffer format supports multisampling, maintains opacity.
73715bd8deadSopenharmony_ci
73725bd8deadSopenharmony_ci        Philosophically this extension provides a robust and accurate
73735bd8deadSopenharmony_ci        mechanism for determining point-sampled coverage for arbitrary
73745bd8deadSopenharmony_ci        filled and stroked paths.  The extension does not rely on, nor
73755bd8deadSopenharmony_ci        does it even attempt, to compute or approximate a path's area
73765bd8deadSopenharmony_ci        coverage with respect to a pixel.  For practical reasons, such
73775bd8deadSopenharmony_ci        analytical computations are inevitably approximations for
73785bd8deadSopenharmony_ci        arbitrary paths and are difficult to make robust.
73795bd8deadSopenharmony_ci
73805bd8deadSopenharmony_ci        Point sampling of path object rasterization can offer more
73815bd8deadSopenharmony_ci        robustness and precision.  Point sampling also allows this
73825bd8deadSopenharmony_ci        extension's rendering results to seamlessly co-exist with OpenGL's
73835bd8deadSopenharmony_ci        conventional point, line, and polygon rasterization approaches
73845bd8deadSopenharmony_ci        which are point-sampled.
73855bd8deadSopenharmony_ci
73865bd8deadSopenharmony_ci        The implication of this observation is path rendered content can
73875bd8deadSopenharmony_ci        be mixed with arbitrary OpenGL 3D content, whether rendered with
73885bd8deadSopenharmony_ci        depth testing or not.  This provides the very powerful ability to
73895bd8deadSopenharmony_ci        mix path rendered and 3D rendered content in the same framebuffer
73905bd8deadSopenharmony_ci        in predictable ways with negligible overhead for doing so.
73915bd8deadSopenharmony_ci
73925bd8deadSopenharmony_ci        Keep in mind that 2D path rendered content is transformed by the
73935bd8deadSopenharmony_ci        projective modelview-projection transform, just like other OpenGL
73945bd8deadSopenharmony_ci        rendering primitives, so fragments generated with path rendering
73955bd8deadSopenharmony_ci        have varying depth values that can be depth tested, fogged, etc.
73965bd8deadSopenharmony_ci
73975bd8deadSopenharmony_ci        Point sampling is prone to missing coverage but avoids indicating
73985bd8deadSopenharmony_ci        coverage where no actual coverage exists.
73995bd8deadSopenharmony_ci
74005bd8deadSopenharmony_ci        This extension implicitly assumes that GPUs have some maximum
74015bd8deadSopenharmony_ci        sample location precision while rasterizing.  This is an artifact
74025bd8deadSopenharmony_ci        of subpixel precision.  This concept is built into OpenGL; see
74035bd8deadSopenharmony_ci        the GL_SUBPIXEL_BITS implementation-dependent limit.  Developers
74045bd8deadSopenharmony_ci        should not expect any additional sampling precision beyond this
74055bd8deadSopenharmony_ci        limit.  To get beyond this limit, applications would be expected
74065bd8deadSopenharmony_ci        to render at a larger framebuffer resolution and downsample to
74075bd8deadSopenharmony_ci        the appropriate resolution or render in some tiled fashion.
74085bd8deadSopenharmony_ci
74095bd8deadSopenharmony_ci        If multisampling provides insufficient antialiasing, further
74105bd8deadSopenharmony_ci        antialiasing is possible by rendering with multiple passes.
74115bd8deadSopenharmony_ci
74125bd8deadSopenharmony_ci        For example, applications can use accumulation buffer techniques
74135bd8deadSopenharmony_ci        with sub-pixel jittered re-rendering of the entire scene
74145bd8deadSopenharmony_ci        to improve the overall quality.  This provides full-scene
74155bd8deadSopenharmony_ci        antialiasing.
74165bd8deadSopenharmony_ci
74175bd8deadSopenharmony_ci        Alternatively, a path object itself needing extra antialiasing,
74185bd8deadSopenharmony_ci        perhaps because the application has determined the path object
74195bd8deadSopenharmony_ci        maps to a small region of the framebuffer in window space, can
74205bd8deadSopenharmony_ci        be rendered multiple times, each time with subpixel jittering.
74215bd8deadSopenharmony_ci        By writing just into the non-visible alpha component of the
74225bd8deadSopenharmony_ci        framebuffer, a coverage percentage at each color sample can
74235bd8deadSopenharmony_ci        be accumulated.  Then a final cover operation can blend this
74245bd8deadSopenharmony_ci        coverage information into the visible RGB color channels.
74255bd8deadSopenharmony_ci
74265bd8deadSopenharmony_ci        Despite the multiple passes involved, this approach can still
74275bd8deadSopenharmony_ci        be several times faster than CPU path rendering methods because
74285bd8deadSopenharmony_ci        of the rendering rate possible through GPU acceleration.
74295bd8deadSopenharmony_ci
74305bd8deadSopenharmony_ci    59. How do the multisample fragment operations interact with path
74315bd8deadSopenharmony_ci        rendering?
74325bd8deadSopenharmony_ci
74335bd8deadSopenharmony_ci        RESOLVED:  They are ignored for the "stencil" path rendering
74345bd8deadSopenharmony_ci        operations (since only the stencil buffer is updated), and they
74355bd8deadSopenharmony_ci        work as specified for the "cover" path rendering operation.
74365bd8deadSopenharmony_ci
74375bd8deadSopenharmony_ci        The coverage determination made during the "cover" path
74385bd8deadSopenharmony_ci        rendering operation doesn't reflect the path itself but rather
74395bd8deadSopenharmony_ci        the conservative coverage provide by the covering operation.
74405bd8deadSopenharmony_ci        For this reason, the coverage mask is conservative, meaning
74415bd8deadSopenharmony_ci        samples may be covered that don't actually belong to the filled
74425bd8deadSopenharmony_ci        or stenciled region of the path being covered.  And exactly how
74435bd8deadSopenharmony_ci        conservative this coverage is depends on the implementation.
74445bd8deadSopenharmony_ci
74455bd8deadSopenharmony_ci        Still the coverage is available and can be used as specified in
74465bd8deadSopenharmony_ci        section 4.1.3 ("Multisample Fragment Operations").
74475bd8deadSopenharmony_ci
74485bd8deadSopenharmony_ci        The GL_SAMPLE_COVERAGE mode would be more useful if the stencil
74495bd8deadSopenharmony_ci        testing was performed prior to the shading of the covered geometry
74505bd8deadSopenharmony_ci        and the covered sample mask reflected any discards performed by
74515bd8deadSopenharmony_ci        the stencil (or depth) tests.
74525bd8deadSopenharmony_ci
74535bd8deadSopenharmony_ci        The NV_explicit_multisample extension and its
74545bd8deadSopenharmony_ci        ARB_texture_multisample functionality (standard with OpenGL 3.2)
74555bd8deadSopenharmony_ci        provide explicit control of the multisample mask.  This mask is
74565bd8deadSopenharmony_ci        respected for path rendering.
74575bd8deadSopenharmony_ci
74585bd8deadSopenharmony_ci    60. Does creating multiple instances of path objects from the same
74595bd8deadSopenharmony_ci        glyph in the same font face "waste memory"?  What about copies
74605bd8deadSopenharmony_ci        of objects created with glCopyPathNV?
74615bd8deadSopenharmony_ci
74625bd8deadSopenharmony_ci        RESOLVED:  This is an implementation issue, but it is reasonable
74635bd8deadSopenharmony_ci        to expect that copies of path objects created with glCopyPathNV
74645bd8deadSopenharmony_ci        will share their outline data on a copy-on-write basis.  This is
74655bd8deadSopenharmony_ci        true even if a path object is copied and its path parameters
74665bd8deadSopenharmony_ci        are modified (but not the path commands and coordinates).
74675bd8deadSopenharmony_ci
74685bd8deadSopenharmony_ci        It is also reasonable to expect that path objects created with
74695bd8deadSopenharmony_ci        glPathGlyphsNV may use copies if there are replicated character
74705bd8deadSopenharmony_ci        codes.  While glPathGlyphRangeNV isn't subject to replicated
74715bd8deadSopenharmony_ci        character codes, if two or more character codes share the same
74725bd8deadSopenharmony_ci        glyph, it would be reasonable to expect the implementation might
74735bd8deadSopenharmony_ci        share the outline data.
74745bd8deadSopenharmony_ci
74755bd8deadSopenharmony_ci        It's always possible to use glPathSubCommandsNV or
74765bd8deadSopenharmony_ci        glPathSubCoordsNV to modify the path commands and/or coordinate
74775bd8deadSopenharmony_ci        data so then sharing will have to be broken.
74785bd8deadSopenharmony_ci
74795bd8deadSopenharmony_ci    61. Why does glPathGlyphsNV (and hence glPathGlyphRangeNV as well)
74805bd8deadSopenharmony_ci        not disturb path objects that already exist in the range of path
74815bd8deadSopenharmony_ci        objects to be created?
74825bd8deadSopenharmony_ci
74835bd8deadSopenharmony_ci        RESOLVED:  This facilitates a strategy for supporting multiple
74845bd8deadSopenharmony_ci        font names specified in preferential order.
74855bd8deadSopenharmony_ci
74865bd8deadSopenharmony_ci        An application can do something like:
74875bd8deadSopenharmony_ci
74885bd8deadSopenharmony_ci          GLint firstPathName = glGenPathsNV(256);
74895bd8deadSopenharmony_ci          const GLfloat emScale = 2048;
74905bd8deadSopenharmony_ci          glPathGlyphRangeNV(firstPathName, GL_SYSTEM_FONT_NAME_NV,
74915bd8deadSopenharmony_ci                             "Helvetica", GL_NONE, 0, 256, emScale);
74925bd8deadSopenharmony_ci          glPathGlyphRangeNV(firstPathName, GL_SYSTEM_FONT_NAME_NV,
74935bd8deadSopenharmony_ci                             "Arial", GL_NONE, 0, 256, emScale);
74945bd8deadSopenharmony_ci          glPathGlyphRangeNV(firstPathName, GL_STANDARD_FONT_NAME_NV,
74955bd8deadSopenharmony_ci                             "Sans", GL_NONE, 0, 256, emScale);
74965bd8deadSopenharmony_ci
74975bd8deadSopenharmony_ci        This ensures that path object names /firstPathName/ through
74985bd8deadSopenharmony_ci        /firstPathName/+255 will be loaded with the glyphs from Helvetica,
74995bd8deadSopenharmony_ci        Arial, or the guaranteed-present Sans font face, in that order
75005bd8deadSopenharmony_ci        of preference.
75015bd8deadSopenharmony_ci
75025bd8deadSopenharmony_ci        This is consistent with the CSS font-family property used in
75035bd8deadSopenharmony_ci        web standards, including SVG.
75045bd8deadSopenharmony_ci
75055bd8deadSopenharmony_ci    62. Why are the angles for the arc path commands specified with
75065bd8deadSopenharmony_ci        degrees (instead of radians)?
75075bd8deadSopenharmony_ci
75085bd8deadSopenharmony_ci        RESOLVED:  Using degrees is consistent with OpenGL's existing
75095bd8deadSopenharmony_ci        glRotatef, glRotated, and gluPerspective commands.
75105bd8deadSopenharmony_ci
75115bd8deadSopenharmony_ci        Using degrees for angles is also consistent with the conventions
75125bd8deadSopenharmony_ci        of the PostScript, SVG, and OpenVG commands upon which the arc
75135bd8deadSopenharmony_ci        path commands are based.
75145bd8deadSopenharmony_ci
75155bd8deadSopenharmony_ci        Using degrees (90 degrees, 30 degrees, 45 degrees) also allows
75165bd8deadSopenharmony_ci        important angles be represented exactly with integer values.
75175bd8deadSopenharmony_ci        This is relevant for compact coordinate formats and paths defined
75185bd8deadSopenharmony_ci        by strings.
75195bd8deadSopenharmony_ci
75205bd8deadSopenharmony_ci    63. Should UTF-8 and UTF-16 be supported for arrays of path names?
75215bd8deadSopenharmony_ci
75225bd8deadSopenharmony_ci        RESOLVED:  Yes.
75235bd8deadSopenharmony_ci
75245bd8deadSopenharmony_ci    64. What order should the arguments be listed when a array of
75255bd8deadSopenharmony_ci        path objects with typed elements and a base are specified?
75265bd8deadSopenharmony_ci
75275bd8deadSopenharmony_ci        RESOLVED:
75285bd8deadSopenharmony_ci
75295bd8deadSopenharmony_ci        1) sizei count,
75305bd8deadSopenharmony_ci        2) enum pathNameType,
75315bd8deadSopenharmony_ci        3) const void *paths,
75325bd8deadSopenharmony_ci        4) uint pathBase
75335bd8deadSopenharmony_ci
75345bd8deadSopenharmony_ci        The standard OpenGL parameter pattern is count/type/array.
75355bd8deadSopenharmony_ci        Examples of this are glDrawElements and glCallLists.
75365bd8deadSopenharmony_ci        (More generally the pattern is count/format/type/array.)
75375bd8deadSopenharmony_ci
75385bd8deadSopenharmony_ci        Having the pathBase parameter last matches the precedent set by.
75395bd8deadSopenharmony_ci        glDrawElementsBaseVertex where the base vertex value follows
75405bd8deadSopenharmony_ci        the list of element indices.  Hence the pattern
75415bd8deadSopenharmony_ci        count/type/array/base.
75425bd8deadSopenharmony_ci
75435bd8deadSopenharmony_ci        The basevertex parameter to glDrawElementsBaseVertex is typed
75445bd8deadSopenharmony_ci        GLint; the pathBase parameter is typed GLuint.  GLuint makes
75455bd8deadSopenharmony_ci        sense to avoid useless signed/unsigned mismatch warnings from
75465bd8deadSopenharmony_ci        C compilers when most values passed to pathBase parameters are
75475bd8deadSopenharmony_ci        likely to be from GLuint variables.  When GLuint and GLint are
75485bd8deadSopenharmony_ci        both 32-bit data types, the choice is not consequential.
75495bd8deadSopenharmony_ci
75505bd8deadSopenharmony_ci        Commands that use this order are glStencilFillPathInstancedNV,
75515bd8deadSopenharmony_ci        glStencilStrokePathInstancedNV, glCoverFillPathInstancedNV,
75525bd8deadSopenharmony_ci        glCoverStrokePathInstancedNV, glGetPathMetricsNV, and
75535bd8deadSopenharmony_ci        glGetPathSpacingNV.
75545bd8deadSopenharmony_ci
75555bd8deadSopenharmony_ci    65. What order should the arguments be listed when a range of
75565bd8deadSopenharmony_ci        path objects is specified?
75575bd8deadSopenharmony_ci
75585bd8deadSopenharmony_ci        RESOLVED:
75595bd8deadSopenharmony_ci
75605bd8deadSopenharmony_ci        1) uint firstPath,
75615bd8deadSopenharmony_ci        2) sizei count
75625bd8deadSopenharmony_ci
75635bd8deadSopenharmony_ci        The glDeletePathsNV command and GetPathMetricRangeNV query use
75645bd8deadSopenharmony_ci        this order.
75655bd8deadSopenharmony_ci
75665bd8deadSopenharmony_ci        glDeleteLists uses this same order.
75675bd8deadSopenharmony_ci
75685bd8deadSopenharmony_ci    66. Where does the UTF-8 and UTF-16 specification language come from?
75695bd8deadSopenharmony_ci
75705bd8deadSopenharmony_ci        See the RFC "UTF-8, a transformation format of ISO 10646":
75715bd8deadSopenharmony_ci
75725bd8deadSopenharmony_ci            http://tools.ietf.org/html/rfc3629
75735bd8deadSopenharmony_ci
75745bd8deadSopenharmony_ci        See the RFC "UTF-16, an encoding of ISO 10646":
75755bd8deadSopenharmony_ci
75765bd8deadSopenharmony_ci            http://tools.ietf.org/html/rfc2781
75775bd8deadSopenharmony_ci
75785bd8deadSopenharmony_ci        The intent of the specification language is to match these RFCs.
75795bd8deadSopenharmony_ci
75805bd8deadSopenharmony_ci    67. How does the GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV cover mode
75815bd8deadSopenharmony_ci        work for glCoverFillPathInstancedNV and glCoverStrokePathInstancedNV?
75825bd8deadSopenharmony_ci
75835bd8deadSopenharmony_ci        RESOLVED:  The command computes the bounding box of all the
75845bd8deadSopenharmony_ci        path's bounding boxes.  (This can be too conservative for an
75855bd8deadSopenharmony_ci        arbitrarily arranged collection of path objects but works well
75865bd8deadSopenharmony_ci        enough for glyphs in line of text.)
75875bd8deadSopenharmony_ci
75885bd8deadSopenharmony_ci        This bounding box has a consistent counterclockwise winding
75895bd8deadSopenharmony_ci        order no matter what path objects are listed.  This property
75905bd8deadSopenharmony_ci        is a combination of how glRectf works and how the parameters to
75915bd8deadSopenharmony_ci        glRectf are computed.
75925bd8deadSopenharmony_ci
75935bd8deadSopenharmony_ci        The object-space z (depth) is always zero.  (This behavior is
75945bd8deadSopenharmony_ci        a consequence of the primitive being emitted by glRectf.) The
75955bd8deadSopenharmony_ci        matrix elements in the Z row (if such a row exists) of the
75965bd8deadSopenharmony_ci        transforms specified for glCoverFillPathInstancedNV and
75975bd8deadSopenharmony_ci        glCoverStrokePathInstancedNV is ignored.
75985bd8deadSopenharmony_ci
75995bd8deadSopenharmony_ci        Programmers are cautioned that this could result in the
76005bd8deadSopenharmony_ci        covering geometry being view-frustum culled if the programmer
76015bd8deadSopenharmony_ci        is not careful when using 3D transformTypes (GL_TRANSLATE_3D_NV,
76025bd8deadSopenharmony_ci        GL_AFFINE_3D_NV, GL_TRANSPOSE_AFFINE_3D_NV).  To guard against
76035bd8deadSopenharmony_ci        this mishap, consider something such as the following:
76045bd8deadSopenharmony_ci
76055bd8deadSopenharmony_ci            glMatrixPushEXT(GL_PROJECTION);
76065bd8deadSopenharmony_ci              glScalef(1,1,0);
76075bd8deadSopenharmony_ci              glCoverFillPathInstancedNV(...);
76085bd8deadSopenharmony_ci            glMatrixPopEXT(GL_PROJECTION);
76095bd8deadSopenharmony_ci
76105bd8deadSopenharmony_ci        This essentially forces the clip-space Z to be zero which will
76115bd8deadSopenharmony_ci        never be clipped by the near or far view-frustum clip planes.
76125bd8deadSopenharmony_ci
76135bd8deadSopenharmony_ci        If depth testing is desired, perform the depth testing during the
76145bd8deadSopenharmony_ci        "stenciling" step so that depth testing is unnecessary during the
76155bd8deadSopenharmony_ci        "covering" step done by the glCoverFillPathInstancedNV command.
76165bd8deadSopenharmony_ci
76175bd8deadSopenharmony_ci    68. What happens when the radius of a circular arc command is
76185bd8deadSopenharmony_ci        negative?
76195bd8deadSopenharmony_ci
76205bd8deadSopenharmony_ci        UNRESOLVED:  The intent is to match the behavior of the PostScript
76215bd8deadSopenharmony_ci        circular arc commands (arc, arcn, arct).  Unfortunately the
76225bd8deadSopenharmony_ci        PostScript specification is not entirely clear about how negative
76235bd8deadSopenharmony_ci        radius is handled.
76245bd8deadSopenharmony_ci
76255bd8deadSopenharmony_ci        Table 5.arcParameterSpecialization has absolute values (abs)
76265bd8deadSopenharmony_ci        computed for the rv and rh columns.
76275bd8deadSopenharmony_ci
76285bd8deadSopenharmony_ci        However, the points A and B (used for arc and arcn) are computed
76295bd8deadSopenharmony_ci        with c[2] directly (without an absolute value).
76305bd8deadSopenharmony_ci
76315bd8deadSopenharmony_ci        This computation looks consistent with Ghostscript's behavior
76325bd8deadSopenharmony_ci        for arct:
76335bd8deadSopenharmony_ci
76345bd8deadSopenharmony_ci            dist = abs(c[4] * num/denom)
76355bd8deadSopenharmony_ci            l0 = dist/sqrt(dot(d0,d0)) * c[4]/abs(c[4])
76365bd8deadSopenharmony_ci            l2 = dist/sqrt(dot(d2,d2)) * c[4]/abs(c[4])
76375bd8deadSopenharmony_ci
76385bd8deadSopenharmony_ci        Could this simply be:
76395bd8deadSopenharmony_ci
76405bd8deadSopenharmony_ci            dist = c[4] * num/denom
76415bd8deadSopenharmony_ci            l0 = dist/sqrt(dot(d0,d0))
76425bd8deadSopenharmony_ci            l2 = dist/sqrt(dot(d2,d2))
76435bd8deadSopenharmony_ci
76445bd8deadSopenharmony_ci       Probably.
76455bd8deadSopenharmony_ci
76465bd8deadSopenharmony_ci       This really needs testing and comparison with a PostScript
76475bd8deadSopenharmony_ci       implementation to make sure the specified equations really match
76485bd8deadSopenharmony_ci       PostScript's implemented behavior.
76495bd8deadSopenharmony_ci
76505bd8deadSopenharmony_ci    69. What happens when the two angles (c[2] and c[3]) for a circular
76515bd8deadSopenharmony_ci        arc command (GL_CIRCULAR_CCW_ARC_TO_NV or
76525bd8deadSopenharmony_ci        GL_CIRCULAR_CW_ARC_TO_NV) create 1 or more full revolutions?
76535bd8deadSopenharmony_ci
76545bd8deadSopenharmony_ci        UNRESOLVED:  The intent is to match the behavior of the PostScript
76555bd8deadSopenharmony_ci        circular arc commands (arc and arcn).
76565bd8deadSopenharmony_ci
76575bd8deadSopenharmony_ci        PostScript specifies that "If angle2 is less than angle1, it is
76585bd8deadSopenharmony_ci        increased by multiples of 360 [degrees] until it becomes greater
76595bd8deadSopenharmony_ci        than or equal to angle1.  No other adjustments are made to the
76605bd8deadSopenharmony_ci        two angles.  In particular, if the difference angle2-angle1
76615bd8deadSopenharmony_ci        exceeds 360 [degrees], the resulting path will trace portions
76625bd8deadSopenharmony_ci        of the circle more than once."
76635bd8deadSopenharmony_ci
76645bd8deadSopenharmony_ci        The current equations based on an end-point partial elliptical arc
76655bd8deadSopenharmony_ci        parameterization achieve this.  Extra parametric behavior would be
76665bd8deadSopenharmony_ci        necessary to trace a circle multiple times.  The current equations
76675bd8deadSopenharmony_ci        in Table 5.pathEquations do not capture this (but should).
76685bd8deadSopenharmony_ci
76695bd8deadSopenharmony_ci        This needs to be thought through carefully to make sure stroking,
76705bd8deadSopenharmony_ci        particularly when dashed, is handled correctly.
76715bd8deadSopenharmony_ci
76725bd8deadSopenharmony_ci    70. PostScript generates a limitcheck error when numbers are
76735bd8deadSopenharmony_ci        encountered that exceed the implementation limit for real numbers.
76745bd8deadSopenharmony_ci        Should the PostScript grammar treat such situations as a parsing
76755bd8deadSopenharmony_ci        error?
76765bd8deadSopenharmony_ci
76775bd8deadSopenharmony_ci        RESOLVED:  No, it's not a parsing error, but the results in
76785bd8deadSopenharmony_ci        such a situation are likely to be undefined.
76795bd8deadSopenharmony_ci
76805bd8deadSopenharmony_ci        This paragraph in Section 5.X.1 ("Path Specification") applies
76815bd8deadSopenharmony_ci        which begins "If a value specified for a coordinate (however
76825bd8deadSopenharmony_ci        the coordinate is specified) or a value computed from these
76835bd8deadSopenharmony_ci        coordinates (as specified in the discussion that follows)
76845bd8deadSopenharmony_ci        exceeds the implementation's maximum representable value for a
76855bd8deadSopenharmony_ci        single-precision floating-point number, ..."
76865bd8deadSopenharmony_ci
76875bd8deadSopenharmony_ci        The PostScript's notion of a limitcheck error doesn't nicely
76885bd8deadSopenharmony_ci        correspond to a parsing error.  And PostScript's notion of "the
76895bd8deadSopenharmony_ci        implementation limit for real numbers" (likely double precision)
76905bd8deadSopenharmony_ci        might not correspond to the GL's notion of floating-point
76915bd8deadSopenharmony_ci        (typically single precision).
76925bd8deadSopenharmony_ci
76935bd8deadSopenharmony_ci        The PostScript notion of a limitcheck on numeric range is
76945bd8deadSopenharmony_ci        particularly hard to enforce with relative commands where the
76955bd8deadSopenharmony_ci        limitcheck might not occur until all the relative offsets are
76965bd8deadSopenharmony_ci        applied, something which isn't really part of parsing.
76975bd8deadSopenharmony_ci
76985bd8deadSopenharmony_ci        What an actual implementation does may vary but a likely
76995bd8deadSopenharmony_ci        implementation approach is generate an IEEE infinity value when
77005bd8deadSopenharmony_ci        single-precision floating-point range is exceeded.  This will
77015bd8deadSopenharmony_ci        generate undefined rendering behavior.
77025bd8deadSopenharmony_ci
77035bd8deadSopenharmony_ci        SVG doesn't offer guidance in its specification when coordinate
77045bd8deadSopenharmony_ci        values exceed the representable range of floating-point.
77055bd8deadSopenharmony_ci        Presumably such range overflows result in implementation-dependent
77065bd8deadSopenharmony_ci        undefined rendering behavior too.
77075bd8deadSopenharmony_ci
77085bd8deadSopenharmony_ci    71. What happens when the radius of a OpenVG-style partial elliptical
77095bd8deadSopenharmony_ci        arc commands is negative?
77105bd8deadSopenharmony_ci
77115bd8deadSopenharmony_ci        RESOLVED:  The absolute value of the radius is used for
77125bd8deadSopenharmony_ci        the OpenVG-style arc commands GL_SMALL_CCW_ARC_TO_NV,
77135bd8deadSopenharmony_ci        GL_RELATIVE_SMALL_CCW_ARC_TO_NV, GL_SMALL_CW_ARC_TO_NV,
77145bd8deadSopenharmony_ci        GL_RELATIVE_SMALL_CW_ARC_TO_NV, GL_LARGE_CCW_ARC_TO_NV,
77155bd8deadSopenharmony_ci        GL_RELATIVE_LARGE_CCW_ARC_TO_NV, GL_LARGE_CW_ARC_TO_NV, and
77165bd8deadSopenharmony_ci        GL_RELATIVE_SMALL_CW_ARC_TO_NV.
77175bd8deadSopenharmony_ci
77185bd8deadSopenharmony_ci        Table 5.arcParameterSpecialization specifies an absolute value
77195bd8deadSopenharmony_ci        (abs) in the rh and rv entries of all these commands.
77205bd8deadSopenharmony_ci
77215bd8deadSopenharmony_ci        The OpenVG specification is clear on this point in section 8.4
77225bd8deadSopenharmony_ci        ("Elliptical Arcs") saying "Negative values of [radii] rh and
77235bd8deadSopenharmony_ci        rv are replaced with their absolute values."
77245bd8deadSopenharmony_ci
77255bd8deadSopenharmony_ci    72. What should happen for a stroked subpath that is zero length?
77265bd8deadSopenharmony_ci
77275bd8deadSopenharmony_ci        UNRESOLVED:  Not sure yet.
77285bd8deadSopenharmony_ci
77295bd8deadSopenharmony_ci        SVG gives this advice:
77305bd8deadSopenharmony_ci
77315bd8deadSopenharmony_ci            http://www.w3.org/TR/SVG11/implnote.html#PathElementImplementationNotes
77325bd8deadSopenharmony_ci
77335bd8deadSopenharmony_ci        Probably need to check what other path renders, particularly
77345bd8deadSopenharmony_ci        PostScript do in this situation.  Requires testing actual
77355bd8deadSopenharmony_ci        implementations because the specifications are not clear.
77365bd8deadSopenharmony_ci
77375bd8deadSopenharmony_ci    73. Why have the GL_PATH_CLIENT_LENGTH_NV path parameter?
77385bd8deadSopenharmony_ci
77395bd8deadSopenharmony_ci        RESOLVED:  This supports SVG's pathLength attribute used to
77405bd8deadSopenharmony_ci        calibrate distance-along-a-path computations.
77415bd8deadSopenharmony_ci
77425bd8deadSopenharmony_ci        This applies to dashing a stroked segment, but does NOT
77435bd8deadSopenharmony_ci        apply to the lengths returned by the glGetPathLengthNV and
77445bd8deadSopenharmony_ci        glPointAlongPathNV queries.
77455bd8deadSopenharmony_ci
77465bd8deadSopenharmony_ci        The client length just applies to dashing because having a
77475bd8deadSopenharmony_ci        client length that is different from the GL's computed length
77485bd8deadSopenharmony_ci        for a path may greatly affect the dashing pattern.  The client
77495bd8deadSopenharmony_ci        knows the path's client length, but the GL doesn't unless the
77505bd8deadSopenharmony_ci        client state is available to the GL when dashing a stroked path.
77515bd8deadSopenharmony_ci
77525bd8deadSopenharmony_ci        It's better to have the client send the client path length
77535bd8deadSopenharmony_ci        unconditionally than require the client to query the GL's computed
77545bd8deadSopenharmony_ci        path length ahead of any sending of a rescaled version of the
77555bd8deadSopenharmony_ci        dash offset or dash array.
77565bd8deadSopenharmony_ci
77575bd8deadSopenharmony_ci        For the queries, presumably the client can perform the necessary
77585bd8deadSopenharmony_ci        scaling by the client length itself if that's desirable.
77595bd8deadSopenharmony_ci
77605bd8deadSopenharmony_ci    74. Should there be a query for GL_PATH_END_CAPS_NV and
77615bd8deadSopenharmony_ci        GL_PATH_DASH_CAPS_NV?
77625bd8deadSopenharmony_ci
77635bd8deadSopenharmony_ci        RESOLVED:  No.  You have to query GL_PATH_INTIAL_END_CAP_NV or
77645bd8deadSopenharmony_ci        GL_PATH_TERMINAL_END_CAP_NV for the each respective end cap; or
77655bd8deadSopenharmony_ci        query GL_PATH_INITIAL_DASH_CAP_NV or GL_PATH_TERMINAL_DASH_CAP_NV
77665bd8deadSopenharmony_ci        for each respective dash cap.
77675bd8deadSopenharmony_ci
77685bd8deadSopenharmony_ci        GL_PATH_END_CAPS_NV and GL_PATH_DASH_CAPS_NV are convenient
77695bd8deadSopenharmony_ci        for most path rendering systems that have identical initial
77705bd8deadSopenharmony_ci        and terminal end and dash caps, but are NOT supported by
77715bd8deadSopenharmony_ci        glGetPathParameteriv or glGetPathParameterfv.
77725bd8deadSopenharmony_ci
77735bd8deadSopenharmony_ci    75. What should the path format tokens for SVG and PostScript tokens
77745bd8deadSopenharmony_ci        be named?
77755bd8deadSopenharmony_ci
77765bd8deadSopenharmony_ci        RESOLVED:  Use the abbreviated names SVG and PS respectively:
77775bd8deadSopenharmony_ci        GL_PATH_FORMAT_SVG_NV and GL_PATH_FORMAT_PS_NV.  These names
77785bd8deadSopenharmony_ci        are shorter and avoid putting an Adobe trademark in a token name.
77795bd8deadSopenharmony_ci
77805bd8deadSopenharmony_ci        Future extensions might want to add version numbers to these
77815bd8deadSopenharmony_ci        abbreviated names (another reason to stick with short abbreviated
77825bd8deadSopenharmony_ci        names).
77835bd8deadSopenharmony_ci
77845bd8deadSopenharmony_ci    76. In what content (GL client or GL server) are font file names
77855bd8deadSopenharmony_ci        and system font names interpreted?
77865bd8deadSopenharmony_ci
77875bd8deadSopenharmony_ci        RESOLVED:  The GL_STANDARD_FONT_NAME_NV and GL_SYSTEM_FONT_NAME_NV
77885bd8deadSopenharmony_ci        font targets map their respective font names to a font within
77895bd8deadSopenharmony_ci        the GL server.  The GL_FILE_NAME_NV font target does the file
77905bd8deadSopenharmony_ci        reading in the GL client; for GLX, there needs to be GLX protocol
77915bd8deadSopenharmony_ci        to transfer glyphs including their kerning and metric data to
77925bd8deadSopenharmony_ci        the GL server.
77935bd8deadSopenharmony_ci
77945bd8deadSopenharmony_ci    77. How can the glPathSubCommandsNV command be used to append to
77955bd8deadSopenharmony_ci        the end of an existing path object?
77965bd8deadSopenharmony_ci
77975bd8deadSopenharmony_ci        RESOLVED:  If you set the /commandStart/ parameter to
77985bd8deadSopenharmony_ci        glPathSubCommandsNV to be sufficiently large (greater or equal
77995bd8deadSopenharmony_ci        to the number of path commands in the path object suffices),
78005bd8deadSopenharmony_ci        that works to append commands.
78015bd8deadSopenharmony_ci
78025bd8deadSopenharmony_ci    78. Does depth offset (a.k.a. polygon offset) work when using the
78035bd8deadSopenharmony_ci        "stencil" and "cover" path operations?
78045bd8deadSopenharmony_ci
78055bd8deadSopenharmony_ci        RESOLVED:  Yes with caveats.
78065bd8deadSopenharmony_ci
78075bd8deadSopenharmony_ci        The "stencil" path operations use the
78085bd8deadSopenharmony_ci        GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV and
78095bd8deadSopenharmony_ci        GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV state set by
78105bd8deadSopenharmony_ci        glPathStencilDepthOffsetNV.  There is no specific enable; instead
78115bd8deadSopenharmony_ci        set the scale and units to zero if no depth offset is desired.
78125bd8deadSopenharmony_ci
78135bd8deadSopenharmony_ci        The "cover" path operations use the polygon depth offset state if
78145bd8deadSopenharmony_ci        the GL_POLYGON_OFFSET_FILL enable is enabled, using the polygon
78155bd8deadSopenharmony_ci        offset factor and units specified for glPolygonOffset.  This is
78165bd8deadSopenharmony_ci        because the "cover" operation (unlike the stencil operation)
78175bd8deadSopenharmony_ci        does rasterize a polygon primitive.
78185bd8deadSopenharmony_ci
78195bd8deadSopenharmony_ci        Depth offset is useful when a path rendered decal is applied
78205bd8deadSopenharmony_ci        on depth tested 3D geometry and the path rendered geometry has
78215bd8deadSopenharmony_ci        to be biased forward (negative bias) by polygon offset to avoid
78225bd8deadSopenharmony_ci        depth ambiguities.  See issue #120 for details.
78235bd8deadSopenharmony_ci
78245bd8deadSopenharmony_ci        This is also useful when putting path rendered primitives into
78255bd8deadSopenharmony_ci        shadow maps with a positive depth bias to avoid shadow acne
78265bd8deadSopenharmony_ci        issues.
78275bd8deadSopenharmony_ci
78285bd8deadSopenharmony_ci        There is NOT a guarantee that the depth offset computed for a
78295bd8deadSopenharmony_ci        "stencil" operation will exactly match the depth offset for a
78305bd8deadSopenharmony_ci        "cover" operation given identical path object and transformations.
78315bd8deadSopenharmony_ci        The two offsets will be close but not generally exact for all
78325bd8deadSopenharmony_ci        generated samples.
78335bd8deadSopenharmony_ci
78345bd8deadSopenharmony_ci    79. Can fragment shaders access the facingness state during a cover
78355bd8deadSopenharmony_ci        operation?
78365bd8deadSopenharmony_ci
78375bd8deadSopenharmony_ci        RESOLVED:  Yes, the gl_FrontFacing special variable in GLSL
78385bd8deadSopenharmony_ci        is available.  So is the fragment.facing fragment attribute
78395bd8deadSopenharmony_ci        binding in NV_fragment_program2 and subsequent NVIDIA shader
78405bd8deadSopenharmony_ci        assembly extensions.
78415bd8deadSopenharmony_ci
78425bd8deadSopenharmony_ci        In cases where the path rendered primitive is "very edge" on the
78435bd8deadSopenharmony_ci        facingness fragment state may be ambiguous in extreme situations.
78445bd8deadSopenharmony_ci
78455bd8deadSopenharmony_ci    80. When are various computed path parameters re-computed?
78465bd8deadSopenharmony_ci
78475bd8deadSopenharmony_ci        RESOLVED:  If the computed parameter parameters
78485bd8deadSopenharmony_ci        (PATH_COMMAND_COUNT_NV, PATH_COORD_COUNT_NV,
78495bd8deadSopenharmony_ci        PATH_DASH_ARRAY_COUNT_NV, PATH_COMPUTED_LENGTH_NV,
78505bd8deadSopenharmony_ci        PATH_OBJECT_BOUNDING_BOX_NV, PATH_FILL_BOUNDING_BOX_NV, and
78515bd8deadSopenharmony_ci        PATH_STROKE_BOUNDING_BOX_NV) are queried, the values returned
78525bd8deadSopenharmony_ci        always reflect the most up-to-date state of the path object.
78535bd8deadSopenharmony_ci
78545bd8deadSopenharmony_ci        This also includes when path object parameters are used in
78555bd8deadSopenharmony_ci        contexts such as instanced "cover" operations.
78565bd8deadSopenharmony_ci
78575bd8deadSopenharmony_ci    81. Should projective 2D path coordinates be supported?
78585bd8deadSopenharmony_ci
78595bd8deadSopenharmony_ci        RESOLVED:  No.  Major path rendering standards don't support
78605bd8deadSopenharmony_ci        projective 2D path coordinates.
78615bd8deadSopenharmony_ci
78625bd8deadSopenharmony_ci        Moreover, projective 2D path coordinates create technical
78635bd8deadSopenharmony_ci        problems because the projective transformation of projective
78645bd8deadSopenharmony_ci        2D path coordinates for cubic Bezier curves do not necessarily
78655bd8deadSopenharmony_ci        retain their topology (serpentine, cusp, or loop).
78665bd8deadSopenharmony_ci
78675bd8deadSopenharmony_ci    82. Should a non-dashed stroked path's coverage be the same
78685bd8deadSopenharmony_ci        independent of how its control points are specified?
78695bd8deadSopenharmony_ci
78705bd8deadSopenharmony_ci        RESOLVED:  Yes, this is a symmetry rule mandated by the OpenXML
78715bd8deadSopenharmony_ci        Paper Specification.  This applies to lines and Bezier curves.
78725bd8deadSopenharmony_ci
78735bd8deadSopenharmony_ci        So a cubic Bezier curve defined by control points cp0, cp1, cp2,
78745bd8deadSopenharmony_ci        and cp3 should generate the same stroked coverage (assuming the
78755bd8deadSopenharmony_ci        same stroke parameters and requiring the dash array count to be
78765bd8deadSopenharmony_ci        zero) as a cubic Bezier curve with control points cp3, cp2, cp1,
78775bd8deadSopenharmony_ci        and cp0 (so the reversed control point order).
78785bd8deadSopenharmony_ci
78795bd8deadSopenharmony_ci        XXX Unresolved if it applies to arcs.
78805bd8deadSopenharmony_ci
78815bd8deadSopenharmony_ci    83. Should character aliases used to specify path commands be returned
78825bd8deadSopenharmony_ci        as their character alias values or remapped to the actual token
78835bd8deadSopenharmony_ci        name of the command?
78845bd8deadSopenharmony_ci
78855bd8deadSopenharmony_ci        RESOLVED:  Remapped.  Any path commands specified with a
78865bd8deadSopenharmony_ci        character alias value (from Table 5.pathCommands) is returned
78875bd8deadSopenharmony_ci        as the command's token value instead.
78885bd8deadSopenharmony_ci
78895bd8deadSopenharmony_ci        This avoids applications calling glGetPathCommandsNV from having
78905bd8deadSopenharmony_ci        bugs where they handle token names but not character aliases.
78915bd8deadSopenharmony_ci
78925bd8deadSopenharmony_ci        This also makes it simpler to say "identical" when saying command
78935bd8deadSopenharmony_ci        sequences must match for glWeightPathsNV.  Character aliases
78945bd8deadSopenharmony_ci        remapped to command token values makes it unambiguous that
78955bd8deadSopenharmony_ci        GL_LINE_TO and 'L" are the identical command.
78965bd8deadSopenharmony_ci
78975bd8deadSopenharmony_ci    84. Is there a way to use this extension to trade-off rendering performance
78985bd8deadSopenharmony_ci        for more effective samples per pixel to improve coverage quality?
78995bd8deadSopenharmony_ci
79005bd8deadSopenharmony_ci        RESOLVED:  Yes.
79015bd8deadSopenharmony_ci
79025bd8deadSopenharmony_ci        This code demonstrates how multiple passes could accumulate
79035bd8deadSopenharmony_ci        coverage information in the alpha channel of the framebuffer and
79045bd8deadSopenharmony_ci        then a final cover pass could blend the incoming color with the
79055bd8deadSopenharmony_ci        accumulated coverage from the framebuffer's alpha channel.
79065bd8deadSopenharmony_ci
79075bd8deadSopenharmony_ci            // INITIALIZATION
79085bd8deadSopenharmony_ci            // assume stencil is cleared to zero and framebuffer alpha is clear to zero
79095bd8deadSopenharmony_ci            const int coveragePassesToAccumulate = 4;
79105bd8deadSopenharmony_ci            glEnable(GL_STENCIL_TEST);
79115bd8deadSopenharmony_ci            glStencilFunc(GL_NOT_EQUAL, 0x80, 0x7F);
79125bd8deadSopenharmony_ci            glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);  // tricky: zero 0x7F mask stencil on covers, but set 0x80
79135bd8deadSopenharmony_ci            glColorMask(0,0,0,1);  // just update alpha
79145bd8deadSopenharmony_ci
79155bd8deadSopenharmony_ci            // M STENCIL+COVER PASSES to accumulate jittered path coverage into framebuffer's alpha channel
79165bd8deadSopenharmony_ci            glStencilFillPathNV(path, GL_COUNT_UP_NV, 0x7F);
79175bd8deadSopenharmony_ci            glCoverFillPathNV(path, GL_PATH_FILL_COVER_MODE_NV);
79185bd8deadSopenharmony_ci            glEnable(GL_BLEND);
79195bd8deadSopenharmony_ci            glBlendFunc(GL_ONE, GL_ONE); // sum up alpha
79205bd8deadSopenharmony_ci            glColor4f(0,0,0, 1.0/coveragePassesToAccumulate );
79215bd8deadSopenharmony_ci            static const GLfloat jitters[4][2] = {
79225bd8deadSopenharmony_ci              {0,0},  /* various small subpixel jitter X & Y values */
79235bd8deadSopenharmony_ci            };
79245bd8deadSopenharmony_ci            for (i=1; i<coveragePassesToAccumulate ; i++) {
79255bd8deadSopenharmony_ci              glMatrixPushEXT(GL_MODELVIEW); {
79265bd8deadSopenharmony_ci                glMatrixTranslatef(GL_MODELVIEW, jitters[i][0], jitters[i][1], 0);
79275bd8deadSopenharmony_ci                glStencilFillPathNV(path, GL_COUNT_UP_NV, 0x7F);
79285bd8deadSopenharmony_ci                glCoverFillPathNV(path, GL_PATH_FILL_COVER_MODE_NV);
79295bd8deadSopenharmony_ci              } glMatrixPopEXT(GL_MODELVIEW);
79305bd8deadSopenharmony_ci            }
79315bd8deadSopenharmony_ci
79325bd8deadSopenharmony_ci            // FINAL COVER PASS uses accumulated coverage stashed in destination alpha
79335bd8deadSopenharmony_ci            glColorMask(1,1,1,1);
79345bd8deadSopenharmony_ci            // modulate RGB with destination alpha and then zero destination alpha
79355bd8deadSopenharmony_ci            glBlendFuncSeparate(GL_DST_ALPHA, GL_ZERO, GL_ZERO, GL_ZERO);
79365bd8deadSopenharmony_ci            glColor4f(red, green, blue, dontcare);  // some color
79375bd8deadSopenharmony_ci            glStencilFunc(GL_EQUAL, 0x80, 0xFF);  // update any sample touched in earlier passes
79385bd8deadSopenharmony_ci            glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);  // now set stencil back to zero (clearing 0x80)
79395bd8deadSopenharmony_ci            glCoverFillPathInstancedNV(coveragePassesToAccumulate,
79405bd8deadSopenharmony_ci                GL_UNSIGNED_BYTE, "\0\0\0\0",  // tricky: draw path objects path+0,path+0,path+0,path+0
79415bd8deadSopenharmony_ci                path,  // this is that path object that is added to zero four times
79425bd8deadSopenharmony_ci                GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV, GL_TRANSLATE_2D_NV, jitters);
79435bd8deadSopenharmony_ci
79445bd8deadSopenharmony_ci        Assuming N passes and M samples per pixel, this approach
79455bd8deadSopenharmony_ci        accumulates coverage for N*M+1 grayscale levels doing N stencil
79465bd8deadSopenharmony_ci        operations and N+1 cover operations.
79475bd8deadSopenharmony_ci
79485bd8deadSopenharmony_ci    85. Why do the commands glGenPathsNV and glDeletePathsNV allocate
79495bd8deadSopenharmony_ci        contiguous ranges of path objects instead of returning an array of
79505bd8deadSopenharmony_ci        (possibly scattered) names and deleting an array of names?
79515bd8deadSopenharmony_ci
79525bd8deadSopenharmony_ci        RESOLVED:  The expectation that path objects will be arranged
79535bd8deadSopenharmony_ci        as characters mapping to glyphs warrants adopting the object
79545bd8deadSopenharmony_ci        model of display lists.
79555bd8deadSopenharmony_ci
79565bd8deadSopenharmony_ci        glPathGlyphRangeNV, the instanced commands, and the metric and
79575bd8deadSopenharmony_ci        kerning queries all rely on this assumption.
79585bd8deadSopenharmony_ci
79595bd8deadSopenharmony_ci    86. What do the stencil and cover commands do if the specified path
79605bd8deadSopenharmony_ci        name does not refer to an existing path object?
79615bd8deadSopenharmony_ci
79625bd8deadSopenharmony_ci        RESOLVED:  Do nothing (and generate no error).
79635bd8deadSopenharmony_ci
79645bd8deadSopenharmony_ci        This is useful to avoid rendering unpopulated path objects.
79655bd8deadSopenharmony_ci
79665bd8deadSopenharmony_ci        This "do nothing" behavior also applies to the instanced
79675bd8deadSopenharmony_ci        stencil and cover routines that are expressed in terms of
79685bd8deadSopenharmony_ci        glStencilFillPathNV, glStencilStrokePathNV, glCoverFillPathNV,
79695bd8deadSopenharmony_ci        and glCoverStrokePathNV.
79705bd8deadSopenharmony_ci
79715bd8deadSopenharmony_ci        Applications that want some "glyph is missing" for non-existent
79725bd8deadSopenharmony_ci        path objects can use glCopyPathNV to copy some existing path
79735bd8deadSopenharmony_ci        object's "glyph is missing" outline to non-existent paths.
79745bd8deadSopenharmony_ci        Alternatively, glPathGlyphRangeNV (or glPathGlyphsNV) can be used
79755bd8deadSopenharmony_ci        with the GL_STANDARD_FONT_NAME of "Missing" to populate a range
79765bd8deadSopenharmony_ci        (or sequence) of path objects with a standard missing glyph
79775bd8deadSopenharmony_ci        (typically a rectangle).  (See issue #89.)
79785bd8deadSopenharmony_ci
79795bd8deadSopenharmony_ci        Queries (glGetPathParameteriv, etc.) allowing only a single path
79805bd8deadSopenharmony_ci        object to be specified, generate a GL_INVALID_OPERATION error
79815bd8deadSopenharmony_ci        if the path name does not exist.
79825bd8deadSopenharmony_ci
79835bd8deadSopenharmony_ci        glWeightPaths, glInterpolatePathsNV, and glCopyPathNV generate
79845bd8deadSopenharmony_ci        a GL_INVALID_OPERATION error if any of the named source paths
79855bd8deadSopenharmony_ci        do not exist.
79865bd8deadSopenharmony_ci
79875bd8deadSopenharmony_ci        Path commands that modify the commands, coordinates, or parameters
79885bd8deadSopenharmony_ci        of existing path objects (as opposed to specifying a path object
79895bd8deadSopenharmony_ci        completely) generate a GL_INVALID_OPERATION error if the path
79905bd8deadSopenharmony_ci        name does not exist.
79915bd8deadSopenharmony_ci
79925bd8deadSopenharmony_ci    87. What of this extension's per-context state should apply to
79935bd8deadSopenharmony_ci        glPushAttrib and glPopAttrib?
79945bd8deadSopenharmony_ci
79955bd8deadSopenharmony_ci        RESOLVED:  Apply the existing conventions; see new table 6.X,
79965bd8deadSopenharmony_ci        "Path (state per context)".
79975bd8deadSopenharmony_ci
79985bd8deadSopenharmony_ci        The path fog generation mode applies to GL_FOG_BIT.
79995bd8deadSopenharmony_ci
80005bd8deadSopenharmony_ci        The path color generation mode and coefficients apply to
80015bd8deadSopenharmony_ci        GL_LIGHTING_BIT.
80025bd8deadSopenharmony_ci
80035bd8deadSopenharmony_ci        The path texture coordinate set generation modes and coefficients
80045bd8deadSopenharmony_ci        apply to GL_TEXTURE_BIT.
80055bd8deadSopenharmony_ci
80065bd8deadSopenharmony_ci        The path error position is not pushed or popped, following the
80075bd8deadSopenharmony_ci        convention of the ARB_vertex_program extension.
80085bd8deadSopenharmony_ci
80095bd8deadSopenharmony_ci    88. How should the numCoords parameter to the various path
80105bd8deadSopenharmony_ci        specification commands work?
80115bd8deadSopenharmony_ci
80125bd8deadSopenharmony_ci        RESOLVED:  When there is also a /numCoords/ parameter,
80135bd8deadSopenharmony_ci        the GL_INVALID_OPERATION error is generated if the number of
80145bd8deadSopenharmony_ci        coordinates is not equal to the number of coordinates needed by
80155bd8deadSopenharmony_ci        the command's specified path command sequence.  This provides
80165bd8deadSopenharmony_ci        a sanity check.
80175bd8deadSopenharmony_ci
80185bd8deadSopenharmony_ci        For the glPathSubCoordsNV command, there's no requirement that
80195bd8deadSopenharmony_ci        the range of coordinates "match up" with path command boundaries
80205bd8deadSopenharmony_ci        for coordinates.
80215bd8deadSopenharmony_ci
80225bd8deadSopenharmony_ci        Some consideration was given to specifically treating a value of
80235bd8deadSopenharmony_ci        zero for /numCoords/ by allowing the number of coordinates to
80245bd8deadSopenharmony_ci        be based on the command's corresponding path command sequence.
80255bd8deadSopenharmony_ci        This would allow an application to bypass the sanity check if
80265bd8deadSopenharmony_ci        the application didn't exactly know how many coordinates a path
80275bd8deadSopenharmony_ci        command sequence required.  This was rejected because it is likely
80285bd8deadSopenharmony_ci        error-prone and it means when such commands are compiled into
80295bd8deadSopenharmony_ci        a display list or packed into GLX protocol, the path command
80305bd8deadSopenharmony_ci        sequence would then have the be scanned.  This would make the
80315bd8deadSopenharmony_ci        GL client unnecessarily knowledgeable about the supported path
80325bd8deadSopenharmony_ci        commands.  So for both "safety" and implementation reasons,
80335bd8deadSopenharmony_ci        the /numCoords/ value of zero is not specially interpreted;
80345bd8deadSopenharmony_ci        it means that the path command sequence really is expected to
80355bd8deadSopenharmony_ci        require zero coordinates (not generally the case except for the
80365bd8deadSopenharmony_ci        GL_CLOSE_PATH_NV command).
80375bd8deadSopenharmony_ci
80385bd8deadSopenharmony_ci    89. How can an application guarantee that every glyph in a range
80395bd8deadSopenharmony_ci        of Unicode character codes has /some/ default outline defined?
80405bd8deadSopenharmony_ci
80415bd8deadSopenharmony_ci        RESOLVED:  The "Missing" name with the GL_STANDARD_FONT_NAME_NV
80425bd8deadSopenharmony_ci        target populates the entire sequence or range of path objects
80435bd8deadSopenharmony_ci        with a default outlines.
80445bd8deadSopenharmony_ci
80455bd8deadSopenharmony_ci        Example:
80465bd8deadSopenharmony_ci
80475bd8deadSopenharmony_ci          const int allOfUnicode = 1<<21;  // Entire 21-bit Unicode range!
80485bd8deadSopenharmony_ci          const GLfloat emScale = 2048;
80495bd8deadSopenharmony_ci          GLuint glyphBase = glGenPathsNV(allOfUnicode);
80505bd8deadSopenharmony_ci          glPathGlyphRangeNV(glyphBase,
80515bd8deadSopenharmony_ci                             GL_STANDARD_FONT_NAME_NV, "Missing", GL_NONE,
80525bd8deadSopenharmony_ci                             0, allOfUnicode, emScale);
80535bd8deadSopenharmony_ci
80545bd8deadSopenharmony_ci    90. Does the "Missing" font name used for GL_STANDARD_FONT_NAME_NV
80555bd8deadSopenharmony_ci        skip or avoid character codes that Unicode designates as white
80565bd8deadSopenharmony_ci        space, line terminators, etc.
80575bd8deadSopenharmony_ci
80585bd8deadSopenharmony_ci        RESOLVED:  The "Missing" font name populates these with a path
80595bd8deadSopenharmony_ci        object with the missing outline (a box) and corresponding metrics
80605bd8deadSopenharmony_ci        for such spacing characters and all other characters.
80615bd8deadSopenharmony_ci
80625bd8deadSopenharmony_ci        The assumption is that Unicode fonts will populate various
80635bd8deadSopenharmony_ci        blank space, line and paragraph terminators, and other blank
80645bd8deadSopenharmony_ci        or ignorable character points with appropriate null outlines
80655bd8deadSopenharmony_ci        and zero-width metrics.  Because glPathGlyphRangeNV and
80665bd8deadSopenharmony_ci        glPathGlyphsNV don't re-specify existing path objects, these
80675bd8deadSopenharmony_ci        will be left along if the "Missing" standard font is the last
80685bd8deadSopenharmony_ci        font used to specify a given range of path objects.  All white
80695bd8deadSopenharmony_ci        space and separator character codes less than 256 (the Latin-1)
80705bd8deadSopenharmony_ci        range will be populated by the "Serif", "Sans", and "Mono"
80715bd8deadSopenharmony_ci        standard fonts if specified because these guarantee the Latin-1
80725bd8deadSopenharmony_ci        range is populated.  These are specifically U+0009..000D, U+0020,
80735bd8deadSopenharmony_ci        U+0085, 0x00A0 but also other blank or ignorable character points
80745bd8deadSopenharmony_ci        such as control characters.
80755bd8deadSopenharmony_ci
80765bd8deadSopenharmony_ci        For more information:
80775bd8deadSopenharmony_ci
80785bd8deadSopenharmony_ci            http://unicode.org/faq/unsup_char.html
80795bd8deadSopenharmony_ci
80805bd8deadSopenharmony_ci    91. What is the /emScale/ parameter to glPathGlyphRangeNV and
80815bd8deadSopenharmony_ci        glPathGlyphsNV for and how should it be used?
80825bd8deadSopenharmony_ci
80835bd8deadSopenharmony_ci        RESOLVED:  /emScale/ exists to ensure multiple fonts, potentially
80845bd8deadSopenharmony_ci        with distinct font unit scales, can be scaled to a consistent
80855bd8deadSopenharmony_ci        scale.
80865bd8deadSopenharmony_ci
80875bd8deadSopenharmony_ci        Typically TrueType fonts are authored for 2048 font units per
80885bd8deadSopenharmony_ci        Em while Type1 fonts have been historically authored to 1000
80895bd8deadSopenharmony_ci        font units per Em.
80905bd8deadSopenharmony_ci
80915bd8deadSopenharmony_ci        Typically a good value for /emScale/ is 2048 to match the
80925bd8deadSopenharmony_ci        convention of TrueType.  This avoid TrueType font metrics from
80935bd8deadSopenharmony_ci        being rescaled.
80945bd8deadSopenharmony_ci
80955bd8deadSopenharmony_ci        Setting /emScale/ to zero allows the native font units per Em
80965bd8deadSopenharmony_ci        to be used.  Be careful because outlines of path objects for
80975bd8deadSopenharmony_ci        glyphs from fonts with different font units per Em will have
80985bd8deadSopenharmony_ci        different scales.
80995bd8deadSopenharmony_ci
81005bd8deadSopenharmony_ci    92. Should glWeightPathsNV work for a single path object?
81015bd8deadSopenharmony_ci
81025bd8deadSopenharmony_ci        RESOLVED:  No, two or more paths are required to generate a
81035bd8deadSopenharmony_ci        weighted path.
81045bd8deadSopenharmony_ci
81055bd8deadSopenharmony_ci        Use glCopyPathNV if copying a single path object is desired.
81065bd8deadSopenharmony_ci
81075bd8deadSopenharmony_ci        glCopyPathNV copies glyph metrics and kerning information and
81085bd8deadSopenharmony_ci        allows arc commands while glWeightPathsNV does not.
81095bd8deadSopenharmony_ci
81105bd8deadSopenharmony_ci        While glInterpolatePathsNV can be expressed in terms of
81115bd8deadSopenharmony_ci        glWeightPathsNV, glCopyPathNV cannot.
81125bd8deadSopenharmony_ci
81135bd8deadSopenharmony_ci    94. What should the initial join style of a path object be?
81145bd8deadSopenharmony_ci
81155bd8deadSopenharmony_ci        RESOLVED:  GL_MITER_REVERT_NV.  This is consistent with the join
81165bd8deadSopenharmony_ci        style used by SVG, PostScript, PDF, and Cairo.
81175bd8deadSopenharmony_ci
81185bd8deadSopenharmony_ci        Note that Flash, XPS, and Qt use GL_MITER_TRUNCATE_NV instead.
81195bd8deadSopenharmony_ci
81205bd8deadSopenharmony_ci        Arguably GL_MITER_TRUNCATE_NV is a "nicer" join style because
81215bd8deadSopenharmony_ci        the miter does not "pop" from miter to bevel when the miter limit
81225bd8deadSopenharmony_ci        is exceeded; instead when the miter limit is approached and then
81235bd8deadSopenharmony_ci        exceeded, the miter stops growing further and simply loses its
81245bd8deadSopenharmony_ci        sharp tip.
81255bd8deadSopenharmony_ci
81265bd8deadSopenharmony_ci    95. What type of triangle should the GL_TRIANGULAR cap be?
81275bd8deadSopenharmony_ci
81285bd8deadSopenharmony_ci        RESOLVED:  A right triangle.
81295bd8deadSopenharmony_ci
81305bd8deadSopenharmony_ci        This is consistent with the XPS specification.  Other standards
81315bd8deadSopenharmony_ci        don't support triangular caps.
81325bd8deadSopenharmony_ci
81335bd8deadSopenharmony_ci    96. Can NV_path_rendering be implemented without *any* dependencies
81345bd8deadSopenharmony_ci        on system specific fonts?
81355bd8deadSopenharmony_ci
81365bd8deadSopenharmony_ci        RESOLVED:  YES.
81375bd8deadSopenharmony_ci
81385bd8deadSopenharmony_ci        Say a platform had poor or unstable interfaces for accessing
81395bd8deadSopenharmony_ci        system specific fonts (e.g. Linux).  In the case of Linux,
81405bd8deadSopenharmony_ci        resolution-independent fonts are typically accessed through a
81415bd8deadSopenharmony_ci        combination of freetype2 and fontconfig.
81425bd8deadSopenharmony_ci
81435bd8deadSopenharmony_ci        One or both of these standards may be missing from the platform
81445bd8deadSopenharmony_ci        or be unreliable or misconfigured.
81455bd8deadSopenharmony_ci
81465bd8deadSopenharmony_ci        In such a case, NV_path_rendering could be implemented so
81475bd8deadSopenharmony_ci        that the GL_SYSTEM_FONT_NAME_NV usage for glPathGlyphsNV and
81485bd8deadSopenharmony_ci        glPathGlyphRangeNV would never populate path object names with
81495bd8deadSopenharmony_ci        glyphs.
81505bd8deadSopenharmony_ci
81515bd8deadSopenharmony_ci        However the GL_STANDARD_FONT_NAME_NV usage would still be
81525bd8deadSopenharmony_ci        guaranteed.  The GL_STANDARD_FONT_NAME_NV usage by providing
81535bd8deadSopenharmony_ci        the required set of pre-compiled font outlines built-in into the
81545bd8deadSopenharmony_ci        driver directly (using IP unencumbered font outlines such as
81555bd8deadSopenharmony_ci        the DejaVu fonts).
81565bd8deadSopenharmony_ci
81575bd8deadSopenharmony_ci        This design means that applications that use the approach
81585bd8deadSopenharmony_ci        (copied from the Overview) will work:
81595bd8deadSopenharmony_ci
81605bd8deadSopenharmony_ci            glPathGlyphRangeNV(glyphBase,
81615bd8deadSopenharmony_ci                               GL_SYSTEM_FONT_NAME_NV, "Helvetica", GL_BOLD_BIT_NV,
81625bd8deadSopenharmony_ci                               0, numChars, emScale);
81635bd8deadSopenharmony_ci            glPathGlyphRangeNV(glyphBase,
81645bd8deadSopenharmony_ci                               GL_SYSTEM_FONT_NAME_NV, "Arial", GL_BOLD_BIT_NV,
81655bd8deadSopenharmony_ci                               0, numChars, emScale);
81665bd8deadSopenharmony_ci            glPathGlyphRangeNV(glyphBase,
81675bd8deadSopenharmony_ci                               GL_STANDARD_FONT_NAME_NV, "Sans", GL_BOLD_BIT_NV,
81685bd8deadSopenharmony_ci                               0, numChars, emScale);
81695bd8deadSopenharmony_ci
81705bd8deadSopenharmony_ci        In this case, the two initial glPathGlyphRangeNV calls
81715bd8deadSopenharmony_ci        will fail to populate the range of path objects from
81725bd8deadSopenharmony_ci        [glyphBase,glyphBase+numChars-1] but the third call will populate
81735bd8deadSopenharmony_ci        the range.
81745bd8deadSopenharmony_ci
81755bd8deadSopenharmony_ci        This allows NV_path_rendering to be implemented with ZERO
81765bd8deadSopenharmony_ci        dependencies on the system to provide glyphs from system fonts while
81775bd8deadSopenharmony_ci        applications can still utilize fonts in their path rendering.
81785bd8deadSopenharmony_ci
81795bd8deadSopenharmony_ci        While this is an allowed implementation approach, actual
81805bd8deadSopenharmony_ci        implementations should make reasonable efforts to provide access
81815bd8deadSopenharmony_ci        to system fonts if possible.
81825bd8deadSopenharmony_ci
81835bd8deadSopenharmony_ci    96. What is GL_DASH_OFFSET_RESET_NV for?
81845bd8deadSopenharmony_ci
81855bd8deadSopenharmony_ci        RESOLVED:  OpenVG supports the concept of a "dash phase reset"
81865bd8deadSopenharmony_ci        (see VG_DASH_PHASE_RESET) that controls whether or not the dash
81875bd8deadSopenharmony_ci        pattern (with its offset) resets at "move to" command boundaries
81885bd8deadSopenharmony_ci        within a path's command sequence.
81895bd8deadSopenharmony_ci
81905bd8deadSopenharmony_ci        Rather than use a boolean value (as OpenVG does), the
81915bd8deadSopenharmony_ci        GL_DASH_OFFSET_RESET_NV path parameter takes an enumeration
81925bd8deadSopenharmony_ci        consisting of GL_MOVE_TO_RESETS_NV and GL_MOVE_TO_CONTINUES_NV
81935bd8deadSopenharmony_ci        to be more explicit about how the dash offset reset parameter
81945bd8deadSopenharmony_ci        affects the dash pattern.
81955bd8deadSopenharmony_ci
81965bd8deadSopenharmony_ci        Technically, what this specification calls the "dash offset"
81975bd8deadSopenharmony_ci        is what OpenVG calls its "dash phase".  This specification
81985bd8deadSopenharmony_ci        uses "dash phase" to mean what OpenVG calls "dash phase reset"
81995bd8deadSopenharmony_ci        because the word "reset" is built into the GL token values.
82005bd8deadSopenharmony_ci
82015bd8deadSopenharmony_ci        When there is a dash phase reset, the dash offset is set to the
82025bd8deadSopenharmony_ci        value of the path's GL_DASH_OFFSET_NV parameter (consistent with
82035bd8deadSopenharmony_ci        OpenVG).
82045bd8deadSopenharmony_ci
82055bd8deadSopenharmony_ci    97. What APIs say "dash offset" and what APIs say "dash phase" and
82065bd8deadSopenharmony_ci        why does this extension use "dash offset"?
82075bd8deadSopenharmony_ci
82085bd8deadSopenharmony_ci        RESOLVED:  PostScript, PDF, Cairo, Qt, XPS, SVG, and Silverlight
82095bd8deadSopenharmony_ci        use the "dash offset" for the offset to the dash pattern, same
82105bd8deadSopenharmony_ci        as this extension.
82115bd8deadSopenharmony_ci
82125bd8deadSopenharmony_ci        OpenVG, Quartz 2D, Java 2D, Illustrator, and Skia use the term
82135bd8deadSopenharmony_ci        "dash phase" for the identical functionality.
82145bd8deadSopenharmony_ci
82155bd8deadSopenharmony_ci        OFFSET makes more sense in the OpenGL context because lots of
82165bd8deadSopenharmony_ci        OpenGL tokens already use OFFSET in their token names.  Core
82175bd8deadSopenharmony_ci        OpenGL 4.0 has 16 such tokens already.
82185bd8deadSopenharmony_ci
82195bd8deadSopenharmony_ci    98. What is the motivation for glTransformPathNV?
82205bd8deadSopenharmony_ci
82215bd8deadSopenharmony_ci        RESOLVED:  Sometimes a path should be stroked with a stroke width
82225bd8deadSopenharmony_ci        that is constant in a particular space (such as window space).
82235bd8deadSopenharmony_ci
82245bd8deadSopenharmony_ci        Once example of this is SVG 1.2 Tiny's "non-scaling stroke"
82255bd8deadSopenharmony_ci        property.  The stroke width is supposed to be maintained after
82265bd8deadSopenharmony_ci        transformation into pixel space.
82275bd8deadSopenharmony_ci
82285bd8deadSopenharmony_ci        This could be implemented with this extension by transforming
82295bd8deadSopenharmony_ci        the path object into the appropriate space so that the user-space
82305bd8deadSopenharmony_ci        stroke width will match the transformed space.
82315bd8deadSopenharmony_ci
82325bd8deadSopenharmony_ci    99. Should the specification say more about how arcs are transformed?
82335bd8deadSopenharmony_ci
82345bd8deadSopenharmony_ci        UNRESOLVED:  Certainly yes, but I'm not sure exactly how to
82355bd8deadSopenharmony_ci        specify how arcs are transformed with a suitable level of
82365bd8deadSopenharmony_ci        formalism.
82375bd8deadSopenharmony_ci
82385bd8deadSopenharmony_ci        I'm not clear if partial elliptical arcs can be subjected to
82395bd8deadSopenharmony_ci        projective transformations and remain partial elliptical arcs.
82405bd8deadSopenharmony_ci        I believe they can.
82415bd8deadSopenharmony_ci
82425bd8deadSopenharmony_ci   100. How is glTransformPathNV different from OpenVG's vgTransformPath?
82435bd8deadSopenharmony_ci
82445bd8deadSopenharmony_ci        RESOLVED:  The two commands are similar.
82455bd8deadSopenharmony_ci
82465bd8deadSopenharmony_ci        The OpenVG 1.1 version always converts vertical and
82475bd8deadSopenharmony_ci        horizontal line commands to generic line to commands where as
82485bd8deadSopenharmony_ci        glTransformPathNV does that only if the resulting transformed
82495bd8deadSopenharmony_ci        line segment is no longer either vertical or horizontal in the
82505bd8deadSopenharmony_ci        new coordinate system.  This allows cases such as 90 degree
82515bd8deadSopenharmony_ci        rotations or scaling without rotation to preserve the compactness
82525bd8deadSopenharmony_ci        of vertical and horizontal line segments.
82535bd8deadSopenharmony_ci
82545bd8deadSopenharmony_ci        In OpenVG 1.1, the VG_MATRIX_PATH_USER_TO_SURFACE matrix
82555bd8deadSopenharmony_ci        used by vgTransformPath is a 3x3 projective matrix where as
82565bd8deadSopenharmony_ci        glTransformPathNV supports up to 4x4 projective matrices.
82575bd8deadSopenharmony_ci        Note that the z component of any transformed coordinate is
82585bd8deadSopenharmony_ci        effectively discarded by glTransformPathNV so the z row and
82595bd8deadSopenharmony_ci        column is not consequential to the resulting transformed path.
82605bd8deadSopenharmony_ci        The rationale for this is to allow the same 4x4 transform matrix
82615bd8deadSopenharmony_ci        array used by 3D to be used by glTransformPathNV.
82625bd8deadSopenharmony_ci
82635bd8deadSopenharmony_ci        In OpenVG 1.1, the matrix is implicitly supplied by the
82645bd8deadSopenharmony_ci        VG_MATRIX_PATH_UER_TO_SURFACE matrix whereas in glTransformPathNV,
82655bd8deadSopenharmony_ci        the matrix is explicitly specified.
82665bd8deadSopenharmony_ci
82675bd8deadSopenharmony_ci        XXX Perhaps there should be a special mode that uses the
82685bd8deadSopenharmony_ci        modelview-projection-viewport transform implicitly?
82695bd8deadSopenharmony_ci
82705bd8deadSopenharmony_ci   101. Can you provide an example of non-scaling strokes implemented with
82715bd8deadSopenharmony_ci        glTransformPathNV?
82725bd8deadSopenharmony_ci
82735bd8deadSopenharmony_ci        UNRESOLVED:  To be written.
82745bd8deadSopenharmony_ci
82755bd8deadSopenharmony_ci   102. What happens if a command that creates a path from existing path
82765bd8deadSopenharmony_ci        objects has the result path name as one of the inputs?
82775bd8deadSopenharmony_ci
82785bd8deadSopenharmony_ci        RESOLVED:  This is expected to just work.  The new path object
82795bd8deadSopenharmony_ci        is created from the existing ones, then the new path object
82805bd8deadSopenharmony_ci        replaces any path object with the resulting path object name.
82815bd8deadSopenharmony_ci
82825bd8deadSopenharmony_ci   103. Should glTransformPathNV support projective transformations?
82835bd8deadSopenharmony_ci
82845bd8deadSopenharmony_ci        RESOLVED:  No, such projective transformations could result
82855bd8deadSopenharmony_ci        in path commands transitioning from non-rational to rational
82865bd8deadSopenharmony_ci        boundaries.
82875bd8deadSopenharmony_ci
82885bd8deadSopenharmony_ci        If points on the path boundary are generated by non-rational
82895bd8deadSopenharmony_ci        boundaries, the resulting transformation, assuming a
82905bd8deadSopenharmony_ci        non-projective transformation, also results in non-rational
82915bd8deadSopenharmony_ci        boundaries.
82925bd8deadSopenharmony_ci
82935bd8deadSopenharmony_ci   104. Should there be a distinct stencil function state for path
82945bd8deadSopenharmony_ci        stenciling?
82955bd8deadSopenharmony_ci
82965bd8deadSopenharmony_ci        RESOLVED:  YES.  glPathStencilFunc sets the state.  How the
82975bd8deadSopenharmony_ci        stencil state needs to be configured for path covering is
82985bd8deadSopenharmony_ci        different than how the stencil function is configured typically
82995bd8deadSopenharmony_ci        for path stenciling.
83005bd8deadSopenharmony_ci
83015bd8deadSopenharmony_ci        For example, stencil covering might use
83025bd8deadSopenharmony_ci        glStencilFunc(GL_NOT_EQUAL,0,~0) while path stenciling would
83035bd8deadSopenharmony_ci        use GL_ALWAYS for the path stenciling stencil test.
83045bd8deadSopenharmony_ci
83055bd8deadSopenharmony_ci        However there are other situations such as path clipping where it
83065bd8deadSopenharmony_ci        is useful to have the path stencil function configured differently
83075bd8deadSopenharmony_ci        such as glPathStencilFunc(GL_NOT_EQUAL, 0x00, 0x80) or other
83085bd8deadSopenharmony_ci        similar path clipping test.
83095bd8deadSopenharmony_ci
83105bd8deadSopenharmony_ci   105. Is there back- and front-facing path stencil function state?
83115bd8deadSopenharmony_ci
83125bd8deadSopenharmony_ci        RESOLVED:  NO.  There is a single stencil function, reference
83135bd8deadSopenharmony_ci        value, and read mask.  The path stenciling operation doesn't
83145bd8deadSopenharmony_ci        have a sense of front- and back-facing.
83155bd8deadSopenharmony_ci
83165bd8deadSopenharmony_ci   106. Does the path stencil function state apply always or only if
83175bd8deadSopenharmony_ci        stencil testing is enabled?
83185bd8deadSopenharmony_ci
83195bd8deadSopenharmony_ci        RESOLVED:  Always.  If you want to avoid discarding samples
83205bd8deadSopenharmony_ci        from this test, use the GL_ALWAYS path stencil function (which
83215bd8deadSopenharmony_ci        is the initial context state).
83225bd8deadSopenharmony_ci
83235bd8deadSopenharmony_ci   107. Does the glPathStencilFuncNV state affect the operation of
83245bd8deadSopenharmony_ci        the stencil test during path cover operations?
83255bd8deadSopenharmony_ci
83265bd8deadSopenharmony_ci        RESOLVED:  NO, the path stencil state updated by
83275bd8deadSopenharmony_ci        glPathStencilFuncNV only affects the path stencil (not cover)
83285bd8deadSopenharmony_ci        operations.
83295bd8deadSopenharmony_ci
83305bd8deadSopenharmony_ci        For the path cover operations, the *normal* stencil test applies.
83315bd8deadSopenharmony_ci        For the stencil test to apply to path cover operations, the
83325bd8deadSopenharmony_ci        stencil test (GL_STENCIL_TEST) must be enabled.
83335bd8deadSopenharmony_ci
83345bd8deadSopenharmony_ci   108. Should path objects be shared among rendering contexts in the
83355bd8deadSopenharmony_ci        same manner as display lists and texture objects?
83365bd8deadSopenharmony_ci
83375bd8deadSopenharmony_ci        RESOLVED:  Yes.
83385bd8deadSopenharmony_ci
83395bd8deadSopenharmony_ci        See the "Additions to the AGL/GLX/WGL Specifications" section.
83405bd8deadSopenharmony_ci
83415bd8deadSopenharmony_ci        Because path objects are not "bound" there are stricter
83425bd8deadSopenharmony_ci        serialization requirements than for "bindable" objects such as
83435bd8deadSopenharmony_ci        programs and textures.
83445bd8deadSopenharmony_ci
83455bd8deadSopenharmony_ci        Due to NVIDIA driver bug 1315267, path objects were not actually
83465bd8deadSopenharmony_ci        shared among contexts prior to Driver release 320.xx (July 2013).
83475bd8deadSopenharmony_ci
83485bd8deadSopenharmony_ci   109. Should the kerning separations be 2D offsets or 1D horizontal
83495bd8deadSopenharmony_ci        translations?
83505bd8deadSopenharmony_ci
83515bd8deadSopenharmony_ci        UNRESOLVED:  The specification is currently written for 1D
83525bd8deadSopenharmony_ci        horizontal translations.
83535bd8deadSopenharmony_ci
83545bd8deadSopenharmony_ci        TrueType fonts appears to provide 1D horizontal translations
83555bd8deadSopenharmony_ci        for kerning.
83565bd8deadSopenharmony_ci
83575bd8deadSopenharmony_ci        However a PostScript font can contain 2D offsets for kerning.
83585bd8deadSopenharmony_ci
83595bd8deadSopenharmony_ci        Are 2D offsets really used?  2D offsets seem like an unnecessary
83605bd8deadSopenharmony_ci        complication when they are unlikely to be common.
83615bd8deadSopenharmony_ci
83625bd8deadSopenharmony_ci        XXX Need to study this situation further.
83635bd8deadSopenharmony_ci
83645bd8deadSopenharmony_ci        If 99.99% of fonts never use 2D offsets, it is annoying to have
83655bd8deadSopenharmony_ci        them for the ultra minority that might.  Not sure what the real
83665bd8deadSopenharmony_ci        situation is...
83675bd8deadSopenharmony_ci
83685bd8deadSopenharmony_ci        Perhaps we could provide tokens to query either 1D horizontal
83695bd8deadSopenharmony_ci        translations or the more general 2D offsets.  But how would an
83705bd8deadSopenharmony_ci        application know whether a font actually specified 2D offsets
83715bd8deadSopenharmony_ci        or not??
83725bd8deadSopenharmony_ci
83735bd8deadSopenharmony_ci   110. What is the initial miter limit of a path object?
83745bd8deadSopenharmony_ci
83755bd8deadSopenharmony_ci        RESOLVED:  4 to match the SVG specification.  See:
83765bd8deadSopenharmony_ci
83775bd8deadSopenharmony_ci            http://www.w3.org/TR/SVG/painting.html#StrokeMiterlimitProperty
83785bd8deadSopenharmony_ci
83795bd8deadSopenharmony_ci        There is a lot of variability in initial miter limit values among
83805bd8deadSopenharmony_ci        path rendering APIs.  The SVG initial miter limit is chosen
83815bd8deadSopenharmony_ci        because SVG is an open, web-based standard.
83825bd8deadSopenharmony_ci
83835bd8deadSopenharmony_ci        For Cairo, the initial miter limit is 10.
83845bd8deadSopenharmony_ci
83855bd8deadSopenharmony_ci        For Direct2D, the initial miter limit is 10.
83865bd8deadSopenharmony_ci
83875bd8deadSopenharmony_ci        For Flash, the initial miter limit is 3.
83885bd8deadSopenharmony_ci
83895bd8deadSopenharmony_ci        For PostScript, the initial miter limit is 10.
83905bd8deadSopenharmony_ci
83915bd8deadSopenharmony_ci        For Qt, the initial miter limit is 2 units of the stroke width.
83925bd8deadSopenharmony_ci
83935bd8deadSopenharmony_ci        For Skia, the initial miter limit is 4.
83945bd8deadSopenharmony_ci
83955bd8deadSopenharmony_ci   111. Should initial path object state such as miter limit, stroke width, etc.
83965bd8deadSopenharmony_ci        be determined by "latching" per-context initial value state for
83975bd8deadSopenharmony_ci        these parameters?
83985bd8deadSopenharmony_ci
83995bd8deadSopenharmony_ci        UNRESOLVED
84005bd8deadSopenharmony_ci
84015bd8deadSopenharmony_ci        Possibly.  That would make it easier for a particular path
84025bd8deadSopenharmony_ci        rendering API's conventions initial conventions be consistently used
84035bd8deadSopenharmony_ci        to initialize path object parameters.
84045bd8deadSopenharmony_ci
84055bd8deadSopenharmony_ci   112. Should glPathFogGenNV's GL_FRAGMENT_DEPTH mode provide a
84065bd8deadSopenharmony_ci        perspective-divided value?
84075bd8deadSopenharmony_ci
84085bd8deadSopenharmony_ci        RESOLVED:  No, -ze is provided rather than -ze/we.
84095bd8deadSopenharmony_ci
84105bd8deadSopenharmony_ci        Providing -ze/we would not interpolate properly over the path.
84115bd8deadSopenharmony_ci        Typically the modelview matrix used to compute ze is affine so we
84125bd8deadSopenharmony_ci        will be 1.0 in such cases and the lack of division won't matter.
84135bd8deadSopenharmony_ci
84145bd8deadSopenharmony_ci        If the modelview matrix is projective, the application can choose
84155bd8deadSopenharmony_ci        to interpolate we as a texture coordinate with glPathTexGenNV's
84165bd8deadSopenharmony_ci        GL_EYE_LINEAR mode and perform the division -ze/we during fragment
84175bd8deadSopenharmony_ci        coloring.
84185bd8deadSopenharmony_ci
84195bd8deadSopenharmony_ci   113. How should path color and texture coordinate generation be
84205bd8deadSopenharmony_ci        disabled?
84215bd8deadSopenharmony_ci
84225bd8deadSopenharmony_ci        RESOLVED:  For color:
84235bd8deadSopenharmony_ci
84245bd8deadSopenharmony_ci           glPathColorGenNV(colorFormat, GL_NONE, GL_NONE/*colorFormat*/, NULL);
84255bd8deadSopenharmony_ci
84265bd8deadSopenharmony_ci        For texture coordinate generation:
84275bd8deadSopenharmony_ci
84285bd8deadSopenharmony_ci           glPathTexGenNV(GL_TEXTURE_0+i, GL_NONE, 0/*components*/, NULL);
84295bd8deadSopenharmony_ci
84305bd8deadSopenharmony_ci        The coeffs array could be an arbitrary pointer because it will
84315bd8deadSopenharmony_ci        only be dereferenced if the genMode is GL_NONE, but NULL is a
84325bd8deadSopenharmony_ci        suitable value to document this fact.
84335bd8deadSopenharmony_ci
84345bd8deadSopenharmony_ci        Querying the respective coefficients after path color or texture
84355bd8deadSopenharmony_ci        coordinate disabling commands above should return 16 zeros.
84365bd8deadSopenharmony_ci
84375bd8deadSopenharmony_ci   114. How should path color and texture coordinate generation interact
84385bd8deadSopenharmony_ci        with the GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV instanced cover
84395bd8deadSopenharmony_ci        mode?
84405bd8deadSopenharmony_ci
84415bd8deadSopenharmony_ci        RESOLVED:  The effective bounding box is the union of all the
84425bd8deadSopenharmony_ci        instanced bounding boxes.
84435bd8deadSopenharmony_ci
84445bd8deadSopenharmony_ci        This is useful for something such as a line of text rendered as
84455bd8deadSopenharmony_ci        sequence of glyph path objects where the line of text should share
84465bd8deadSopenharmony_ci        a common gradient tied to the bounding box of the line of text.
84475bd8deadSopenharmony_ci
84485bd8deadSopenharmony_ci   115. How do I ignore kerning when using glGetPathSpacingNV?
84495bd8deadSopenharmony_ci
84505bd8deadSopenharmony_ci        RESOLVED:  Pass in 0.0 for the kerningScale parameter.
84515bd8deadSopenharmony_ci
84525bd8deadSopenharmony_ci   116. How do I query the raw kerning parameters?
84535bd8deadSopenharmony_ci
84545bd8deadSopenharmony_ci        RESOLVED:  Pass in 0.0 for the advanceScale parameter and 1.0
84555bd8deadSopenharmony_ci        for the kerningScale parameter.
84565bd8deadSopenharmony_ci
84575bd8deadSopenharmony_ci   117. Do I need to use GL_TRANSLATE_2D_NV when getting spacing
84585bd8deadSopenharmony_ci        information from glGetPathSpacingNV?
84595bd8deadSopenharmony_ci
84605bd8deadSopenharmony_ci        RESOLVED:  Typically GL_TRANSLATE_X_NV is fine.
84615bd8deadSopenharmony_ci
84625bd8deadSopenharmony_ci        Typically most kerned fonts (particularly TrueType fonts) using
84635bd8deadSopenharmony_ci        kerning offsets that are horizontal only.  PostScript technically
84645bd8deadSopenharmony_ci        allows 2D (x,y) kerning offsets and FreeType 2's FT_Get_Kerning
84655bd8deadSopenharmony_ci        API also returns 2D kerning vectors.
84665bd8deadSopenharmony_ci
84675bd8deadSopenharmony_ci        To support 2D kerning vectors, glGetPathSpacingNV accepts
84685bd8deadSopenharmony_ci        GL_TRANSLATE_2D_NV as well as GL_TRANSLATE_X_NV.
84695bd8deadSopenharmony_ci
84705bd8deadSopenharmony_ci        For most fonts, the Y offset can be expected to be zero.
84715bd8deadSopenharmony_ci
84725bd8deadSopenharmony_ci   118. Why have the /pathParameterTemplate/ parameter to
84735bd8deadSopenharmony_ci        glPathGlyphRangeNV and glPathGlyphsNV?
84745bd8deadSopenharmony_ci
84755bd8deadSopenharmony_ci        RESOLVED:  Path object specified from glyphs often need parameters
84765bd8deadSopenharmony_ci        specified on a per-font basis that are distinct from the initial
84775bd8deadSopenharmony_ci        path object parameters in table 6.Y.
84785bd8deadSopenharmony_ci
84795bd8deadSopenharmony_ci        Rather than force an application to respecify the path parameters
84805bd8deadSopenharmony_ci        of all the path objects in a range of path objects for glyphs,
84815bd8deadSopenharmony_ci        it is more efficient for such glyph-initialized path objects
84825bd8deadSopenharmony_ci        to simply use parameters from another existing path object as
84835bd8deadSopenharmony_ci        a template.
84845bd8deadSopenharmony_ci
84855bd8deadSopenharmony_ci        For example, the default stroke width of 1.0 might need to be
84865bd8deadSopenharmony_ci        respecified for every path object corresponding to a range of
84875bd8deadSopenharmony_ci        glyphs for rendering stroked glyphs.  If the emScale for a glyph
84885bd8deadSopenharmony_ci        is 2048 (typical of TrueType fonts), then 1.0 is too thin to be a
84895bd8deadSopenharmony_ci        discernable stroke width.  A value such as 10% of the Em scale (so
84905bd8deadSopenharmony_ci        10% of 2048 would be 20.48) is likely to be a more useful value.
84915bd8deadSopenharmony_ci
84925bd8deadSopenharmony_ci        Similarly, GL_ROUND_NV or GL_BEVEL_NV are better join styles
84935bd8deadSopenharmony_ci        for stroking glyphs than the standard join style initial value
84945bd8deadSopenharmony_ci        GL_MITER_REVERT_NV.
84955bd8deadSopenharmony_ci
84965bd8deadSopenharmony_ci        A shared dash pattern for all path objects belonging to a single
84975bd8deadSopenharmony_ci        set of glyphs is much easier to specify from a template path
84985bd8deadSopenharmony_ci        object.
84995bd8deadSopenharmony_ci
85005bd8deadSopenharmony_ci   119. Are system font names and file names for fonts case-sensitive?
85015bd8deadSopenharmony_ci
85025bd8deadSopenharmony_ci        RESOLVED:  Standard font names (such as "Mono" and "Missing"
85035bd8deadSopenharmony_ci        are case-sensitive).  System font name names and file names for
85045bd8deadSopenharmony_ci        fonts should match the system's policy for case-sensitivity of
85055bd8deadSopenharmony_ci        font names and file names respectively.
85065bd8deadSopenharmony_ci
85075bd8deadSopenharmony_ci        Linux and other Unix-like operating systems have case-sensitive
85085bd8deadSopenharmony_ci        file names.  Windows has case-insensitive file names.  Windows and
85095bd8deadSopenharmony_ci        FontConfig-based systems have case-insensitive system font names.
85105bd8deadSopenharmony_ci
85115bd8deadSopenharmony_ci   120. Why have PathStencilDepthOffsetNV and PathCoverDepthFuncNV?
85125bd8deadSopenharmony_ci
85135bd8deadSopenharmony_ci        RESOLVED:  These functions minimize the state changes needed
85145bd8deadSopenharmony_ci        to depth test path rendering consisting of several co-planar
85155bd8deadSopenharmony_ci        path layers (as is typical of path rendering content) against
85165bd8deadSopenharmony_ci        conventional depth-tested 3D rendering.
85175bd8deadSopenharmony_ci
85185bd8deadSopenharmony_ci        To properly depth test path rendering against conventional 3D
85195bd8deadSopenharmony_ci        rendering and other path rendering, particularly when a set of
85205bd8deadSopenharmony_ci        paths layer upon themselves, it is necessary to pull forward
85215bd8deadSopenharmony_ci        slightly the depth values generated during the stenciling step.
85225bd8deadSopenharmony_ci        This avoids Z-fighting when drawing path rendered layers that
85235bd8deadSopenharmony_ci        are logically co-planar.  However when covering pixels (assuming
85245bd8deadSopenharmony_ci        the stencil test passed during covering), we unconditionally
85255bd8deadSopenharmony_ci        write un-offset depth values.
85265bd8deadSopenharmony_ci
85275bd8deadSopenharmony_ci        To depth-test path rendered content in this manner, follow the
85285bd8deadSopenharmony_ci        following pattern:
85295bd8deadSopenharmony_ci
85305bd8deadSopenharmony_ci        Perform the following initialization:
85315bd8deadSopenharmony_ci
85325bd8deadSopenharmony_ci            // Conventional initialization for depth testing and using path rendering
85335bd8deadSopenharmony_ci            glEnable(GL_DEPTH_TEST);
85345bd8deadSopenharmony_ci            glStencilFunc(GL_NOT_EQUAL, 0, 0xFF);
85355bd8deadSopenharmony_ci            glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);
85365bd8deadSopenharmony_ci
85375bd8deadSopenharmony_ci            // The additional calls for depth testing of path-rendering...
85385bd8deadSopenharmony_ci            glPathStencilDepthOffsetNV(-0.05, -1);  // push stenciled path depth values slightly closer
85395bd8deadSopenharmony_ci            glPathCoverDepthFuncNV(GL_ALWAYS);
85405bd8deadSopenharmony_ci
85415bd8deadSopenharmony_ci        Clear the framebuffer, including the depth buffer:
85425bd8deadSopenharmony_ci
85435bd8deadSopenharmony_ci            // Clearing
85445bd8deadSopenharmony_ci            glClear(GL_COLOR_BUFFER_BIT |
85455bd8deadSopenharmony_ci                    GL_STENCIL_BUFFER_BIT |
85465bd8deadSopenharmony_ci                    GL_DEPTH_BUFFER_BIT);
85475bd8deadSopenharmony_ci
85485bd8deadSopenharmony_ci        For each rendered path object...
85495bd8deadSopenharmony_ci
85505bd8deadSopenharmony_ci            0)  Make sure stencil testing is enabled (in case it was
85515bd8deadSopenharmony_ci                disabled to draw prior conventional 3D objects).
85525bd8deadSopenharmony_ci
85535bd8deadSopenharmony_ci                glEnable(GL_STENCIL_TEST);
85545bd8deadSopenharmony_ci
85555bd8deadSopenharmony_ci            1)  Stencil step:
85565bd8deadSopenharmony_ci
85575bd8deadSopenharmony_ci                glStencilFillPathNV(pathObj, GL_COUNT_UP_NV, 0xFF);
85585bd8deadSopenharmony_ci
85595bd8deadSopenharmony_ci            2)  Cover step:
85605bd8deadSopenharmony_ci
85615bd8deadSopenharmony_ci                glCoverFillPathNV(pathObj, GL_COUNT_UP_NV, 0xFF);
85625bd8deadSopenharmony_ci
85635bd8deadSopenharmony_ci        For conventional 3D objects...
85645bd8deadSopenharmony_ci
85655bd8deadSopenharmony_ci            0)  Make sure stencil testing is disabled (in case it was
85665bd8deadSopenharmony_ci                enabled to draw prior path rendered objects).
85675bd8deadSopenharmony_ci
85685bd8deadSopenharmony_ci                glDisable(GL_STENCIL_TEST);
85695bd8deadSopenharmony_ci
85705bd8deadSopenharmony_ci            1)  Draw normally:
85715bd8deadSopenharmony_ci
85725bd8deadSopenharmony_ci                draw_3d_object_normally();
85735bd8deadSopenharmony_ci
85745bd8deadSopenharmony_ci        With this pattern, conventional and path rendered objects can
85755bd8deadSopenharmony_ci        be rendered in arbitrary order.
85765bd8deadSopenharmony_ci
85775bd8deadSopenharmony_ci        The above pattern shows path filling, but path stroking works
85785bd8deadSopenharmony_ci        the same.
85795bd8deadSopenharmony_ci
85805bd8deadSopenharmony_ci        Notice only the initialization calls to
85815bd8deadSopenharmony_ci        glPathStencilDepthOffsetNV and glPathCoverDepthFuncNV are
85825bd8deadSopenharmony_ci        actually "different" than conventional 3D or path rendering.
85835bd8deadSopenharmony_ci
85845bd8deadSopenharmony_ci        One potential disadvantage of this approach is that other objects
85855bd8deadSopenharmony_ci        with nearly identical depth values to the depth values of the
85865bd8deadSopenharmony_ci        path rendering content may be judged to pass the depth test when
85875bd8deadSopenharmony_ci        technically the other object's depth values are slightly closer.
85885bd8deadSopenharmony_ci        This is because the path stencil depth offset is pushing path
85895bd8deadSopenharmony_ci        rendering depth values slightly closer.  While this is possible,
85905bd8deadSopenharmony_ci        this occurs in situations where the proper occlusion was nearly
85915bd8deadSopenharmony_ci        ambiguous because the depth values between the other object and
85925bd8deadSopenharmony_ci        the path rendering are so close.
85935bd8deadSopenharmony_ci
85945bd8deadSopenharmony_ci   121. What if the disadvantage of depth values having to be offset closer
85955bd8deadSopenharmony_ci        is deemed unacceptable (this will be rare).
85965bd8deadSopenharmony_ci
85975bd8deadSopenharmony_ci        RESOLVED: If 100% exact depth occlusion is crucial to the
85985bd8deadSopenharmony_ci        application, this can be achieved at some cost be stenciling
85995bd8deadSopenharmony_ci        a planar conservative bounding region for the path object into
86005bd8deadSopenharmony_ci        the stencil buffer, depth testing the rendering of this plane.
86015bd8deadSopenharmony_ci        This depth-tested plane region should not perform color writes
86025bd8deadSopenharmony_ci        but should set the most-significant bit of the stencil buffer
86035bd8deadSopenharmony_ci        (for an 8-bit stencil buffer, done with GL_REPLACE of 128).
86045bd8deadSopenharmony_ci        Then path rendering, with depth testing DISABLED, can use
86055bd8deadSopenharmony_ci        the glPathStencilFunc to discard stencil values without the
86065bd8deadSopenharmony_ci        most-significant bit set.  Finally the plane region must
86075bd8deadSopenharmony_ci        be redrawn again to clear any stencil values left with the
86085bd8deadSopenharmony_ci        most-significant bit set.  This approach essentially uses the
86095bd8deadSopenharmony_ci        depth plane region as a depth-tested proxy for the proper depth
86105bd8deadSopenharmony_ci        values for the path rendering.
86115bd8deadSopenharmony_ci
86125bd8deadSopenharmony_ci   122. How should the path stencil depth offset be described?
86135bd8deadSopenharmony_ci
86145bd8deadSopenharmony_ci        RESOLVED:  The function is named glPathStencilDepthOffsetNV and
86155bd8deadSopenharmony_ci        the query tokens are GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR and
86165bd8deadSopenharmony_ci        GL_PATH_DEPTH_OFFSET_UNITS.
86175bd8deadSopenharmony_ci
86185bd8deadSopenharmony_ci        Note that "polygon offset" does not appear in the name.  Polygon
86195bd8deadSopenharmony_ci        offset isn't appropriate in the context of path rendering because
86205bd8deadSopenharmony_ci        paths aren't technically polygon primitives.  The term "depth
86215bd8deadSopenharmony_ci        offset" is the actual name of the functionality that offsets
86225bd8deadSopenharmony_ci        depth values of polygons (the name of section 3.6.4 specifying
86235bd8deadSopenharmony_ci        glPolygonOffset is actually titled "Depth Offset").
86245bd8deadSopenharmony_ci
86255bd8deadSopenharmony_ci        There's no perfect attribute category of state for path stencil
86265bd8deadSopenharmony_ci        depth offset factor and units to belong so the "polygon" category
86275bd8deadSopenharmony_ci        just like the polygon offset state.
86285bd8deadSopenharmony_ci
86295bd8deadSopenharmony_ci   123. Does glPointAlongPathNV have anything to do with the path's
86305bd8deadSopenharmony_ci        dashing state?
86315bd8deadSopenharmony_ci
86325bd8deadSopenharmony_ci        RESOLVED:  No.
86335bd8deadSopenharmony_ci
86345bd8deadSopenharmony_ci        The arc length computation necessary for glPointAlongPathNV
86355bd8deadSopenharmony_ci        computes the arc length along the path (really a subpath) but
86365bd8deadSopenharmony_ci        ignores any gaps created by the dash pattern.
86375bd8deadSopenharmony_ci
86385bd8deadSopenharmony_ci        Knowing the dash count, pattern, offset, and reset state, you
86395bd8deadSopenharmony_ci        could adjust the distance passed to glPointAlongPathNV to account
86405bd8deadSopenharmony_ci        for dashing gaps, but this is something the application must do.
86415bd8deadSopenharmony_ci
86425bd8deadSopenharmony_ci   124. Should PostScript user path parser enforce the same error
86435bd8deadSopenharmony_ci        conditions as PostScript?
86445bd8deadSopenharmony_ci
86455bd8deadSopenharmony_ci        RESOLVED:  No.
86465bd8deadSopenharmony_ci
86475bd8deadSopenharmony_ci        Section 4.6.1 (User Path Construction) in the PostScript Language
86485bd8deadSopenharmony_ci        Reference Manual explains user paths.
86495bd8deadSopenharmony_ci
86505bd8deadSopenharmony_ci        The section includes some restrictions.  The "ucache" operator
86515bd8deadSopenharmony_ci        is optional but must be the first operator in a user path.
86525bd8deadSopenharmony_ci        The "setbbox" operator is required.  The next operator must be an
86535bd8deadSopenharmony_ci        "absolute positioning operator (moveto, arc, or arcn)."
86545bd8deadSopenharmony_ci
86555bd8deadSopenharmony_ci        The grammar in 5.X.1.2.2 (PostScript Path Grammar) does not
86565bd8deadSopenharmony_ci        enforce these restrictions.  In particular, the operators can
86575bd8deadSopenharmony_ci        appear in any order and none are required.
86585bd8deadSopenharmony_ci
86595bd8deadSopenharmony_ci        The rationale for this relaxed behavior is: 1) to make the
86605bd8deadSopenharmony_ci        parser easier to specify, 2) make the specification of a path
86615bd8deadSopenharmony_ci        object through a PostScript path grammar more consistent with
86625bd8deadSopenharmony_ci        specifying a path using glPathCommandsNV, and 3) not require
86635bd8deadSopenharmony_ci        specification of a user path bounding box that isn't relevant
86645bd8deadSopenharmony_ci        in the context of OpenGL rendering.
86655bd8deadSopenharmony_ci
86665bd8deadSopenharmony_ci        If a path command is used without a prior absolute positioning
86675bd8deadSopenharmony_ci        command, the initial position is assumed to be (0,0).  So a string
86685bd8deadSopenharmony_ci        such as "40 50 lineto" would draw a line from (0,0) to (40,50).
86695bd8deadSopenharmony_ci
86705bd8deadSopenharmony_ci   125. The ISO PDF 32000 standard has additional path construction
86715bd8deadSopenharmony_ci        operators for rectangles and cubic Bezier curves with duplicated
86725bd8deadSopenharmony_ci        first or last control points.  Should this extension have
86735bd8deadSopenharmony_ci        first-class path commands for these operators?
86745bd8deadSopenharmony_ci
86755bd8deadSopenharmony_ci        RESOLVED:  Yes.  These PDF operators correspond
86765bd8deadSopenharmony_ci        to the path commands GL_DUP_FIRST_CUBIC_CURVE_TO_NV,
86775bd8deadSopenharmony_ci        GL_DUP_LAST_CUBIC_CURVE_TO_NV, and GL_RECT_NV, corresponding to
86785bd8deadSopenharmony_ci        the operators "v", "y", and "r" respectively.
86795bd8deadSopenharmony_ci
86805bd8deadSopenharmony_ci        See Table 59 (Path Construction Operators) in the PDF 32000-1:2008
86815bd8deadSopenharmony_ci        specification (page 133).  See:
86825bd8deadSopenharmony_ci
86835bd8deadSopenharmony_ci            http://www.adobe.com/devnet/acrobat/pdfs/PDF32000_2008.pdf  [[ free version ]]
86845bd8deadSopenharmony_ci            http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?csnumber=51502
86855bd8deadSopenharmony_ci
86865bd8deadSopenharmony_ci        These additional operators make path specification and storage
86875bd8deadSopenharmony_ci        more compact, help editing, and better semantically match the
86885bd8deadSopenharmony_ci        important PDF standard.  PDF supports just absolute versions of
86895bd8deadSopenharmony_ci        these commands so relative versions are NOT provided.
86905bd8deadSopenharmony_ci
86915bd8deadSopenharmony_ci        The "m", "l'", "c", and "h" operators correspond to GL_MOVE_TO_NV,
86925bd8deadSopenharmony_ci        GL_LINE_TO_NV, GL_CUBIC_CURVE_TO_NV, and GL_CLOSE_PATH_NV
86935bd8deadSopenharmony_ci        respectively.
86945bd8deadSopenharmony_ci
86955bd8deadSopenharmony_ci        There is not a string grammar for glPathStringNV to encode
86965bd8deadSopenharmony_ci        PDF commands.
86975bd8deadSopenharmony_ci
86985bd8deadSopenharmony_ci   126. What is the GL_RESTART_PATH_NV path command for?
86995bd8deadSopenharmony_ci
87005bd8deadSopenharmony_ci        RESOLVED:  It is useful to be able to concatenate path
87015bd8deadSopenharmony_ci        command sequences as if they are independent from each other.
87025bd8deadSopenharmony_ci        The GL_RESTART_PATH_NV provides a way to reset the state of
87035bd8deadSopenharmony_ci        path command processing back to its initial state when the first
87045bd8deadSopenharmony_ci        command of a path's command sequence is processed.
87055bd8deadSopenharmony_ci
87065bd8deadSopenharmony_ci        So you could use glPathSubCommandsNV to append a path sequence
87075bd8deadSopenharmony_ci        to an existing path object's sequence.  By first appending a
87085bd8deadSopenharmony_ci        GL_RESTART_PATH_NV command, you make sure the result is consistent
87095bd8deadSopenharmony_ci        with drawing the path sequences independently.
87105bd8deadSopenharmony_ci
87115bd8deadSopenharmony_ci        Specifically, /sp/, /cp/ and /pep/ are re-initialized to (0,0) when
87125bd8deadSopenharmony_ci        a GL_RESTART_PATH_NV path command is encountered.
87135bd8deadSopenharmony_ci
87145bd8deadSopenharmony_ci        Additionally, this restart also has the effect of causing
87155bd8deadSopenharmony_ci        CIRCULAR_TANGENT_ARC_TO_NV to NOT draw an initial tangent line
87165bd8deadSopenharmony_ci        segment.  So if you want to draw multiple independent circular
87175bd8deadSopenharmony_ci        arcs using the GL_CIRCULAR_TANGENT_ARC_TO_NV parameterization,
87185bd8deadSopenharmony_ci        you need a GL_RESTART_PATH_NV command just prior to each
87195bd8deadSopenharmony_ci        GL_CIRCULAR_TANGENT_ARC_TO_NV command.  In this respect,
87205bd8deadSopenharmony_ci        GL_RESTART_PATH_NV is different from a GL_MOVE_TO_NV command to
87215bd8deadSopenharmony_ci        (0,0).
87225bd8deadSopenharmony_ci
87235bd8deadSopenharmony_ci        The GL_RESTART_PATH_NV does not by itself reset the dash
87245bd8deadSopenharmony_ci        offset, but if the path's GL_PATH_DASH_OFFSET_RESET_NV is set
87255bd8deadSopenharmony_ci        to GL_MOVE_TO_RESETS_NV, GL_RESTART_PATH_NV (as with any command
87265bd8deadSopenharmony_ci        that updates /sp/) will reset the dash offset.
87275bd8deadSopenharmony_ci
87285bd8deadSopenharmony_ci   127. <<Bogus issue removed.>>
87295bd8deadSopenharmony_ci
87305bd8deadSopenharmony_ci   128. How does the "stencil" and "cover" steps operate on a multisample
87315bd8deadSopenharmony_ci        framebuffer when the GL_MULTISAMPLE enabled is disabled?
87325bd8deadSopenharmony_ci
87335bd8deadSopenharmony_ci        RESOLVED:  The "stencil" step respects the disabled GL_MULTISAMPLE
87345bd8deadSopenharmony_ci        enable and rendered aliased stencil coverage.
87355bd8deadSopenharmony_ci
87365bd8deadSopenharmony_ci        When MULTISAMPLE is disabled, "stencil" step coverage
87375bd8deadSopenharmony_ci        determinations are made at the pixel center.  (This will result
87385bd8deadSopenharmony_ci        in an aliased appearance for the determined path coverage so
87395bd8deadSopenharmony_ci        stenciling and covering paths with GL_MULTISAMPLE disabled isn't
87405bd8deadSopenharmony_ci        recommended.)
87415bd8deadSopenharmony_ci
87425bd8deadSopenharmony_ci        All the (non-masked) stencil samples for the pixel are considered
87435bd8deadSopenharmony_ci        covered or not based on the pixel center's coverage determination.
87445bd8deadSopenharmony_ci        For example, if MULTISAMPLE is disabled for a multisample
87455bd8deadSopenharmony_ci        buffer and the pixel center is determined covered during
87465bd8deadSopenharmony_ci        glStencilFillPathNV or glStencilStrokePathNV (or instanced
87475bd8deadSopenharmony_ci        versions), all the samples are updated (INCR/DECR/INVERT for
87485bd8deadSopenharmony_ci        filling or REPLACE for stroking).
87495bd8deadSopenharmony_ci
87505bd8deadSopenharmony_ci        "non-masked" means that the glSampleMaskIndexedNV state applies.
87515bd8deadSopenharmony_ci
87525bd8deadSopenharmony_ci        The "cover" step also respects the disabled GL_MULTISAMPLE enable.
87535bd8deadSopenharmony_ci
87545bd8deadSopenharmony_ci        To maintain rendering invariances in order to guarantee
87555bd8deadSopenharmony_ci        conservative covering, both the "stencil" and "cover" step should
87565bd8deadSopenharmony_ci        be rendered with the same GL_MULTISAMPLE enable state.
87575bd8deadSopenharmony_ci
87585bd8deadSopenharmony_ci   129. What happens when a command or query takes a sequence of path object
87595bd8deadSopenharmony_ci        names and a named path object does not exist?
87605bd8deadSopenharmony_ci
87615bd8deadSopenharmony_ci        RESOLVED:  The non-existent path is "skipped" in instanced
87625bd8deadSopenharmony_ci        commands such as glStencilFillPathInstancedNV (and the transform
87635bd8deadSopenharmony_ci        for the particular path name is skipped over).  Notice the
87645bd8deadSopenharmony_ci        pseudo-code for these instanced path commands uses glIsPathNV
87655bd8deadSopenharmony_ci        to test if each path name exists.
87665bd8deadSopenharmony_ci
87675bd8deadSopenharmony_ci        Queries cannot simply ignore the invalid name as they return
87685bd8deadSopenharmony_ci        information.  glGetPathSpacingNV treats the non-existent name as
87695bd8deadSopenharmony_ci        having zero space.  glGetPathMetricRangeNV and GetPathMetricsNV
87705bd8deadSopenharmony_ci        return metric values of -1 for the metrics of non-existent
87715bd8deadSopenharmony_ci        path objects (as also occurs if the path object lacks metrics
87725bd8deadSopenharmony_ci        information).
87735bd8deadSopenharmony_ci
87745bd8deadSopenharmony_ci        No GL error is generated due to a non-existent path name.
87755bd8deadSopenharmony_ci
87765bd8deadSopenharmony_ci        (Early implementation prior to NVIDIA's OpenGL 4.3 implementation
87775bd8deadSopenharmony_ci        might crash or generate a GL_INVALID_OPERATION error.
87785bd8deadSopenharmony_ci        The behavior was a bug.)
87795bd8deadSopenharmony_ci
87805bd8deadSopenharmony_ci   130. Should glCallLists be extended to take the GL_UTF8_NV and
87815bd8deadSopenharmony_ci        GL_UTF16_NV date types?
87825bd8deadSopenharmony_ci
87835bd8deadSopenharmony_ci        RESOLVED: No.  That might make sense in another extension since it
87845bd8deadSopenharmony_ci        would allow complex Unicode text to be rendered by glCallLists.
87855bd8deadSopenharmony_ci
87865bd8deadSopenharmony_ci        (An early version of this specification did call for supporting
87875bd8deadSopenharmony_ci        UTF sequences for glCallLists, but that behavior was never
87885bd8deadSopenharmony_ci        implemented and is now purged from the specification.)
87895bd8deadSopenharmony_ci
87905bd8deadSopenharmony_ci   131. Should glPathTexGenNV and glPathColorGenNV transform the plane
87915bd8deadSopenharmony_ci        equations for GL_EYE_LINEAR by the inverse transpose modelview
87925bd8deadSopenharmony_ci        matrix?
87935bd8deadSopenharmony_ci
87945bd8deadSopenharmony_ci        RESOLVED:  Yes.
87955bd8deadSopenharmony_ci
87965bd8deadSopenharmony_ci        This matches the way glTexGenfv operates with GL_EYE_LINEAR
87975bd8deadSopenharmony_ci        texgen planes.  This allows the eye plane equations to be
87985bd8deadSopenharmony_ci        specified in the current object-space.
87995bd8deadSopenharmony_ci
88005bd8deadSopenharmony_ci        (Early specifications, prior to revision 9, incorrectly failed
88015bd8deadSopenharmony_ci        to specify this transformation.)
88025bd8deadSopenharmony_ci
88035bd8deadSopenharmony_ci   132. Should new commands and queries be used to support generating
88045bd8deadSopenharmony_ci        GLSL fragment inputs?
88055bd8deadSopenharmony_ci
88065bd8deadSopenharmony_ci        RESOLVED:  Add a new command to specify the path fragment
88075bd8deadSopenharmony_ci        input generation state but use the API introduced by the
88085bd8deadSopenharmony_ci        ARB_program_interface_query extension specification to query
88095bd8deadSopenharmony_ci        back the path fragment input generation state.
88105bd8deadSopenharmony_ci
88115bd8deadSopenharmony_ci        The new command is glProgramPathFragmentInputGenNV.  Given a GLSL
88125bd8deadSopenharmony_ci        program object and a GL_FRAGMENT_INPUT_NV resource location,
88135bd8deadSopenharmony_ci        this command provides the linear function state with which to
88145bd8deadSopenharmony_ci        generate the specified interpolated fragment input.
88155bd8deadSopenharmony_ci
88165bd8deadSopenharmony_ci        The new GL_FRAGMENT_INPUT_NV token names the path fragment input
88175bd8deadSopenharmony_ci        resource.
88185bd8deadSopenharmony_ci
88195bd8deadSopenharmony_ci        The new program resource properties GL_PATH_GEN_MODE_NV,
88205bd8deadSopenharmony_ci        GL_PATH_GEN_COEFF_NV, and GL_PATH_GEN_COMPONENTS_NV name the
88215bd8deadSopenharmony_ci        path fragment input generation resources.
88225bd8deadSopenharmony_ci
88235bd8deadSopenharmony_ci   133. How should this specification interact with a Core profile context?
88245bd8deadSopenharmony_ci
88255bd8deadSopenharmony_ci        RESOLVED:  See "Dependencies on Core Profile and OpenGL ES"
88265bd8deadSopenharmony_ci        section.
88275bd8deadSopenharmony_ci
88285bd8deadSopenharmony_ci        In summary:
88295bd8deadSopenharmony_ci
88305bd8deadSopenharmony_ci        Enough modelview and projection functionality from
88315bd8deadSopenharmony_ci        EXT_direct_state_access is required to make transformations of
88325bd8deadSopenharmony_ci        paths possible.
88335bd8deadSopenharmony_ci
88345bd8deadSopenharmony_ci        Fragment varyings of GLSL programs can be interrogated and these
88355bd8deadSopenharmony_ci        can be generated.
88365bd8deadSopenharmony_ci
88375bd8deadSopenharmony_ci        Exclude fixed-function fragment varying commands, queries,
88385bd8deadSopenharmony_ci        and GLSL built-in variables.
88395bd8deadSopenharmony_ci
88405bd8deadSopenharmony_ci   134. Existing path rendering systems typically specify 2D transforms.
88415bd8deadSopenharmony_ci        Such transforms are cheaper to load, concatenate, and render with.
88425bd8deadSopenharmony_ci        How are 2D transforms specified?
88435bd8deadSopenharmony_ci
88445bd8deadSopenharmony_ci        RESOLVED:  Add new matrix commands.
88455bd8deadSopenharmony_ci
88465bd8deadSopenharmony_ci        Driver implementations can exploit these more compact matrix
88475bd8deadSopenharmony_ci        representations to accelerate path rendering where often matrix
88485bd8deadSopenharmony_ci        changes are frequent relative to the amount of rendering.  The
88495bd8deadSopenharmony_ci        concatenation of two 3x2 matrices is 24 multiply-add operations;
88505bd8deadSopenharmony_ci        while the concatenation of two 4x4 matrices is 64 multiply-add
88515bd8deadSopenharmony_ci        operations, so requiring over 2.5x more math operations.
88525bd8deadSopenharmony_ci
88535bd8deadSopenharmony_ci        This table shows the correspondence between other path rendering
88545bd8deadSopenharmony_ci        APIs and the corresponding matrix routine so we need only populate
88555bd8deadSopenharmony_ci        the range of matrix representations used by major path rendering
88565bd8deadSopenharmony_ci        standards.
88575bd8deadSopenharmony_ci
88585bd8deadSopenharmony_ci        Standard         Type              Component order  Corresponding GL load command
88595bd8deadSopenharmony_ci        ---------------  ----------------  ---------------  -----------------------------
88605bd8deadSopenharmony_ci        Direct2D         D2D_MATRIX_3X2_F  [0,2,4]          glMatrixLoad3x2fNV
88615bd8deadSopenharmony_ci                                           [1,3,5]
88625bd8deadSopenharmony_ci        Cairo            cairo_matrix_t    [0,2,4]          glMatrixLoad3x2fNV
88635bd8deadSopenharmony_ci                                           [1,3,5]
88645bd8deadSopenharmony_ci        Skia             SkMatrix          [0,1,2]          glMatrixLoadTranspose3x3fNV
88655bd8deadSopenharmony_ci                                           [3,4,5]
88665bd8deadSopenharmony_ci                                           [6,7,8]
88675bd8deadSopenharmony_ci                         SkScalar [6]      [0,2,4]          glMatrixLoad3x2fNV
88685bd8deadSopenharmony_ci                                           [1,3,5]
88695bd8deadSopenharmony_ci        Qt               QMatrix           [0,2,4]          glMatrixLoad3x2fNV
88705bd8deadSopenharmony_ci                                           [1,3,5]
88715bd8deadSopenharmony_ci        OpenVG           VGfloat [9]       [0,3,6]          glMatrixLoad3x3fNV
88725bd8deadSopenharmony_ci                                           [1,4,7]
88735bd8deadSopenharmony_ci                                           [2,5,8]
88745bd8deadSopenharmony_ci        AGM              BRVCoordMatrix    [0,2,4]          glMatrixLoad3x2fNV
88755bd8deadSopenharmony_ci                                           [1,3,5]
88765bd8deadSopenharmony_ci        Ghostscript      gs_matrix         [0,2,4]          glMatrixLoad3x2fNV
88775bd8deadSopenharmony_ci                                           [1,3,5]
88785bd8deadSopenharmony_ci
88795bd8deadSopenharmony_ci        Along with the glMatrixLoad*NV commands, there are corresponding
88805bd8deadSopenharmony_ci        glMatrixMult*NV commands.
88815bd8deadSopenharmony_ci
88825bd8deadSopenharmony_ci        Queries should be rare so the existing queries returning all 16
88835bd8deadSopenharmony_ci        values of a current matrix are sufficient.
88845bd8deadSopenharmony_ci
88855bd8deadSopenharmony_ci   135. Does the "layout(location=2)", etc. syntax work for fragment inputs?
88865bd8deadSopenharmony_ci
88875bd8deadSopenharmony_ci        RESOLVED:  Yes, assuming separate shader objects support.
88885bd8deadSopenharmony_ci        The ARB_separate_shader_objects functionality (made core in
88895bd8deadSopenharmony_ci        OpenGL 4.1) supports layout qualifiers to annotate locations on
88905bd8deadSopenharmony_ci        arbitrary fragment shader inputs.
88915bd8deadSopenharmony_ci
88925bd8deadSopenharmony_ci        Example: A fragment shader could include the statement:
88935bd8deadSopenharmony_ci
88945bd8deadSopenharmony_ci            layout(location=4) in vec4 eye_space;
88955bd8deadSopenharmony_ci
88965bd8deadSopenharmony_ci        This would ensure that the location queried with
88975bd8deadSopenharmony_ci        GetProgramResourceLocation(program, GL_FRAGMENT_INPUT_NV,
88985bd8deadSopenharmony_ci        "eye_space") will return 4.
88995bd8deadSopenharmony_ci
89005bd8deadSopenharmony_ci   136. What data types work with glProgramPathFragmentInputGenNV?
89015bd8deadSopenharmony_ci
89025bd8deadSopenharmony_ci        RESOLVED:  Just floating-point scalars and vectors.
89035bd8deadSopenharmony_ci
89045bd8deadSopenharmony_ci        Half-precision and double-precision varyings considered
89055bd8deadSopenharmony_ci        floating-point, and hence are allowed, but implementations may
89065bd8deadSopenharmony_ci        interpolate double-precision at single-precision.
89075bd8deadSopenharmony_ci
89085bd8deadSopenharmony_ci        Matrix, array, structure, boolean, and integer data types are
89095bd8deadSopenharmony_ci        not supported.
89105bd8deadSopenharmony_ci
89115bd8deadSopenharmony_ci        Generated values are intrinsically floating-point (they are
89125bd8deadSopenharmony_ci        basically interpolants) hence the floating-point restriction.
89135bd8deadSopenharmony_ci
89145bd8deadSopenharmony_ci        Restricting the generation to floating-point scalars and vectors
89155bd8deadSopenharmony_ci        shouldn't be a hardship.
89165bd8deadSopenharmony_ci
89175bd8deadSopenharmony_ci   137. How can a fragment varying (or fragment input for GLSL) be driven
89185bd8deadSopenharmony_ci        to a constant value?
89195bd8deadSopenharmony_ci
89205bd8deadSopenharmony_ci        RESOLVED:  Use the GL_CONSTANT genMode for this.
89215bd8deadSopenharmony_ci
89225bd8deadSopenharmony_ci        Example:  This command:
89235bd8deadSopenharmony_ci
89245bd8deadSopenharmony_ci            GLfloat float4_constant[4] = { 1, 2, 3, 4 };
89255bd8deadSopenharmony_ci            glPathTexGenNV(GL_TEXTURE0, GL_CONSTANT, 4, float4_constant);
89265bd8deadSopenharmony_ci
89275bd8deadSopenharmony_ci        is equivalent to:
89285bd8deadSopenharmony_ci
89295bd8deadSopenharmony_ci            GLfloat coefficients[3*4] = { 0,0,1, 0,0,2, 0,0,3, 0,0,4 };
89305bd8deadSopenharmony_ci            glPathTexGenNV(GL_TEXTURE0, GL_OBJECT_LINEAR, 4, coefficients);
89315bd8deadSopenharmony_ci
89325bd8deadSopenharmony_ci        In the latter form, the zeros in the coefficients array would be
89335bd8deadSopenharmony_ci        multiplied by the object-space X and Y so would always evaluate
89345bd8deadSopenharmony_ci        (s,t,r,q) to (1,2,3,4) just as the former GL_CONSTANT version
89355bd8deadSopenharmony_ci        would.
89365bd8deadSopenharmony_ci
89375bd8deadSopenharmony_ci        GL_CONSTANT also works with glPathColorGenNV and
89385bd8deadSopenharmony_ci        glProgramPathFragmentInputGenNV.
89395bd8deadSopenharmony_ci
89405bd8deadSopenharmony_ci   138. What happens to fragment inputs that are not configured by
89415bd8deadSopenharmony_ci        glProgramPathFragmentInputGenNV?
89425bd8deadSopenharmony_ci
89435bd8deadSopenharmony_ci        RESOLVED:  Such variables are forced to constant zero.
89445bd8deadSopenharmony_ci
89455bd8deadSopenharmony_ci        The default genMode is GL_NONE and this results in a fragment
89465bd8deadSopenharmony_ci        input outputting sc, tc, rc, and qc for its first, second,
89475bd8deadSopenharmony_ci        third, and fourth components respectively.  These values
89485bd8deadSopenharmony_ci        are all zero in the case of fragment input generation with
89495bd8deadSopenharmony_ci        glProgramPathFragmentInputGenNV (whereas with glPathTexGenNV,
89505bd8deadSopenharmony_ci        they take on the value of the respective texture coordinate
89515bd8deadSopenharmony_ci        set's current values).
89525bd8deadSopenharmony_ci
89535bd8deadSopenharmony_ci   139. The fragment input generation state includes floating-point coefficients
89545bd8deadSopenharmony_ci        but the ARB_program_interface_query extension provides no way
89555bd8deadSopenharmony_ci        to query floating-point state so how can this state be queried?
89565bd8deadSopenharmony_ci
89575bd8deadSopenharmony_ci        RESOLVED:  This extension adds glProgramResourceIndexfvNV to
89585bd8deadSopenharmony_ci        allow floating-point program resource state to be queried.
89595bd8deadSopenharmony_ci
89605bd8deadSopenharmony_ci   140. Can a program object with a vertex shader be used to cover paths?
89615bd8deadSopenharmony_ci
89625bd8deadSopenharmony_ci        RESOLVED:  Yes.
89635bd8deadSopenharmony_ci
89645bd8deadSopenharmony_ci   141. Is there a technical explanation of this extension beyond the
89655bd8deadSopenharmony_ci        specification itself?
89665bd8deadSopenharmony_ci
89675bd8deadSopenharmony_ci        RESOLVED:  Yes, check out the SIGGRAPH Asia 2012 paper
89685bd8deadSopenharmony_ci        "GPU-accelerated Path Rendering":
89695bd8deadSopenharmony_ci
89705bd8deadSopenharmony_ci           https://dl.acm.org/citation.cfm?id=2366145.2366191
89715bd8deadSopenharmony_ci           http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/opengl/gpupathrender.pdf
89725bd8deadSopenharmony_ci
89735bd8deadSopenharmony_ci        There is an accompanying annex to this paper titled "Programming
89745bd8deadSopenharmony_ci        NV_path_rendering":
89755bd8deadSopenharmony_ci
89765bd8deadSopenharmony_ci            http://developer.nvidia.com/sites/default/files/akamai/gamedev/files/nvpr_annex.pdf
89775bd8deadSopenharmony_ci
89785bd8deadSopenharmony_ci   142. Should conic sections (rational quadratic Bezier segments) be supported?
89795bd8deadSopenharmony_ci
89805bd8deadSopenharmony_ci        RESOLVED:  Yes, Skia supports these.
89815bd8deadSopenharmony_ci
89825bd8deadSopenharmony_ci        The GL_CONIC_CURVE_TO_NV and GL_RELATIVE_CONIC_CURVE_TO_NV path
89835bd8deadSopenharmony_ci        commands take five path coordinates:
89845bd8deadSopenharmony_ci
89855bd8deadSopenharmony_ci           x1,y1, x2,y2, w
89865bd8deadSopenharmony_ci
89875bd8deadSopenharmony_ci        The first two pairs of coordinates are control points similar to
89885bd8deadSopenharmony_ci        the GL_QUADRATIC_CURVE_TO_NV and GL_RELATIVE_QUADRATIC_CURVE_TO_NV
89895bd8deadSopenharmony_ci        path commands.  The fifth coordinate "w" is a homogeneous coordinate
89905bd8deadSopenharmony_ci        that applies to the middle (extrapolating) control point.
89915bd8deadSopenharmony_ci
89925bd8deadSopenharmony_ci        Skia parameterizes its SkPath::kConic_Verb conic curve path
89935bd8deadSopenharmony_ci        command in the same manner.  (See Skia's SkConic class in
89945bd8deadSopenharmony_ci        skia/include/core/SkGeometry.h for details.)
89955bd8deadSopenharmony_ci
89965bd8deadSopenharmony_ci        When the "w" is 1.0, the behavior of the GL_CONIC_CURVE_TO_NV and
89975bd8deadSopenharmony_ci        GL_RELATIVE_CONIC_CURVE_TO_NV commands behave identically to the
89985bd8deadSopenharmony_ci        GL_QUADRATIC_CURVE_TO_NV and GL_RELATIVE_QUADRATIC_CURVE_TO_NV
89995bd8deadSopenharmony_ci        commands respectively; this case corresponds to a parabolic segment.
90005bd8deadSopenharmony_ci
90015bd8deadSopenharmony_ci        When "w" is less than 1.0, the resulting conic is a partial
90025bd8deadSopenharmony_ci        elliptical arc.  When "w" is greater than 1.0, the resulting
90035bd8deadSopenharmony_ci        conic is a hyperbolic arc.
90045bd8deadSopenharmony_ci
90055bd8deadSopenharmony_ci        See Table 5.pathEquations (Path Equations) for the specific
90065bd8deadSopenharmony_ci        rational quadratic Bezier equations for the GL_CONIC_CURVE_TO_NV
90075bd8deadSopenharmony_ci        and GL_RELATIVE_CONIC_CURVE_TO_NV path commands.
90085bd8deadSopenharmony_ci
90095bd8deadSopenharmony_ci        The GL_RELATIVE_CONIC_CURVE_TO_NV path command is not supported
90105bd8deadSopenharmony_ci        by Skia but is trivial to support and maintains a symmetry that
90115bd8deadSopenharmony_ci        general-purpose path commands should have relative versions.
90125bd8deadSopenharmony_ci
90135bd8deadSopenharmony_ci   143. What happens when the "w" (5th coordinate) of a conic section
90145bd8deadSopenharmony_ci        path command is non-positive?
90155bd8deadSopenharmony_ci
90165bd8deadSopenharmony_ci        RESOLVED:  Match Skia's behavior and treat the path command as
90175bd8deadSopenharmony_ci        a line segment from the current control point to the interpolating
90185bd8deadSopenharmony_ci        control point (x2,y2).
90195bd8deadSopenharmony_ci
90205bd8deadSopenharmony_ci        At the limit when w nears zero, partial elliptical arcs would
90215bd8deadSopenharmony_ci        become a line segment.
90225bd8deadSopenharmony_ci
90235bd8deadSopenharmony_ci   144. Should "smooth" conic sections be supported similar to
90245bd8deadSopenharmony_ci        GL_SMOOTH_QUADRATIC_CURVE_TO_NV?
90255bd8deadSopenharmony_ci
90265bd8deadSopenharmony_ci        RESOLVED:  No.  Conceptually, there's no problem supporting
90275bd8deadSopenharmony_ci        smooth conic sections, however no standard supports smooth conic
90285bd8deadSopenharmony_ci        sections to justify the feature.
90295bd8deadSopenharmony_ci
90305bd8deadSopenharmony_ci   145. Should there be a "Character alias" for the absolute and relative
90315bd8deadSopenharmony_ci        conic curve commands?
90325bd8deadSopenharmony_ci
90335bd8deadSopenharmony_ci        RESOLVED:  Yes, "W" for GL_CONIC_CURVE_TO_NV and "w" for
90345bd8deadSopenharmony_ci        GL_RELATIVE_CONIC_CURVE_TO_NV are appropriate.
90355bd8deadSopenharmony_ci
90365bd8deadSopenharmony_ci   146. Should there be a rational cubic path command?
90375bd8deadSopenharmony_ci
90385bd8deadSopenharmony_ci        RESOLVED:  No way!
90395bd8deadSopenharmony_ci
90405bd8deadSopenharmony_ci        Rational cubic segments are subject to topological transitions
90415bd8deadSopenharmony_ci        when transformed projectively (as is possible when a path is
90425bd8deadSopenharmony_ci        transformed by the--potentially projective--modelview-projection
90435bd8deadSopenharmony_ci        transform!).
90445bd8deadSopenharmony_ci
90455bd8deadSopenharmony_ci   147. Why are rounded rectangles supported?
90465bd8deadSopenharmony_ci
90475bd8deadSopenharmony_ci        RESOLVED:  Rounded rectangles are popular in web content.  The W3C's
90485bd8deadSopenharmony_ci        "CSS Backgrounds and Borders Module Level 3" candidate recommendation
90495bd8deadSopenharmony_ci        specifies rounded rectangles and they are popular in web content.
90505bd8deadSopenharmony_ci
90515bd8deadSopenharmony_ci            http://www.w3.org/TR/css3-background/
90525bd8deadSopenharmony_ci
90535bd8deadSopenharmony_ci        Native paths commands for rounded rectangles allow such content
90545bd8deadSopenharmony_ci        to be specified and rasterized with less overhead than comparable
90555bd8deadSopenharmony_ci        specification of the same path with multiple line and arc (or
90565bd8deadSopenharmony_ci        conic) commands.
90575bd8deadSopenharmony_ci
90585bd8deadSopenharmony_ci            http://www.w3.org/TR/css3-background/#corners
90595bd8deadSopenharmony_ci
90605bd8deadSopenharmony_ci   148. Should multiple parameterization for rounded rectangles be
90615bd8deadSopenharmony_ci        supported?
90625bd8deadSopenharmony_ci
90635bd8deadSopenharmony_ci        RESOLVED:  Yes.
90645bd8deadSopenharmony_ci
90655bd8deadSopenharmony_ci        Both circular and elliptical corners are supported with either
90665bd8deadSopenharmony_ci        uniform (all corners have the same x- and y-axis radii) or
90675bd8deadSopenharmony_ci        per-corner radii.
90685bd8deadSopenharmony_ci
90695bd8deadSopenharmony_ci        Also relative and absolute versions are supported (including
90705bd8deadSopenharmony_ci        adding an absolute version of GL_RECT_NV for completeness).
90715bd8deadSopenharmony_ci
90725bd8deadSopenharmony_ci   149. Should negative x, y, width, height, and radii parameters be allowed
90735bd8deadSopenharmony_ci        for rectangles and rounded rectangles?
90745bd8deadSopenharmony_ci
90755bd8deadSopenharmony_ci        RESOLVED:  Yes.  The formulas operate reasonably with negative values.
90765bd8deadSopenharmony_ci
90775bd8deadSopenharmony_ci        Negative values allow the winding order to be reversed.
90785bd8deadSopenharmony_ci
90795bd8deadSopenharmony_ci        GL_RECT_NV already allowed negative values.
90805bd8deadSopenharmony_ci
90815bd8deadSopenharmony_ci   150. Should the "stencil" and "cover" path operations be combined
90825bd8deadSopenharmony_ci        into a single command?
90835bd8deadSopenharmony_ci
90845bd8deadSopenharmony_ci        RESOLVED:  Yes, these commands are commonly used in sequence and
90855bd8deadSopenharmony_ci        profiling shows combining the commands can provide a small but
90865bd8deadSopenharmony_ci        measurable CPU efficiency benefit by reducing name translation,
90875bd8deadSopenharmony_ci        object locking overhead, and error checking.
90885bd8deadSopenharmony_ci        See the commands:
90895bd8deadSopenharmony_ci
90905bd8deadSopenharmony_ci            glStencilThenCoverFillPathNV
90915bd8deadSopenharmony_ci            glStencilThenCoverStrokePathNV
90925bd8deadSopenharmony_ci
90935bd8deadSopenharmony_ci        These commands are specified to behave like a "stencil" command
90945bd8deadSopenharmony_ci        on a path followed immediately by a "cover" command on the same
90955bd8deadSopenharmony_ci        path.
90965bd8deadSopenharmony_ci
90975bd8deadSopenharmony_ci        There are also instanced versions:
90985bd8deadSopenharmony_ci
90995bd8deadSopenharmony_ci            glStencilThenCoverFillPathInstancedNV
91005bd8deadSopenharmony_ci            glStencilThenCoverStrokePathInstancedNV
91015bd8deadSopenharmony_ci
91025bd8deadSopenharmony_ci        These commands can be display listed.
91035bd8deadSopenharmony_ci
91045bd8deadSopenharmony_ci        Indeed, one advantage of the Instanced versions of the
91055bd8deadSopenharmony_ci        glStencilThenCover* commands is the instanced array can be copied
91065bd8deadSopenharmony_ci        into the display list once.  While a display list optimizer
91075bd8deadSopenharmony_ci        could recognize this same benefit, it is simpler to be explicit
91085bd8deadSopenharmony_ci        that there is a single set of transform values used by both the
91095bd8deadSopenharmony_ci        instanced "stencil" and "cover" operations.
91105bd8deadSopenharmony_ci
91115bd8deadSopenharmony_ci   151. Should there be a way to get glyph indices for a particular font face
91125bd8deadSopenharmony_ci        to perform advanced text shaping?
91135bd8deadSopenharmony_ci
91145bd8deadSopenharmony_ci        RESOLVED:  Yes, see glPathGlyphIndexArrayNV,
91155bd8deadSopenharmony_ci        glPathMemoryGlyphIndexArrayNV, and glPathGlyphIndexRangeNV.
91165bd8deadSopenharmony_ci
91175bd8deadSopenharmony_ci        Advanced text shaping APIs such as HarfBuzz and Pango generate
91185bd8deadSopenharmony_ci        combine text with a font face and provide a sequence of glyph
91195bd8deadSopenharmony_ci        indices with corresponding positions to render the text.
91205bd8deadSopenharmony_ci
91215bd8deadSopenharmony_ci        Mozilla and Google have both confirmed the requirement for this.
91225bd8deadSopenharmony_ci
91235bd8deadSopenharmony_ci        Advanced text shaping requires more knowledge of scripts and
91245bd8deadSopenharmony_ci        font metrics than can be expressed through NV_path_rendering.
91255bd8deadSopenharmony_ci        There is no interest to attempt, or even try to attempt, exposing
91265bd8deadSopenharmony_ci        sufficient font metrics for advanced text shaping.  Instead
91275bd8deadSopenharmony_ci        the presumption is that one or more higher-level libraries
91285bd8deadSopenharmony_ci        (e.g. HarfBuzz + FreeType 2) are used to perform text shaping.
91295bd8deadSopenharmony_ci
91305bd8deadSopenharmony_ci        While glGetPathSpacingNV is useful and sufficient for providing
91315bd8deadSopenharmony_ci        basic kerning of Latin and other common scripts, but is
91325bd8deadSopenharmony_ci        well-understood to be insufficient for advanced text shaping.
91335bd8deadSopenharmony_ci
91345bd8deadSopenharmony_ci   152. Should glPathGlyphIndexRangeNV take the range of path objects
91355bd8deadSopenharmony_ci        as a parameter or return the base & count of path names created
91365bd8deadSopenharmony_ci        from the specified font's glyph indices?
91375bd8deadSopenharmony_ci
91385bd8deadSopenharmony_ci        RESOLVED:  glPathGlyphIndexRangeNV operates like glGenPathsNV
91395bd8deadSopenharmony_ci        to first get an unassigned range of path object names based on
91405bd8deadSopenharmony_ci        the number of glyph indices in the font face.  Then specifies
91415bd8deadSopenharmony_ci        the path object for every glyph index.
91425bd8deadSopenharmony_ci
91435bd8deadSopenharmony_ci        This requires returning a pair of GLuint values for the base
91445bd8deadSopenharmony_ci        and count.  Additionally there is a return value to indicate
91455bd8deadSopenharmony_ci        whether and, if not why not, the path objects for the glyphs
91465bd8deadSopenharmony_ci        are assigned and specified.
91475bd8deadSopenharmony_ci
91485bd8deadSopenharmony_ci   153. Why were glPathGlyphIndexArrayNV and glPathMemoryGlyphIndexArrayNV
91495bd8deadSopenharmony_ci        added?
91505bd8deadSopenharmony_ci
91515bd8deadSopenharmony_ci        RESOLVED:  Web browsers such as Chrome and other applications
91525bd8deadSopenharmony_ci        relying on glyph indices rely on arranging glyph indices of
91535bd8deadSopenharmony_ci        several fonts together so controlling the order of glyph index
91545bd8deadSopenharmony_ci        arrangement proves important.  glPathGlyphIndexRangeNV returns
91555bd8deadSopenharmony_ci        a dynamically allocated range (implicitly using glGenPathsNV)
91565bd8deadSopenharmony_ci        and this proved not well-suited for actual use of glyph indices.
91575bd8deadSopenharmony_ci
91585bd8deadSopenharmony_ci   154. Why glPathMemoryGlyphIndexArrayNV added?
91595bd8deadSopenharmony_ci
91605bd8deadSopenharmony_ci        RESOLVED: Also web sites today very often provide server-supplied
91615bd8deadSopenharmony_ci        fonts via the Web Open Font Format (WOFF) standard.  This means
91625bd8deadSopenharmony_ci        fonts are provided by font representations in system memory
91635bd8deadSopenharmony_ci        rather than accessed by file name or system font name.
91645bd8deadSopenharmony_ci
91655bd8deadSopenharmony_ci   155. Why is GL_FONT_NUM_GLYPH_INDICES_NV added?
91665bd8deadSopenharmony_ci
91675bd8deadSopenharmony_ci        RESOLVED:  This is a relevant per-font parameter that is useful
91685bd8deadSopenharmony_ci        to ensure that glyphs used by glyph index know the proper bounds
91695bd8deadSopenharmony_ci        on the glyph indices.
91705bd8deadSopenharmony_ci
91715bd8deadSopenharmony_ci        This per-font parameter is an integer so is not scaled by the
91725bd8deadSopenharmony_ci        emScale.
91735bd8deadSopenharmony_ci
91745bd8deadSopenharmony_ci   156. Why does glPathMemoryGlyphIndexArrayNV take a face index?
91755bd8deadSopenharmony_ci
91765bd8deadSopenharmony_ci        RESOLVED:  Implementations are likely to use FreeType 2's
91775bd8deadSopenharmony_ci        FT_New_Memory_Face to implement this functionality.  The first
91785bd8deadSopenharmony_ci        face index is zero so normally zero should be passed for the
91795bd8deadSopenharmony_ci        face index.
91805bd8deadSopenharmony_ci
91815bd8deadSopenharmony_ci   157. If a face index for glPathMemoryGlyphIndexArrayNV corresponds to
91825bd8deadSopenharmony_ci        a bitmap font or otherwise isn't suitable for providing path
91835bd8deadSopenharmony_ci        objects, what happens?
91845bd8deadSopenharmony_ci
91855bd8deadSopenharmony_ci        UNRESOLVED:  Probably GL_FONT_UNINTELLIGIBLE_NV should be
91865bd8deadSopenharmony_ci        returned.
91875bd8deadSopenharmony_ci
91885bd8deadSopenharmony_ci   158. Is glyph index zero special?
91895bd8deadSopenharmony_ci
91905bd8deadSopenharmony_ci        RESOLVED:  According to SNFT conventions, glyph index zero
91915bd8deadSopenharmony_ci        corresponds to the font face's missing glyph.  Therefore at
91925bd8deadSopenharmony_ci        least once glyph outline should always exist.
91935bd8deadSopenharmony_ci
91945bd8deadSopenharmony_ci   159. Why as GL_FONT_CORRUPT_NV renamed to GL_FONT_UNINTELLIGIBLE_NV?
91955bd8deadSopenharmony_ci
91965bd8deadSopenharmony_ci        RESOLVED:  Because it is hard to distinguish between a font being
91975bd8deadSopenharmony_ci        corrupt and simply not being supported by the implementation.
91985bd8deadSopenharmony_ci        Unintelligible is less misleading and more honest about the
91995bd8deadSopenharmony_ci        situation.
92005bd8deadSopenharmony_ci
92015bd8deadSopenharmony_ci   160. Are there alternatives to STANDARD_FONT_FORMAT_NV?
92025bd8deadSopenharmony_ci
92035bd8deadSopenharmony_ci        RESOLVED:  Not currently.  There might be a need in the future
92045bd8deadSopenharmony_ci        to identify fonts or glyph outlines with some other token if
92055bd8deadSopenharmony_ci        the font does use the SNFT format.  PostScript, TrueType, and
92065bd8deadSopenharmony_ci        OpenType font formats are all SNFT formats.  The Web Open Font
92075bd8deadSopenharmony_ci        Format should be supportable too because it contains a magic
92085bd8deadSopenharmony_ci        number with which to identify the format of the binary data.
92095bd8deadSopenharmony_ci
92105bd8deadSopenharmony_ci   161. Is the memory provided by glPathMemoryGlyphIndexArrayNV referenced
92115bd8deadSopenharmony_ci        after the command is issued?
92125bd8deadSopenharmony_ci
92135bd8deadSopenharmony_ci        RESOLVED:  No.  The GL implementation is responsible for copying
92145bd8deadSopenharmony_ci        from the system memory buffer provided.  This likely requires
92155bd8deadSopenharmony_ci        copying the entire buffer.
92165bd8deadSopenharmony_ci
92175bd8deadSopenharmony_ci        (Perhaps another font target to allowed referenced access to the
92185bd8deadSopenharmony_ci        font data may be a good idea though it would likely require all
92195bd8deadSopenharmony_ci        path objects specified by glPathMemoryGlyphIndexArrayNV to be
92205bd8deadSopenharmony_ci        deleted before freeing the memory.  Referencing client system
92215bd8deadSopenharmony_ci        memory is generally considered taboo for GL implementations
92225bd8deadSopenharmony_ci        beyond the duration of a GL command or query's execution however.
92235bd8deadSopenharmony_ci        Copying the buffer avoids any ambiguity and provides for reliable
92245bd8deadSopenharmony_ci        operation, tracing, and network extensibility.)
92255bd8deadSopenharmony_ci
92265bd8deadSopenharmony_ci   162. What if glPathGlyphIndexArrayNV or glPathMemoryGlyphIndexArrayNV
92275bd8deadSopenharmony_ci        attempt to specify more path objects than the font supports
92285bd8deadSopenharmony_ci        glyph indices?
92295bd8deadSopenharmony_ci
92305bd8deadSopenharmony_ci        RESOLVED:  Path objects that would correspond to glyph indices
92315bd8deadSopenharmony_ci        that are beyond the maximum glyph index in the font face are
92325bd8deadSopenharmony_ci        not disturbed.
92335bd8deadSopenharmony_ci
92345bd8deadSopenharmony_ci        For example, if a font face contains 258 glyph indices, but
92355bd8deadSopenharmony_ci        the numGlyphs parameter to glPathGlyphIndexArrayNV is 300, the
92365bd8deadSopenharmony_ci        command silently acts as if 258 glyph indices were requested.
92375bd8deadSopenharmony_ci        No GL error is generated in this case.  Also the path objects
92385bd8deadSopenharmony_ci        named firstPathName+258 and beyond are not disturbed.
92395bd8deadSopenharmony_ci
92405bd8deadSopenharmony_ci        The rationale for this behavior is to avoid needless errors or
92415bd8deadSopenharmony_ci        complexity if an application overestimates the number of glyph
92425bd8deadSopenharmony_ci        indices a font has.
92435bd8deadSopenharmony_ci
92445bd8deadSopenharmony_ci   163. What concrete reasons might GL_FONT_TARGET_UNAVAILABLE_NV be
92455bd8deadSopenharmony_ci        generated?
92465bd8deadSopenharmony_ci
92475bd8deadSopenharmony_ci        RESOLVED:  Here are some situations...
92485bd8deadSopenharmony_ci
92495bd8deadSopenharmony_ci        The Win32 API lacks a way to load a font from a file name.
92505bd8deadSopenharmony_ci        If FreeType 2 is unavailable (say its DLL is missing or
92515bd8deadSopenharmony_ci        the GL implementation simply does not support it), this
92525bd8deadSopenharmony_ci        would cause use of the GL_FILE_NAME_NV target to return
92535bd8deadSopenharmony_ci        GL_FONT_TARGET_UNAVAILABLE_NV.
92545bd8deadSopenharmony_ci
92555bd8deadSopenharmony_ci        Linux implementations for the X Window System are likely to use
92565bd8deadSopenharmony_ci        FontConfig to map system font names (such as "Arial") to some
92575bd8deadSopenharmony_ci        font file.  If the FontConfig shared library is unavailable,
92585bd8deadSopenharmony_ci        cannot be initialized, is a very old version, or its configuration
92595bd8deadSopenharmony_ci        files are missing or corrupt, the GL_SYSTEM_FONT_NAME_NV font
92605bd8deadSopenharmony_ci        target could return GL_FONT_TARGET_UNAVAILABLE_NV.
92615bd8deadSopenharmony_ci
92625bd8deadSopenharmony_ci        These situations are possible and so applications should
92635bd8deadSopenharmony_ci        anticipate that GL_FONT_TARGET_UNAVAILABLE_NV might be returned
92645bd8deadSopenharmony_ci        but properly configured systems should not be returning this
92655bd8deadSopenharmony_ci        value.  Developers debugging this condition should check
92665bd8deadSopenharmony_ci        ARB_debug_output messages for an explanation.
92675bd8deadSopenharmony_ci
92685bd8deadSopenharmony_ci   164. What path glyph specification commands support which font targets?
92695bd8deadSopenharmony_ci
92705bd8deadSopenharmony_ci        RESOLVED:
92715bd8deadSopenharmony_ci
92725bd8deadSopenharmony_ci        The FILE_NAME_NV, SYSTEM_FONT_NAME_NV, and STANDARD_FONT_NAME_NV
92735bd8deadSopenharmony_ci        font targets are for glPathGlyphsNV and glPathGlyphRangeNV.
92745bd8deadSopenharmony_ci
92755bd8deadSopenharmony_ci        The FILE_NAME_NV and SYSTEM_FONT_NAME_NV font targets are for
92765bd8deadSopenharmony_ci        glPathGlyphsNV, glPathGlyphRangeNV, glPathGlyphIndexArrayNV,
92775bd8deadSopenharmony_ci        and glPathGlyphIndexRangeNV.  STANARD_FONT_NAME_NV does not
92785bd8deadSopenharmony_ci        apply to these commands because standard font name support
92795bd8deadSopenharmony_ci        Unicode character point access to glyphs but not glyph indices.
92805bd8deadSopenharmony_ci
92815bd8deadSopenharmony_ci        The STANDARD_FONT_FORMAT_NV font target is just for the
92825bd8deadSopenharmony_ci        glPathMemoryGlyphIndexArrayNV command.
92835bd8deadSopenharmony_ci
92845bd8deadSopenharmony_ci   165. Why is the GL_PATH_STROKE_BOUND_NV parameter supported?
92855bd8deadSopenharmony_ci
92865bd8deadSopenharmony_ci        RESOLVED:  The path's stroke approximation bound helps the
92875bd8deadSopenharmony_ci        GL implementation and an application bound the amount of
92885bd8deadSopenharmony_ci        approximation error allowed when cubic Bezier path segments or
92895bd8deadSopenharmony_ci        partial elliptical arcs are stenciled.
92905bd8deadSopenharmony_ci
92915bd8deadSopenharmony_ci        Theory for offset curves indicates determining if a point is
92925bd8deadSopenharmony_ci        within a given offset of a cubic Bezier curve (the generating
92935bd8deadSopenharmony_ci        curve for the offset curve) amounts to solving a 5th degree
92945bd8deadSopenharmony_ci        polynomial equation.  That is not tractable in real-time graphics
92955bd8deadSopenharmony_ci        so some approximation of the actual offset curve is assumed.
92965bd8deadSopenharmony_ci
92975bd8deadSopenharmony_ci        By comparison solve the point containment problem for a sample
92985bd8deadSopenharmony_ci        position with respect to the offset curve of a quadratic Bezier
92995bd8deadSopenharmony_ci        segment requires solving only a 3rd degree polynomial which is
93005bd8deadSopenharmony_ci        tractable for modern GPUs.  The assumption here is that stroke
93015bd8deadSopenharmony_ci        point containment with respect to quadratic Bezier segments
93025bd8deadSopenharmony_ci        and linear segments, as well as capping and join geometry, can
93035bd8deadSopenharmony_ci        be tractably solved without analytical approximation (though
93045bd8deadSopenharmony_ci        numerical issues may still limit the accuracy at the limits of
93055bd8deadSopenharmony_ci        available numerical precision).
93065bd8deadSopenharmony_ci
93075bd8deadSopenharmony_ci        With this in mind, there should be some intuitive bound on
93085bd8deadSopenharmony_ci        the approximation error allowed.  The GL_PATH_STROKE_BOUND_NV
93095bd8deadSopenharmony_ci        path parameter provides such an intuitive limit expressed as a
93105bd8deadSopenharmony_ci        percentage of the path's stroke width.
93115bd8deadSopenharmony_ci
93125bd8deadSopenharmony_ci   166. Should the radii passed to the GL_ROUNDED_RECT*_NV and
93135bd8deadSopenharmony_ci        GL_RELATIVE_ROUNDED_RECT*_NV support negative values?
93145bd8deadSopenharmony_ci
93155bd8deadSopenharmony_ci        RESOLVED:  Yes.
93165bd8deadSopenharmony_ci
93175bd8deadSopenharmony_ci        However, the x or y radii are negated if the width or height
93185bd8deadSopenharmony_ci        respectively is negative.  This behavior ensures that a rectangle
93195bd8deadSopenharmony_ci        with reversed winding can be specified (useful for cutting out
93205bd8deadSopenharmony_ci        rounded rectangular "holes" in paths) by simply flipping the
93215bd8deadSopenharmony_ci        width or height sign while leaving the radii values positive.
93225bd8deadSopenharmony_ci
93235bd8deadSopenharmony_ci        The use of the /sign/ function in the specification of the /rrect/
93245bd8deadSopenharmony_ci        function enforces this behavior.
93255bd8deadSopenharmony_ci
93265bd8deadSopenharmony_ci        This is important because the GL_ROUNDED_RECT_NV and
93275bd8deadSopenharmony_ci        GL_ROUNDED_RECT4_NV (and relative versions) specify a single
93285bd8deadSopenharmony_ci        circular radius per-rectangle or per-corner respectively without
93295bd8deadSopenharmony_ci        providing an x & y radii.  Without the /sign/ terms, it would
93305bd8deadSopenharmony_ci        not be possible to use the these commands and specify a reverse
93315bd8deadSopenharmony_ci        winding rounded rectangle.
93325bd8deadSopenharmony_ci
93335bd8deadSopenharmony_ci        Still negative values are allowed for the radii and the formula
93345bd8deadSopenharmony_ci        should be applied as specified.  Negative radii permit "fins"
93355bd8deadSopenharmony_ci        and "crossed roundings" to be added rounded rectangles.
93365bd8deadSopenharmony_ci
93375bd8deadSopenharmony_ci   167. Should CLOSE_PATH_NV count as specifying the start position
93385bd8deadSopenharmony_ci        (sp) for the purposes of determining if the PostScript path
93395bd8deadSopenharmony_ci        commands CIRCULAR_CCW_ARC_TO_NV or CIRCULAR_CW_ARC_TO_NV should
93405bd8deadSopenharmony_ci        change sp to ncp?
93415bd8deadSopenharmony_ci
93425bd8deadSopenharmony_ci        RESOLVED:  No.  The PostScript semantic appears to be that
93435bd8deadSopenharmony_ci        a CLOSE_PATH_NV does not set the "current point" to valid.
93445bd8deadSopenharmony_ci        This is based on inspection of Ghostscript behavior.
93455bd8deadSopenharmony_ci
93465bd8deadSopenharmony_ci        For this reason, the "other than CLOSE_PATH_NV" phrase is placed
93475bd8deadSopenharmony_ci        in the paragraph describing how when these PostScript arc commands
93485bd8deadSopenharmony_ci        change sp.
93495bd8deadSopenharmony_ci
93505bd8deadSopenharmony_ci   168. What is the initial glProgramPathFragmentInputGenNV state for all
93515bd8deadSopenharmony_ci        fragment inputs?
93525bd8deadSopenharmony_ci
93535bd8deadSopenharmony_ci        RESOLVED:  See the "Program Object Resource State" table.
93545bd8deadSopenharmony_ci
93555bd8deadSopenharmony_ci        The GL_PATH_GEN_MODE_NV initial state for every fragment program
93565bd8deadSopenharmony_ci        resource is GL_NONE.
93575bd8deadSopenharmony_ci
93585bd8deadSopenharmony_ci        The GL_PATH_GEN_COMPONENTS_NV initial state is zero for the
93595bd8deadSopenharmony_ci        number of path fragment input components.
93605bd8deadSopenharmony_ci
93615bd8deadSopenharmony_ci        The sixteen PATH_GEN_COEFF_NV coefficient values are initially
93625bd8deadSopenharmony_ci        all zero.
93635bd8deadSopenharmony_ci
93645bd8deadSopenharmony_ci   169. If glGetProgramResourceiv or glGetProgramResourcefvNV are used on
93655bd8deadSopenharmony_ci        fragment program resources that are not floating-point scalars
93665bd8deadSopenharmony_ci        are vectors, what happens?
93675bd8deadSopenharmony_ci
93685bd8deadSopenharmony_ci        RESOLVED:  While glProgramPathFragmentInputGenNV cannot be used to
93695bd8deadSopenharmony_ci        change such program resources, their state can be queried but
93705bd8deadSopenharmony_ci        simply always returns the intial values.
93715bd8deadSopenharmony_ci
93725bd8deadSopenharmony_ci        The rationale for this is that implementations already have
93735bd8deadSopenharmony_ci        to return the initial state for fragment inputs that have
93745bd8deadSopenharmony_ci        not yet been specified.  Also the ARB_program_interface_query
93755bd8deadSopenharmony_ci        specification specifies returning innocuous or invalid
93765bd8deadSopenharmony_ci        information in preference to generating errors when the query
93775bd8deadSopenharmony_ci        does not apply to the program resource.
93785bd8deadSopenharmony_ci
93795bd8deadSopenharmony_ci        Always writing back some data in the absence of an error also
93805bd8deadSopenharmony_ci        makes it easier to notice buffer overflow errors since they are
93815bd8deadSopenharmony_ci        not skipped when GL errors are generated.
93825bd8deadSopenharmony_ci
93835bd8deadSopenharmony_ci        Note that an error *should* be generated by
93845bd8deadSopenharmony_ci        glGetProgramResourceiv and glGetProgramResourcefvNV if
93855bd8deadSopenharmony_ci        GL_PATH_GEN_*_NV queries are performed on a programInterface
93865bd8deadSopenharmony_ci        other than GL_FRAGMENT_INPUT_NV.
93875bd8deadSopenharmony_ci
93885bd8deadSopenharmony_ci   170. Should we allow fragment input generation on half and double
93895bd8deadSopenharmony_ci        precision GLSL attributes?
93905bd8deadSopenharmony_ci
93915bd8deadSopenharmony_ci        RESOLVED:  No, just single-precision fragment inputs can be
93925bd8deadSopenharmony_ci        generated.
93935bd8deadSopenharmony_ci
93945bd8deadSopenharmony_ci        Double-precision attributes only support flat interpolation and
93955bd8deadSopenharmony_ci        that makes no sense for paths.
93965bd8deadSopenharmony_ci
93975bd8deadSopenharmony_ci        Half-precision attributes could be supported but have
93985bd8deadSopenharmony_ci        no particular advantage on NVIDIA GPUs as half-precision
93995bd8deadSopenharmony_ci        interpolation actually happens in single-precision anyway.
94005bd8deadSopenharmony_ci
94015bd8deadSopenharmony_ci        glProgramPathFragmentInputGenNV generates GL_INVALID_OPERATION when
94025bd8deadSopenharmony_ci        passed a double-precision or half-precision fragment input
94035bd8deadSopenharmony_ci        (just as it does for any other inappropriate program resource
94045bd8deadSopenharmony_ci        such as a matrix).
94055bd8deadSopenharmony_ci
94065bd8deadSopenharmony_ci   171. With glProgramPathFragmentInputGenNV, what fragment input values are
94075bd8deadSopenharmony_ci        generated when the component would normally be the texture
94085bd8deadSopenharmony_ci        coordinate set component for glPathTexGenNV?
94095bd8deadSopenharmony_ci
94105bd8deadSopenharmony_ci        RESOLVED:  Zero.
94115bd8deadSopenharmony_ci
94125bd8deadSopenharmony_ci        glProgramPathFragmentInputGenNV is specified in terms of PathTexGenNV
94135bd8deadSopenharmony_ci        but there are no fixed-function way to drive varyings.  But
94145bd8deadSopenharmony_ci        this specification language says such under-specified varyings
94155bd8deadSopenharmony_ci        will be zero: "Because there is no associated texture coordinate
94165bd8deadSopenharmony_ci        set, the sc, tc, rc, and qc values when discussing PathTexGenNV
94175bd8deadSopenharmony_ci        are always zero when generating fragment input variables."
94185bd8deadSopenharmony_ci
94195bd8deadSopenharmony_ci   172. Should glProgramPathFragmentInputGenNV be able to control the
94205bd8deadSopenharmony_ci        path generation of "gl_" prefixed built-in variables?
94215bd8deadSopenharmony_ci
94225bd8deadSopenharmony_ci        RESOLVED:  No.
94235bd8deadSopenharmony_ci
94245bd8deadSopenharmony_ci        glProgramPathFragmentInputGenNV operates on only fragment inputs
94255bd8deadSopenharmony_ci        that are user-defined, scalar/vector (not matrices, structures,
94265bd8deadSopenharmony_ci        arrays, or opaque types such as samplers), and single-precsion.
94275bd8deadSopenharmony_ci
94285bd8deadSopenharmony_ci        Built-ins such as gl_TexCoord[0], gl_Color, gl_FogFragCoord
94295bd8deadSopenharmony_ci        are generated with glPathTexGenNV, glPathColorGenNV, and
94305bd8deadSopenharmony_ci        glPathFogGenNV respectively.
94315bd8deadSopenharmony_ci
94325bd8deadSopenharmony_ci   173. How does this extension interact with OpenGL ES 2 and 3?
94335bd8deadSopenharmony_ci
94345bd8deadSopenharmony_ci        RESOLVED:  Same as the Core Profile in complete OpenGL.  See Issue
94355bd8deadSopenharmony_ci        133 and the "Dependencies on Core Profile and OpenGL ES" section.
94365bd8deadSopenharmony_ci
94375bd8deadSopenharmony_ci   174. OpenGL ES normally does not use or require double-precision
94385bd8deadSopenharmony_ci        floating-point. Does the OpenGL ES version of this extension support
94395bd8deadSopenharmony_ci        the double-precision entry points MatrixLoaddEXT, etc.)?
94405bd8deadSopenharmony_ci
94415bd8deadSopenharmony_ci        RESOLVED: Yes. This is a conscious choice, and only
94425bd8deadSopenharmony_ci        double-precision support for CPU-side operations is required. See
94435bd8deadSopenharmony_ci        https://github.com/KhronosGroup/OpenGL-Registry/pull/119#issuecomment-341121022
94445bd8deadSopenharmony_ci        for background.
94455bd8deadSopenharmony_ci
94465bd8deadSopenharmony_ciRevision History
94475bd8deadSopenharmony_ci
94485bd8deadSopenharmony_ci    Rev.    Date    Author     Changes
94495bd8deadSopenharmony_ci    ----  -------- ---------  --------------------------------------------
94505bd8deadSopenharmony_ci      2   08/26/11 mjk        Initial version
94515bd8deadSopenharmony_ci      3   05/31/12 mjk        Fix glPathStencilDepthOffsetNV to accept
94525bd8deadSopenharmony_ci                              a GLfloat second parameter; add _BIT to the
94535bd8deadSopenharmony_ci                              FONT_*_NV metric token names
94545bd8deadSopenharmony_ci      4   07/06/12 mjk        Issue #128
94555bd8deadSopenharmony_ci      5   07/27/12 mjk        Fix getPathName return value sense;
94565bd8deadSopenharmony_ci                              Issue #129 and #130; UTF-8 and UTF-16
94575bd8deadSopenharmony_ci                              decoding fixes.
94585bd8deadSopenharmony_ci      6   05/23/13 mjk        Fix typo in Table 5.pathEquations
94595bd8deadSopenharmony_ci      7   06/25/13 mjk        Fix token names missing _BIT_NV suffix
94605bd8deadSopenharmony_ci      8   08/01/13 mjk        Bad argument order in instanced example
94615bd8deadSopenharmony_ci      9   08/22/13 mjk        Fix GL_EYE_LINEAR behavior
94625bd8deadSopenharmony_ci      10  09/09/13 mjk        Add core profile + smaller matrix support
94635bd8deadSopenharmony_ci      11  09/10/13 mjk        Add conic segment path commands
94645bd8deadSopenharmony_ci      12  09/18/13 mjk        Add rounded rectangles, GL_RELATIVE_RECT_NV,
94655bd8deadSopenharmony_ci                              missing new matrix language, fix typos
94665bd8deadSopenharmony_ci      13  10/21/13 mjk        <fontStyle> parameter for PathGlyphsNV
94675bd8deadSopenharmony_ci                              and PathGlyphRangeNV
94685bd8deadSopenharmony_ci      14  11/05/13 dsn        Use consistent argument names
94695bd8deadSopenharmony_ci      15  11/08/13 mjk        Add StencilThenCover* commands
94705bd8deadSopenharmony_ci      16  11/11/13 mjk        Add PathGlyphIndexRange command
94715bd8deadSopenharmony_ci      17  01/07/14 mjk        Fix typos
94725bd8deadSopenharmony_ci      18  01/07/14 mjk        Add PathGlyphIndexArray and
94735bd8deadSopenharmony_ci                              PathMemoryGlyphIndexArray commands and
94745bd8deadSopenharmony_ci                              FONT_NUM_GLYPH_INDICES_NV path query;
94755bd8deadSopenharmony_ci                              renamed FONT_CORRUPT_NV to FONT_UNINTELLIGIBLE_NV
94765bd8deadSopenharmony_ci      19  02/12/14 mjk        Document GL_PATH_STROKE_BOUND_NV
94775bd8deadSopenharmony_ci      20  02/14/14 mjk        Fix rounded rectangle radii sign behavior
94785bd8deadSopenharmony_ci                              (see issue 166)
94795bd8deadSopenharmony_ci      21  02/19/14 mjk        Refashion the rrect function
94805bd8deadSopenharmony_ci      22  02/22/14 mjk        PostScript arc behavior; see issue 167
94815bd8deadSopenharmony_ci      23  03/06/14 mjk        Document FONT_NUM_GLYPH_INDICES_BIT_NV
94825bd8deadSopenharmony_ci                              interactions; STANDARD_FONT_FORMAT_NV only
94835bd8deadSopenharmony_ci                              for glPathMemoryGlyphIndexArrayNV
94845bd8deadSopenharmony_ci      24  03/18/14 mjk        Update glPathFragmentInputGenNV state
94855bd8deadSopenharmony_ci                              and query specification; issues 168-171
94865bd8deadSopenharmony_ci      25  03/19/14 mjk        Better NVpr 1.3 explanation
94875bd8deadSopenharmony_ci      26  03/20/14 mjk        Issue 172
94885bd8deadSopenharmony_ci      27  04/15/14 mjk        ES interactions same as Core Profile
94895bd8deadSopenharmony_ci      28  05/02/14 mjk        Updated status
94905bd8deadSopenharmony_ci      29  05/15/14 mjk        Matrix*Tranpose to Matrix*Transpose
94915bd8deadSopenharmony_ci      30  05/29/14 mjk        Release 1.3 driver details
94925bd8deadSopenharmony_ci      31  07/02/14 dkoch      Fix a variety of typos and inconsistencies
94935bd8deadSopenharmony_ci                              Update ES interactions
94945bd8deadSopenharmony_ci                              Fix pseudocode (float vs double, renderBoundingBox)
94955bd8deadSopenharmony_ci      32  07/24/14 mjk        Fix Equation 5.generalParametricArc typos,
94965bd8deadSopenharmony_ci                              thanks to Chris Hebert
94975bd8deadSopenharmony_ci      33  08/19/14 mjk        Add missing 1.3 additions to revisions section
94985bd8deadSopenharmony_ci      34  08/27/14 mjk        Remove bogus polygon offset issue 127; my mistake
94995bd8deadSopenharmony_ci      35  09/09/14 mjk        Intro: fix translate mode, add StencilThenCover
95005bd8deadSopenharmony_ci      36  11/01/17 Jon Leech  Add issue 174 on double-precision ES support
9501