<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>17784</bug_id>
          
          <creation_ts>2012-07-15 16:09:40 +0000</creation_ts>
          <short_desc>request: even/odd winding algorithm in addition to non-zero</short_desc>
          <delta_ts>2015-06-16 17:08:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mike Kamermans">pomax</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>cabanier</cc>
    
    <cc>mike</cc>
    
    <cc>plh</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70018</commentid>
    <comment_count>0</comment_count>
    <who name="Mike Kamermans">pomax</who>
    <bug_when>2012-07-15 16:09:40 +0000</bug_when>
    <thetext>I&apos;d like to request that the canvas 2d context fill style is extended with support for the even/odd winding algorithm, in addition to the non-zero winding algorithm, so that drawing shapes on the canvas that are based on paths obtained from graphics sources that encode shapes using the even/odd winding algorithm can be drawn without having to manually analyse the path for subpaths that need their direction flipped.

Use cases are using image from .svg resource with the intention of using them as rasterised image data (not vector graphics) and shapes such as font outlines (for use as polygon graphics, not &quot;letters&quot;) to the canvas.

(As a bonus, this algorithm is already available for reuse in every current browser, since SVG requires algorithms both to be available, making implementing it for canvas 2d mostly a matter of hooking it up correctly)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70257</commentid>
    <comment_count>1</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 07:13:34 +0000</bug_when>
    <thetext>This bug was cloned to create bug 17893 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72520</commentid>
    <comment_count>2</comment_count>
    <who name="rcabanie">cabanier</who>
    <bug_when>2012-08-21 22:41:22 +0000</bug_when>
    <thetext>This is indeed very useful and widely used. 
Moving to HTML.Next as it is a new feature request</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81670</commentid>
    <comment_count>3</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2013-01-21 15:58:11 +0000</bug_when>
    <thetext>Mass move to &quot;HTML WG&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81788</commentid>
    <comment_count>4</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2013-01-21 16:00:57 +0000</bug_when>
    <thetext>Mass move to &quot;HTML WG&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121038</commentid>
    <comment_count>5</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2015-06-16 10:15:24 +0000</bug_when>
    <thetext>Making this a higher priority to actively seek more feedback on from implementers and webdevs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121104</commentid>
    <comment_count>6</comment_count>
    <who name="rcabanie">cabanier</who>
    <bug_when>2015-06-16 16:50:04 +0000</bug_when>
    <thetext>This was implemented by every browser 1-2 years ago.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121107</commentid>
    <comment_count>7</comment_count>
    <who name="Mike Kamermans">pomax</who>
    <bug_when>2015-06-16 17:08:46 +0000</bug_when>
    <thetext>indeed, this bug has since been resolved, but never got closed.

http://jsbin.com/kemogesubu/edit?html,js,output demonstrates &quot;evenodd&quot; as fill rule working (I only tested it in firefox, chrome, and IE, but kind of assume that means evreyone supports it). You can change &quot;evenodd&quot; to &quot;nonzero&quot; to see it do a flood fill, or keep it &quot;evenodd&quot; to see it only fill the parts that uniquely cordon off a polygonal section.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>