W3C home > Mailing lists > Public > www-style@w3.org > April 2008

Re: Clipping a border-image

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Tue, 15 Apr 2008 17:01:29 -0700
Message-ID: <480541D9.4050100@terrainformatica.com>
To: "Bonner, Matt (IPG)" <matt.bonner@hp.com>
CC: David Hyatt <hyatt@apple.com>, "www-style@w3.org" <www-style@w3.org>

Bonner, Matt (IPG) wrote:
> David Hyatt wrote:
>   
>> I raised an issue a while back about not being able to clip out the
>> center of a border-image.  It's wasteful that this part always draws.
>>     
>
> Andrew Fedoniouk wrote:
>   
>> As far as I understand the idea of the border image it is possible to
>> make an image (say PNG) with fully transparent middle section.
>> Why do you need that clipping then?
>>     
>
> Wouldn't a UA still have to read (and possibly scale) the entire image 
> and draw all those central, transparent pixels in that case?  
>   
1) border image in the way it is defined is not getting scaled as a whole.
2) It makes sense to assume that some sections (blocks) of the border 
image will be empty so to contain
only transparent pixels. So such blocks can be skipped from 
rendering/stretching/tiling as a whole.
That will require scanning of image areas first but this is nothing 
compared with e.g. unnecessary stretching
of the whole section.

(All this border-image stuff should be really a part of background image 
rendering rather than special
border image. background + border - too many potentially transparent 
overlays).

--

Andrew Fedoniouk.
http://terrainformatica.com


> It seems like the UA could safely avoid even accessing those pixel 
> values if it knew they were to be clipped out.
>
> Matt
> --
> Matt Bonner
> Hewlett-Packard Company
>
> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf
> Of Andrew Fedoniouk
> Sent: Tuesday, April 15, 2008 3:10 PM
> To: David Hyatt
> Cc: www-style@w3.org
> Subject: Re: Clipping a border-image
>
>
> David Hyatt wrote:
>   
>> I raised an issue a while back about not being able to clip out the
>> center of a border-image.  It's wasteful that this part always draws.
>> I was thinking that another cool feature for border-image would be if
>> you could clip the border-image to the actual strokes being drawn.
>>
>> A single clip keyword could cover both cases, either via a new
>> property, border-image-clip, or just as an optional part of the
>> border-image declaration.  Clipping to the shape of the original
>> border stroke would take care of my desire to clip out the middle and
>> also open up a nice range of options for border-image.
>>
>> dave
>> (hyatt@apple.com)
>>
>>     
> As far as I understand the idea of the border image it is possible to
> make an image (say PNG) with fully transparent middle section.
> Why do you need that clipping then?
>
> --
> Andrew Fedoniouk.
> http://terrainformatica.com
>
>   
Received on Wednesday, 16 April 2008 00:02:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:05 GMT