W3C home > Mailing lists > Public > www-svg@w3.org > April 2000

Re: Question about clip-path property

From: Jon Ferraiolo <jferraio@Adobe.COM>
Date: Wed, 26 Apr 2000 13:38:05 -0700
Message-Id: <200004262035.NAA01955@mail-345.corp.Adobe.COM>
To: "Yardumian, Rick" <richard.yardumian@cis.canon.com>
Cc: "'www-svg@w3.org'" <www-svg@w3.org>
Rick,
As you might expect, I'm going to say that the Adobe implementation is
correct.
But I will justify this claim.

At 01:04 PM 4/26/00 -0700, Yardumian, Rick wrote:
>I'm confused as to whether nested clip-paths result in an intersection or
>not.

Nested clip-paths are intersected. The following sentence comes from 14.3.5
Establishing a new clipping region
(http://www.w3.org/TR/2000/03/WD-SVG-20000303/masking.html#EstablishingANewC
lippingPath):

"For a given graphics element, the actual clipping path used will be the
intersection of the clipping path specified by its 'clip-path' property (if
any)
with any clipping paths on its ancestors, as specified by the 'clip-path'
property on the ancestor elements."

There are a couple of additional bullets that follow the above sentence which
re-inforce the notion that clipping paths are interested with the clipping
paths on ancestor elements.

In any case, the intent with SVG is to have a rich-enough set of graphics
features that would allow straightforward translation of existing graphics
languages such as EPS and PDF into SVG. Since EPS and PDF both support the
notion of intersection of nested clippaths, SVG needs to have the facility,
also.

>
>The following SVG program gives different results on the latest versions of
>the Adobe SVG viewer plugin (Innternet Explorer), IBM SVG viewer and the
>JASC Trajectory pro.
>
><?xml version="1.0" standalone="no"?>
><!DOCTYPE svg SYSTEM "svg-19991203.dtd" >
><svg width="500px" height="500px">
><defs>
><clipPath id="svgClip1">
><rect x="400" y="400" width="100" height="100"/>
></clipPath>
></defs>
><g style="clip-path:URL(#svgClip1)">
><defs>
><clipPath id="svgClip2">
><rect x="0" y="0" width="500" height="500"/>
></clipPath>
></defs>
><g style="clip-path:URL(#svgClip2)">
><rect style="fill:#7F7F7F" x="0" y="0" width="500" height="500"/>
></g>
></g>
></svg>
>
>Adobe gives a grey filled square at coordinates 400,400 that is 100 by 100
>pixels in size. IBM and JASC give a grey filled square at coordinates 0,0
>that is 500 by 500 pixels in size. What is the correct behavior?

IBM and JASC have a bug in that they are not applying the clipping path
that is
specified on the outermost 'g' element.

>
>Rick
> 

Jon Ferraiolo
SVG Editor
Adobe Systems Incorporated 
Received on Wednesday, 26 April 2000 16:36:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 23:52:47 GMT