Skip to content

Commit ed56cb5

Browse files
tabatkinssvgeesus
authored andcommitted
fix shortname
1 parent fe15a00 commit ed56cb5

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

compositing-2/Overview.bs

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<h1>Compositing and Blending Level 2</h1>
21
<pre class='metadata'>
2+
Title: Compositing and Blending Level 2
3+
Group: fxtf
34
Status: ED
45
ED: https://drafts.fxtf.org/compositing-2/
56
TR: https://www.w3.org/TR/compositing-2/
6-
Previous Version:
7-
Shortname: compositing level 2
7+
Previous Version:
8+
Shortname: compositing
9+
Level: 2
810
Link Defaults: css-color-3 (property) color, svg (property) mask
911
Deadline: 2014-08-17
10-
Level: 2
11-
Group: fxtf
1212
Editor: Rik Cabanier, Adobe Systems Inc., cabanier@adobe.com
1313
Editor: Nikos Andronikos, Canon Information Systems Research Australia, Nikos.Andronikos@cisra.canon.com.au
1414
Abstract: Compositing describes how shapes of different elements are combined into a single image. There are various possible approaches for compositing. Previous versions of SVG and CSS used <a href="https://www.w3.org/TR/SVG11/masking.html#SimpleAlphaBlending">Simple Alpha Compositing</a>. In this model, each element is rendered into its own buffer and is then merged with its <a>backdrop</a> using the Porter Duff ''source-over'' operator. This specification will define a new compositing model that expands upon the Simple Alpha Compositing model by offering:
@@ -64,7 +64,7 @@ all properties defined in this specification also accept the <a
6464
href="https://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
6565
keyword as their property value. For readability it has not been repeated
6666
explicitly.
67-
67+
6868
<h2 id="csscompositingandblending">Specifying Blending in CSS </h2>
6969
<h3 id="compositingandblendingorder">Order of graphical operations</h3>
7070

@@ -117,7 +117,7 @@ Animatable: no
117117
The syntax of the property of <<blend-mode>> is given with:
118118

119119
<pre class="blendmode"><dfn id="ltblendmodegt">&lt;blend-mode></dfn> = <a value>normal</a> | <a value>multiply</a> | <a value>screen</a> | <a value>overlay</a> | <a value>darken</a> | <a value>lighten</a> | <a value>color-dodge</a> |
120-
<a value>color-burn</a> | <a value>hard-light</a> | <a value>soft-light</a> | <a value>difference</a> | <a value>exclusion</a> | <a value>hue</a> |
120+
<a value>color-burn</a> | <a value>hard-light</a> | <a value>soft-light</a> | <a value>difference</a> | <a value>exclusion</a> | <a value>hue</a> |
121121
<a value>saturation</a> | <a value>color</a> | <a value>luminosity</a></pre>
122122

123123
Note: Applying a blendmode other than <a value>normal</a> to the element must establish a new <a spec="css21">stacking context</a> [[!CSS21]]. This group must then be blended and composited with the <a spec="css21">stacking context</a> that contains the element.
@@ -226,7 +226,7 @@ div { background-image: url('texture.png'); }
226226
}
227227
p {
228228
mix-blend-mode: overlay;
229-
font-family: "Mythos Std"
229+
font-family: "Mythos Std"
230230
}
231231
</pre>
232232

