<commit_before>TODO.

 1. Dashed stroking is not implemented (yet).

 2. Add arc methods that are same as that ofW3C canvase:
    - Add ctor for PathContour::arc(vec2 center, float radius,
                                    float startAngle, float endAngle,
                                    bool counterclockwise)
       where the center of the arc is specified as are the
       starting and ending angles and if it goes clockwise
       or counter-clockwise.

    - Add new function/thing: arcTo(vec2 pt1, vec2 pt2, R)
       That makes an arc and 2 line segments as follows.
       Let L be the ray from the previous point to
       pt1 and M be the ray from pt1 to pt2. Let C
       be the circle tangent to both L and M with
       radius R. Let A be the arc of a circle that
       starts at where the C intersects L and ends
       where C intersects M. Then arcTo(pt1, pt2, R)
       is first connect by line segment from previous
       point to the start of A, then A, and then from
       end point of A to pt2.

 3. An interface to build attribute and text data from string(s). Currently
    an application needs to do this by itself, the example code being in
    demos/common/text_helper.[ch]pp.

 4. For some glyphs, curve pair glyph rendering is incorrect (this can be determined when
    the glyph data is generated). Should have an interface that is "take scalable glyph
    that is best" in GlyphSelector class.

 5. W3C blend modes are not yet implemented in GL backend, but Porter-Duff blend modes
    are.

 6. Path tessellation is scale invariant because it is based upon curvature. However,
    if a path (or rounded join) is dramtically zoomed in, we start to see the line segments.
    The way out is to instead use curvature multiplied by arc length and when we stroke
    a path to refine the tessellation by S where S is the operator norm of the
    transformation.

 7. Vulkan backend. Reuse the GLSL code building of fastuidraw::glsl
    together with a 3rd party library to create SPIR-V from GLSL.<commit_msg>TODO.txt: document potentially better way to do dashed stroking more in frag shader<commit_after>TODO.

 1. On dashed path stroking with caps (with the shades in glsl module), there can
    be a rendering issue occur when for a rounded cap that is induced by the dash
    pattern near points where the path curves strongly. The rendering issue (only
    on those kinds of caps) is caused by the fact that the distance along the path
    is coming from different segments. One way out is the following (which will make
    the vertex shader even more horribly heavy):
       - If doing dashed stroking, look at the sub-edge one is on. The data at each vertex
         gives the start and stop of each sub-edge. If the entire sub-edge is within
         the dash pattern proceed as now. If the entire sub-edge is within the skip
         pattern, then collapse the edge. If the sub-edge walks though the boundary,
         then extend the sub-edge just enough to cover the cap(s) and emit modified
         distance values (and flags) so that the frag shader will do the right thing.
    One nice benefit is that then the frag shader can skip the dash computation
    except for those segments that go though the dash pattern. Moreover, since
    the geometry is modified respecting the dash pattern, we can (on paper) even
    avoid doing discard except for rounded caps. To make square caps and non-caps
    anti-aliased at cap boundaries, we need to change the edge from the current
    2 quads to be a 5-triangle fan. Another benefit is that we can modify/tweak
    the values on in vertex shader to make pixel width stroking very easy. However,
    there is an icky side: the dash hit check is done for each vertex of the sub-edge
    (instead of once per sub-edge).

 2. Add arc methods that are same as that ofW3C canvase:
    - Add ctor for PathContour::arc(vec2 center, float radius,
                                    float startAngle, float endAngle,
                                    bool counterclockwise)
       where the center of the arc is specified as are the
       starting and ending angles and if it goes clockwise
       or counter-clockwise.

    - Add new function/thing: arcTo(vec2 pt1, vec2 pt2, R)
       That makes an arc and 2 line segments as follows.
       Let L be the ray from the previous point to
       pt1 and M be the ray from pt1 to pt2. Let C
       be the circle tangent to both L and M with
       radius R. Let A be the arc of a circle that
       starts at where the C intersects L and ends
       where C intersects M. Then arcTo(pt1, pt2, R)
       is first connect by line segment from previous
       point to the start of A, then A, and then from
       end point of A to pt2.

 3. An interface to build attribute and text data from string(s). Currently
    an application needs to do this by itself, the example code being in
    demos/common/text_helper.[ch]pp.

 4. For some glyphs, curve pair glyph rendering is incorrect (this can be determined when
    the glyph data is generated). Should have an interface that is "take scalable glyph
    that is best" in GlyphSelector class.

 5. W3C blend modes are not yet implemented in GL backend, but Porter-Duff blend modes
    are.

 6. Path tessellation is scale invariant because it is based upon curvature. However,
    if a path (or rounded join) is dramtically zoomed in, we start to see the line segments.
    A better tessellation paramater would be a thresshold T which specifies what would
    the maximum distance be allowed between a curve segment and its line segment.
    Then given a transformation matrix M, we can compute by how much it stretches
    (or contracts) distances within the bounding box of the curve. From that we can
    decide what is the tessellation we should choose for a path.

 7. Vulkan backend. Reuse the GLSL code building of fastuidraw::glsl
    together with a 3rd party library to create SPIR-V from GLSL.
{'fraction_non_alphanumeric': 0.03419516263552961, 'fraction_numerical': 0.007673060884070058, 'mean_word_length': 2.7058096415327566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '428906', 'n_tokens_mistral': 1575, 'n_tokens_neox': 1496, 'n_words': 950}