<?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>15800</bug_id>
          
          <creation_ts>2012-01-30 23:55:26 +0000</creation_ts>
          <short_desc>Add example to clarify how transform-origin is applied to elements</short_desc>
          <delta_ts>2012-04-25 16:34:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>Transforms</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dirk Schulze">dschulze</reporter>
          <assigned_to name="Dirk Schulze">dschulze</assigned_to>
          <cc>ayg</cc>
    
    <cc>cmarrin</cc>
    
    <cc>dino</cc>
    
    <cc>dschulze</cc>
    
    <cc>eoconnor</cc>
    
    <cc>smfr</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63370</commentid>
    <comment_count>0</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-01-30 23:55:26 +0000</bug_when>
    <thetext>transform-origin translates the coordinate space in order to apply transformations and undo the translation afterwards. Should the &apos;transform-origin&apos; get applied to each transformation function or the whole list of transformation functions.

From http://www.w3.org/Graphics/SVG/WG/wiki/FX-Taskforce/2DTransformsToDoList :

(1) effects the transform list of an element OR (2) effects specific all roate and scale individually in the transform list.
e.g. T rotate(...) translate(...) scale(...) T&apos; OR T rotate(...) T&apos; translate(...) T scale(...) T&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63934</commentid>
    <comment_count>1</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-02-09 19:16:55 +0000</bug_when>
    <thetext>It seems like there is already consensus that &apos;transform-origin&apos; is similar to a translate at the beginning and a translation back at the end of the transformation list on implementations. Maybe we have to make it more explicit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64421</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-02-22 15:05:58 +0000</bug_when>
    <thetext>There&apos;s no difference.  If you apply the translation before and after the whole list, or before and after each transform, you get the same effect, because all the translations in the middle pair off and cancel.  For instance, with

  transform: rotate(45deg) scale(2);
  transform-origin: 10px -10px;

there is no difference between

  translate(-10px, 10px) rotate(45deg) scale(2) translate(10px, -10px)

and


  translate(-10px, 10px) rotate(45deg) translate(10px, -10px)
  translate(-10px, 10px) scale(2) translate(10px, -10px)

because the two middle transforms cancel.  (Group-theoretically, conjugation distributes over multiplication.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64733</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser">smfr</who>
    <bug_when>2012-02-29 17:01:40 +0000</bug_when>
    <thetext>Do we still need this bug to be open? I think the spec is fairly clear.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64734</commentid>
    <comment_count>4</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-02-29 17:04:06 +0000</bug_when>
    <thetext>I&apos;ll add a short example this week. Just to make sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66956</commentid>
    <comment_count>5</comment_count>
      <attachid>1122</attachid>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-04-24 04:57:03 +0000</bug_when>
    <thetext>Created attachment 1122
Applying the transform-origin property (SVG)

A short demonstration how the transform-origin property gets applied. This will be embedded in the following example:

&lt;div class=&quot;example&quot;&gt;
   &lt;pre&gt;div {
    height: 100px; width: 100px;
    transform-origin: 50px 50px;
    transform: rotate(45deg);
}
&lt;/pre&gt;

   &lt;p&gt;The &apos;transform-origin&apos; property moves the point of origin by 50 pixels in 
   both the X and Y directions. The transform rotates the element
   clockwise by 45° about the point of origin. After all
   transform functions were applied, the translation of the origin gets
   translated back by -50 pixels in both the X and Y directions.&lt;/p&gt;

   &lt;div class=&quot;figure&quot;&gt; &lt;img alt=&quot;The point of origin gets translated temporary&quot; src=&quot;newImage.png&quot;&gt;&lt;/div&gt;

&lt;/div&gt;

placed between the current Examples 1 and 2.

Any thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67027</commentid>
    <comment_count>6</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-04-25 16:34:39 +0000</bug_when>
    <thetext>I added an example how to apply transform-origin to the spec. Closing this bug now.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1122</attachid>
            <date>2012-04-24 04:57:03 +0000</date>
            <delta_ts>2012-04-24 04:57:03 +0000</delta_ts>
            <desc>Applying the transform-origin property (SVG)</desc>
            <filename>origin.svg</filename>
            <type>image/svg+xml</type>
            <size>1729</size>
            <attacher name="Dirk Schulze">dschulze</attacher>
            
              <data encoding="base64">PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRw
Oi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNzM1IiBoZWlnaHQ9IjI1MCI+CiAgPGRl
ZnM+CiAgICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwhW0NEQVRBWwogICAgICByZWN0IHsgZmls
bDogIzAwYTZmZjsgfQogICAgICAKICAgICAgbGluZSwgcGF0aCB7CiAgICAgICAgZmlsbDogbm9u
ZTsKICAgICAgICBzdHJva2U6IGJs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