@@ -301,7 +301,7 @@ property for that element must be reset to its initial value.
301301
<p>And the following style rule:</p>
302302
<pre>
303303
body { background-color: lime; }
304-
div {
304+
div {
305305
width: 200px;
306306
height: 200px;
307307
background-size: 200px 200px;
@@ -362,7 +362,7 @@ Where the graphic element is opaque, it obscures the backdrop and where the grap
362362
-->
363363

364364
In the model described in this specification there are two steps to the overall compositing operation - <a href="#advancedcompositing">Porter-Duff compositing</a> and <a href="#blending">blending</a>.
365-
<!--Porter Duff compositing takes into account the overall shape of the graphic element and its opacity, as well as the opacity and shape of the backdrop, and
365+
<!--Porter Duff compositing takes into account the overall shape of the graphic element and its opacity, as well as the opacity and shape of the backdrop, and
366366
determines where the backdrop is visible, where the graphic element is visible and where one is visible through the other.-->
367367
The blending step determines how the colors from the graphic element and the backdrop interact.
368368

@@ -384,7 +384,7 @@ The formula for simple alpha compositing is
384384
co = Cs x αs + Cb x αb x (1 - αs)
385385
</pre>
386386

387-
Where
387+
Where
388388

389389
<ul>
390390
<li>co: the premultiplied pixel value after compositing
@@ -399,10 +399,10 @@ Note: All values are between 0 and 1 inclusive.
399399
The pixel value after compositing (co) is given by adding the contributions from the source graphic element [Cs x αs] and the backdrop [Cb x αb x (1 - αs)].
400400
For both the graphic element and the backdrop, the color values are multiplied by the alpha to determine the amount of color that contributes.
401401
With zero alpha meaning that the color does not contribute and partial alpha means that some percentage of the color contributes.
402-
The contribution of the backdrop is further reduced based on the opacity of the graphic element.
402+
The contribution of the backdrop is further reduced based on the opacity of the graphic element.
403403
Conceptually, (1 - αs) of the backdrop shows through the graphic element, meaning that if the graphic element is fully opaque (αs=1) then no backdrop shows through.
404404

405-
The simple alpha compositing formula listed above gives a resultant color which is the result of the
405+
The simple alpha compositing formula listed above gives a resultant color which is the result of the
406406
weighted average of the backdrop color and graphic element color, with the weighting determined by the backdrop and
407407
graphic element alphas.
408408
The resultant alpha value of the composite is simply the sum of the contributed alpha of the composited elements.
@@ -412,7 +412,7 @@ The formula for the resultant alpha of the composite is
412412
αo = αs + αb x (1 - αs)
413413
</pre>
414414

415-
Where
415+
Where
416416

417417
<ul>
418418
<li>αo: the alpha value of the composite
@@ -428,7 +428,7 @@ The pre-multiplied value is given by
428428
<pre>
429429
cs = Cs x αs
430430
</pre>
431-
with
431+
with
432432
<ul>
433433
<li>cs: the pre-multiplied value
434434
<li>Cs: the color value
@@ -769,7 +769,7 @@ The area of each region can be calculated with the following equations:
769769
The figure above represents coverage of 0.5 for both source and destination.
770770

771771
<pre>
772-
Both = 0.5 x 0.5 = 0.25
772+
Both = 0.5 x 0.5 = 0.25
773773
Source Only = 0.5 (1 – 0.5) = 0.25
774774
Destination Only = 0.5(1 – 0.5) = 0.25
775775
None = (1 – 0.5)(1 – 0.5) = 0.25
@@ -900,7 +900,7 @@ Destination which overlaps the source, replaces the source.
900900
</div>
901901
<pre>
902902
Fa = 0; Fb = αs
903-
co = αb x Cb x αs
903+
co = αb x Cb x αs
904904
αo = αb x αs
905905
</pre>
906906

@@ -1001,8 +1001,8 @@ Display the sum of the source image and destination image. It is defined in the
10011001
<!--<h4 id="groupcompositingisolation">Isolated groups and Porter Duff modes</h4>-->
10021002

10031003
When compositing the elements within an isolated group, the elements are composited over a transparent black initial backdrop. If the bottom element in the group uses a Porter Duff compositing operator
1004-
which is dependent on the backdrop, such as <a href="#porterduffcompositingoperators_dst">destination</a>, <a href="#porterduffcompositingoperators_srcin">source-in</a>,
1005-
<a href="#porterduffcompositingoperators_dstin">destination-in</a>, <a href="#porterduffcompositingoperators_dstout">destination-out</a> or <a href="#porterduffcompositingoperators_srcatop">source-atop</a>,
1004+
which is dependent on the backdrop, such as <a href="#porterduffcompositingoperators_dst">destination</a>, <a href="#porterduffcompositingoperators_srcin">source-in</a>,
1005+
<a href="#porterduffcompositingoperators_dstin">destination-in</a>, <a href="#porterduffcompositingoperators_dstout">destination-out</a> or <a href="#porterduffcompositingoperators_srcatop">source-atop</a>,
10061006
then the result of the composite will be empty. Subsequent elements within the group are composited with the result of the first composite.
10071007

10081008
<!--
@@ -1116,7 +1116,7 @@ This is the default attribute which specifies no blending. The blending formula
11161116

11171117
<h4 id="blendingmultiply"><dfn dfn-type="value" dfn-for="<blend-mode>">multiply</dfn> blend mode</h4>
11181118

1119-
The source color is multiplied by the destination color and replaces the destination.
1119+
The source color is multiplied by the destination color and replaces the destination.
11201120

11211121
The resultant color is always at least as dark as either the source or destination color. Multiplying any color with black results in black. Multiplying any color with white preserves the original color.
11221122

@@ -1237,7 +1237,7 @@ Multiplies or screens the colors, depending on the source color value. The effec
12371237
if(Cs <= 0.5)
12381238
B(Cb, Cs) = Multiply(Cb, 2 x Cs)
12391239
else
1240-
B(Cb, Cs) = Screen(Cb, 2 x Cs -1)
1240+
B(Cb, Cs) = Screen(Cb, 2 x Cs -1)
12411241
</pre>
12421242

12431243
See the definition of <a value>multiply</a> and <a value>screen</a> for their formulas.
@@ -1311,28 +1311,28 @@ The nonseparable blend mode formulas make use of several auxiliary functions:
13111311

13121312
<pre>
13131313
Lum(C) = 0.3 x Cred + 0.59 x Cgreen + 0.11 x Cblue
1314-
1314+
13151315
ClipColor(C)
13161316
L = Lum(C)
13171317
n = min(Cred, Cgreen, Cblue)
13181318
x = max(Cred, Cgreen, Cblue)
13191319
if(n < 0)
13201320
C = L + (((C - L) * L) / (L - n))
1321-
1321+
13221322
if(x > 1)
13231323
C = L + (((C - L) * (1 - L)) / (x - L))
1324-
1324+
13251325
return C
1326-
1326+
13271327
SetLum(C, l)
13281328
d = l - Lum(C)
13291329
Cred = Cred + d
13301330
Cgreen = Cgreen + d
13311331
Cblue = Cblue + d
13321332
return ClipColor(C)
1333-
1333+
13341334
Sat(C) = max(Cred, Cgreen, Cblue) - min(Cred, Cgreen, Cblue)
1335-
1335+
13361336
The subscripts min, mid, and max in the next function refer to the color
13371337
components having the minimum, middle, and maximum values upon entry to the function.
13381338

@@ -1422,8 +1422,8 @@ If this rule is not followed, an attacker could infer information and mount a ti
14221422
<p>A timing attack is a method of obtaining information about content that
14231423
is otherwise protected, based on studying the amount of time it takes for
14241424
an operation to occur. If, for example, red pixels took longer to
1425-
draw than green pixels, one might be able to reconstruct a rough image of
1426-
the element being rendered, without ever having access to the content
1425+
draw than green pixels, one might be able to reconstruct a rough image of
1426+
the element being rendered, without ever having access to the content
14271427
of the element.</p>
14281428
</div>
14291429

@@ -1459,11 +1459,11 @@ Working draft of 10 October 2013</a>:
14591459
The following changes were made relative to the <a
14601460
href="https://www.w3.org/TR/2013/WD-compositing-1-20130625/" >Working
14611461
Draft of 2013-06-25</a>:
1462-
1462+
14631463
<ul>
1464-
<li>clipping was removed as one of the operators that
1464+
<li>clipping was removed as one of the operators that
14651465
creates an isolated group in SVG
1466-
<li>background-blend-mode was changed so it matches
1466+
<li>background-blend-mode was changed so it matches
14671467
repeating behavior of other background syntaxes.
14681468
<li>The mix-composite property was removed
14691469
<li>all open issues were resolved

0 commit comments

Comments
 (0)