W3C home > Mailing lists > Public > svg-testsuite-comments@w3.org > May 2001

Re: [Fwd: SVG test suite query (interact-onload-BE-07)]

From: Jon Ferraiolo <jferraio@Adobe.COM>
Date: Fri, 18 May 2001 10:05:07 -0700
Message-Id: <>
To: gerph@innocent.com
Cc: svg-testsuite-comments@w3.org
At 05:57 PM 5/14/01 +0200, Chris Lilley wrote:
>  Return-Path: <svg-testsuite-comments-request@w3.org>
>Received: from www19.w3.org (www19.w3.org [])
>         by tux.w3.org (8.9.3/8.9.3) with ESMTP id LAA12857
>         for <chris@w3.org>; Mon, 14 May 2001 11:50:18 -0400
>Received: (from daemon@localhost)
>         by www19.w3.org (8.9.0/8.9.0) id LAA11457
>         for chris@w3.org; Mon, 14 May 2001 11:50:17 -0400 (EDT)
>Resent-Date: Mon, 14 May 2001 11:50:17 -0400 (EDT)
>Resent-Message-Id: <200105141550.LAA11457@www19.w3.org>
>Received: from tux.w3.org (tux.w3.org [])
>         by www19.w3.org (8.9.0/8.9.0) with ESMTP id LAA11440
>         for <svg-testsuite-comments@www19.w3.org>; Mon, 14 May 2001 
> 11:50:14 -0400 (EDT)
>Received: from mta07-svc.ntlworld.com (mta07-svc.ntlworld.com [])
>         by tux.w3.org (8.9.3/8.9.3) with ESMTP id LAA12837
>         for <svg-testsuite-comments@w3.org>; Mon, 14 May 2001 11:50:13 -0400
>Received: from zeus ([]) by mta07-svc.ntlworld.com
>           (InterMail vM. 201-229-119-110) with SMTP
>           id <20010514155012.ZQKY285.mta07-svc.ntlworld.com@zeus>
>           for <svg-testsuite-comments@w3.org>;
>           Mon, 14 May 2001 16:50:12 +0100
>From: Justin Fletcher <justin@movspclr.co.uk>
>Reply-To: gerph@innocent.com
>To: svg-testsuite-comments@w3.org
>X-Organization: Gerphville
>X-Disclaimer: This mail has nothing to do with Aardvarks
>X-Mailer: Gerph's 'GMail' for RISC OS v1.38
>Date: Mon, 14 May 2001 16:43:17 +0100
>Message-Id: <gmail-v1.38.7a98d478.1754a.1@zeus.glasgow.riscos.com>
>MIME-Version: 1.0
>Content-Type: text/plain; charset=iso-8859-1
>Content-Id: <gmail-v1.38.7a98d486.1cd4a.2@zeus.glasgow.riscos.com>
>Content-Description: Message body
>Content-Disposition: inline
>User-Agent: POPstar/2.01b12
>Content-Transfer-Encoding: 8bit
>X-MIME-Autoconverted: from quoted-printable to 8bit by www19.w3.org id 
>Subject: SVG test suite query (interact-onload-BE-07)
>Resent-From: svg-testsuite-comments@w3.org
>X-Mailing-List: <svg-testsuite-comments@w3.org> archive/latest/45
>X-Loop: svg-testsuite-comments@w3.org
>Sender: svg-testsuite-comments-request@w3.org
>Resent-Sender: svg-testsuite-comments-request@w3.org
>Precedence: list
>List-Id: <svg-testsuite-comments.w3.org>
>List-Help: <http://www.w3.org/Mail/>
>X-Mozilla-Status2: 00000000
>I'm just going through the test suite with my SVG converter. I've
>just implemented resizing of nested svg elements according to the
>width and height specified.
>This seems to work most of the time, but I don't understand what
>happens with rectangle 4 on test interact-onload-BE-07.
>This says :
>     <g transform="translate(62.5,195)">
>       <svg width="200" height="200" onload="onEvent(evt, 'Rect4', 
> 'visible')">
>         <rect id="Rect4" width="75" height="75" style="visibility:hidden"/>
>       </svg>
>       <text x="37.5" y="90" style="fill:red">4: Yes</text>
>     </g>
>The event script merely toggles the visibility, and so shouldn't have
>any effect on the size of the rectangle.
>What I end up with is a 200x200 rectangle, because the 75x75 rectangle
>has been rescaled to the size specified by the svg width and height

There is no automatic rescaling in this example. Transformations only 
happen in SVG when:

1) There is a 'transform' attribute on an element
2) There is a 'viewBox' (or maybe 'preserveAspectRatio') attribute on an 

In particular, an 'svg' element does NOT scale the coordinate system unless 
there is a 'viewBox' attribute. All that the width/height attributes do in 
this example is establish an automatic clipping path due to the default of 
overflow:hidden, but the rectangle is fully within the clipping path so the 
clipping path has no effect.

In this test case, the only 'transform' attributes present only do 
translations (i.e., shift the coordinate system in X and Y without scaling) 
and there are no 'viewBox' attributes. Since there are no scale 
transformations, each rectangle should be 75px by 75px.

Jon Ferraiolo
SVG Editor

>This means that rectangle 4 covers just under half the
>horizontal and vertical size of the diagram (the whole diagram being
>450x450). It implies that I've misunderstood something, but from the
>specification and examples I can't see what.
>If the width and height are merely the rendering area that it should
>cover, then some of the earlier examples would fail. If it's intended
>that the original rectangle has 0x0 size because it is marked with
>visibility:hidden then... that's very strange - it would imply that
>invisible elements could not be scaled by their parents...
>Have I misunderstood something ?
>Gerph {djf0-.3w6e2w2.226,6q6w2q2,2.3,2m4}
>URL: http://www.movspclr.co.uk/
>... There are things that I wish for and things that I need.
>     I need the things I wish for.
Received on Friday, 18 May 2001 15:02:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:41:18 UTC