<?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>19818</bug_id>
          
          <creation_ts>2012-11-01 15:42:25 +0000</creation_ts>
          <short_desc>Description of transformation in drawimage is confusing</short_desc>
          <delta_ts>2013-03-25 19:35:24 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NEEDSINFO</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          <blocked>19820</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="rcabanie">cabanier</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77678</commentid>
    <comment_count>0</comment_count>
    <who name="rcabanie">cabanier</who>
    <bug_when>2012-11-01 15:42:25 +0000</bug_when>
    <thetext>See http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#drawing-images-to-the-canvas

The text for drawImage currently states:
When drawImage() is invoked, the region of the image specified by the source rectangle must be painted on the region of the canvas specified by the destination rectangle, after applying the current transformation matrix to the points of the destination rectangle.

This is a bit confusing since you don&apos;t really apply the transform to the points. Basically, you map the source rect to the destination rect and then transform the destination rectangle.
I believe the spec should also call out that there should be no loss of precision when doing this (i.e. if the destination has half the pixels but scaled by 2, the original pixel should be preserve)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82379</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-01-30 23:57:17 +0000</bug_when>
    <thetext>&gt; This is a bit confusing since you don&apos;t really apply the transform to the
&gt; points. Basically, you map the source rect to the destination rect and then
&gt; transform the destination rectangle.

Well it doesn&apos;t really matter since you can&apos;t do perspective transforms. But yeah, I&apos;ve changed this to transform the rectangle, not the points.


&gt; I believe the spec should also call out that there should be no loss of
&gt; precision when doing this (i.e. if the destination has half the pixels but
&gt; scaled by 2, the original pixel should be preserve)

Could you elaborate on this? I don&apos;t understand what it means.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82382</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-01-31 00:04:57 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7677.
Check-in comment: Be more precise by having fewer words...
http://html5.org/tools/web-apps-tracker?from=7676&amp;to=7677</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84943</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-03-25 19:35:24 +0000</bug_when>
    <thetext>cabanier: please see the end of comment 1; don&apos;t hesitate to reopen the bug if you think there&apos;s more that needs fixing here</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>