typo fix spotted by Andrew
[goodguy/cin-manual-latex.git] / parts / Overlays.tex
index 06e27a2cea3c40abce0f2f28ee74baf9e6e52d96..34b202fbc9adc8ebac022d7e140e90c2c839c65a 100644 (file)
@@ -1,8 +1,8 @@
 \chapter{Overlays}%
 \label{cha:overlays}
-\todo{same wrong border for title's number}
+\index{overlays}
 
-The purpose of the Overlay Modes is to control the foreground and background stacking and use blending to reshape image object boundaries.  It normally makes use of a binary type alpha blending system for all in or all out.  To use the available operations in Cinelerra GG, follow these steps:
+The purpose of the Overlay Modes is to control the foreground and background stacking and use blending to reshape image object boundaries.  It normally makes use of a binary type alpha blending system for all in or all out.  To use the available operations in \CGG{}, follow these steps:
 
 \begin{enumerate}
     \item In the main window, look at the Patchbay on the far left.
@@ -15,7 +15,7 @@ Figure~\ref{fig:overlay-01} shows the pulldown in the patchbay and the tool tip
 
 \begin{figure}[htpb]
     \centering
-    \includegraphics[width=0.8\linewidth]{images/overlay-01.png}
+    \includegraphics[width=0.99\linewidth]{overlay-01.png}
     \caption{Patchbay pulldown with Porter Duff and Graphic Art overlays expanded}
     \label{fig:overlay-01}
 \end{figure}
@@ -24,32 +24,32 @@ Porter-Duff is the industry standard for alpha blending operations.  Only a shor
 
 Conceptually, when the foreground color is completely opaque, the resulting blended color will be the foreground color.  If it is transparent, the blended color will be the color of the background.  When the value of the alpha channel is $1$, the image is all there, if it is $0$, there is no image at all, otherwise it is only partially there.  In other words, the alpha value goes from $0$ to $1$, where full transparency is $0$ and opaque is represented by $1$.  Alpha blending models opacity. 
 
-When blending source and destination shapes (Dst and Src), the shape boundaries can be changed with the alpha blending effects.  There are a total of 10 standard Porter-Duff operators, but there are 30 possible overlay modes used in Cinelerra-GG.  Each is characterized by its value in the four regions: source, destination and both, with the \textit{neither} region always being blank.  The source and destination regions can either be blank or filled with the source or destination colors.  A specific compositing math formula is used to calculate effect.  This is only applicable to RGB; some effort has been made to accommodate YUV, but the effects are not as predictable, and may not be useful. 
+When blending source and destination shapes (Dst and Src), the shape boundaries can be changed with the alpha blending effects.  There are a total of 10 standard Porter-Duff operators, but there are 30 possible overlay modes used in \CGG{}.  Each is characterized by its value in the four regions: source, destination and both, with the \textit{neither} region always being blank.  The source and destination regions can either be blank or filled with the source or destination colors.  A specific compositing math formula is used to calculate effect.  This is only applicable to RGB; some effort has been made to accommodate YUV, but the effects are not as predictable, and may not be useful. 
 
-Below, in figure~\ref{fig:normal}, are the results of utilizing the 30 available operations within Cinelerra as listed on a following page.  Src is the solid green rectangle and Dst is the solid red rectangle.  There are better illustrations of what alpha blending can do, however for consistency sake, these are the results when using standards.
+Below, in figure~\ref{fig:normal}, are the results of utilizing the 30 available operations within \CGG{} as listed on a following page.  Src is the solid green rectangle and Dst is the solid red rectangle.  There are better illustrations of what alpha blending can do, however for consistency sake, these are the results when using standards.
 
 \begin{figure}[htpb]
     \centering
-    \includegraphics[width=0.84\linewidth]{images/normal.png}
+    \includegraphics[width=0.84\linewidth]{normal.png}
     \caption{Normal and Arithmetic overlays}
     \label{fig:normal}
 \end{figure}
 
 \begin{figure}[htpb]
     \centering
-    \includegraphics[width=0.84\linewidth]{images/porter-duff.png}
+    \includegraphics[width=0.84\linewidth]{porter-duff.png}
     \caption{Porter Duff overlays}
 \end{figure}
 
 \begin{figure}[htpb]
     \centering
-    \includegraphics[width=0.84\linewidth]{images/logical.png}
+    \includegraphics[width=0.84\linewidth]{logical.png}
     \caption{Logical overlays}
 \end{figure}
 
 \begin{figure}[htpb]
     \centering
-    \includegraphics[width=0.84\linewidth]{images/graphic-art.png}
+    \includegraphics[width=0.84\linewidth]{graphic-art.png}
     \caption{Graphic Art overlays}
 \end{figure}
 
@@ -59,13 +59,13 @@ Below, in figure~\ref{fig:normal}, are the results of utilizing the 30 available
 The implementation math forms are subsequently listed, where:
 
 \vspace{2ex}
-\begin{lstlisting}[language=bash]
+\begin{lstlisting}[style=sh]
 Legend:
 D = Destination
 S = Source
 a = alpha
 c = chroma (color)
-|| = OR (logical operator); 
+|| = OR (logical operator);
 ? : = if (true/false) ... then (conditional ternary operator)
 \end{lstlisting}
 
@@ -126,7 +126,7 @@ Each line describes a pair with the left one for alpha and the right one for chr
     \item[SCREEN:] $[Sa + Da - Sa \times Da, Sc + Dc - (Sc \times Dc)]$ (same as OR)
     \item[BURN:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + Sc \leqslant 0 \parallel Sc \times Da + Dc \times Sa \leqslant Sa \times Da \quad ? \quad 0 : (Sc \times Da + Dc \times Sa - Sa \times Da) \times Sa/Sc]$
     \item[DODGE:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + Sa \leqslant Sc \parallel Sc \times Da + Dc \times Sa \geqslant Sa \times Da \quad ? \quad       Sa \times Da : Dc \times Sa / (1 - Sc/Sa)]$
-    \item[DIFFERENCE:] $[Sa + Da - Sa \times Da,  Sc \times (1 - Da) + Dc \times (1 - Sa) + abs{(Sc \times Da - Dc \times Sa)}]$
+    \item[DIFFERENCE:]~\\ $[Sa + Da - Sa \times Da,  Sc \times (1 - Da) + Dc \times (1 - Sa) + abs{(Sc \times Da - Dc \times Sa)}]$
     \item[HARDLIGHT:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + 2 \times Sc < Sa \quad ? \quad 2 \times Sc \times Dc : Sa \times Da -        2 \times (Da - Dc) \times (Sa - Sc)]$
     \item[SOFTLIGHT:] $[Sa + Da - Sa \times Da, Sc \times (1 - Da) + Dc \times (1 - Sa) + Da > 0 \quad ? \quad (Dc \times Sa + 2 \times Sc \times (Da -        Dc))/Da : 0]$
 \end{description}
@@ -138,8 +138,10 @@ The previous math forms are the only truly accurate description of each blending
 
 Note: the Graphic Art group operates principally on color, and the others operate principally on alpha.
 
-\subsection*{Normal}%
+% Leave the word Group in due to latex2html dual name conflict
+\subsection*{Normal Group}%
 \label{sub:normal2}
+\index{overlays!normal}
 
 \begin{description}
     \item[Normal:] Normal mode is the default layer mode.  The result color is the source color.  The layer on top covers the layers below it.  If you want to see anything below the top layer when you use this mode, the layer must have some transparent areas.  It is \textit{stacked on top}.  Math formula used is different than that used by Gimp; there is no SVG equivalent.
@@ -147,6 +149,7 @@ Note: the Graphic Art group operates principally on color, and the others operat
 
 \subsection*{Arithmetic Group:}%
 \label{sub:arithmetic_group}
+\index{overlays!arithmetic}
 
 Standard numerical operations.
 
@@ -160,6 +163,7 @@ Standard numerical operations.
 
 \subsection*{Porter-Duff Group}%
 \label{sub:porter-duff_group}
+\index{overlays!Porter-Duff}
 
 Industry standard compositing operators.
 
@@ -178,6 +182,7 @@ Industry standard compositing operators.
 
 \subsection*{Logical Group}%
 \label{sub:logical_group}
+\index{overlays!logical}
 
 \begin{description}
     \item[Min:] The output color is the component-wise minimum value of the source and destination colors.  There is no SVG or Gimp equivalent math formula.
@@ -191,6 +196,7 @@ Industry standard compositing operators.
 
 \subsection*{Graphical Art Group}%
 \label{sub:graphical_art_group}
+\index{overlays!graphical art}
 
 Typical operations from popular \textit{paint} packages.
 
@@ -200,7 +206,12 @@ Typical operations from popular \textit{paint} packages.
     \item[Burn:] Darkens the destination color to reflect the source color.  Burning with white produces no change.  In photography, burning is a technique used in a darkroom to increase the exposure in particular areas of the image.  This brings out details in the highlights.  Math formula is the same as used by SVG and Gimp.
     \item[Dodge:] Brightens the destination color to reflect the source color.  Dodging with black produces no change.  The result color is a lightening of the source color to reflect the underlying layer color by decreasing the contrast.  If the source color is pure black, the result color is the underlying color.  In photography, dodging is a technique used in a darkroom to decrease the exposure in particular areas of the image.  This brings out details in the shadows.  Math formula is the same as used by SVG and Gimp.
     \item[Difference:] Subtracts the darker of the two constituent colors from the lighter.  This is the same as \textit{Subtract} except that the absolute value is used.  \textit{Subtract} colors which would be black due to clipping become visible instead.  Differencing with white inverts the destination color.  Differencing with black produces no change.  Math formula is the same as used by SVG and Gimp.
-    \item[Hardlight:] Multiplies or screens the colors, dependent on the source color value.  If the source color is lighter than $0.5$, the destination is lightened as if it were screened.  If the source color is darker than $0.5$, the destination is darkened, as if it were multiplied.  The degree of lightening or darkening is proportional to the difference between the source color and $0.5$.  If it is equal to $£0.5$ the destination is unchanged.  Using pure black or white produces black or white.  The effect is similar to shining a harsh spotlight on the destination.  This mode is useful for creating the appearance of shadows on a layer.  You might use this mode to combine two photographs and obtain bright colors and sharp edges.  Math formula is the same as used by SVG and Gimp.
+    \item[Hardlight:] Multiplies or screens the colors, dependent on the source color value.  If the source color is lighter than $0.5$, the destination is lightened as if it were screened.  If the source color is darker than $0.5$, the destination is darkened, as if it were multiplied.  The degree of lightening or darkening is proportional to the difference between the source color and $0.5$.  If it is equal to $0.5$ the destination is unchanged.  Using pure black or white produces black or white.  The effect is similar to shining a harsh spotlight on the destination.  This mode is useful for creating the appearance of shadows on a layer.  You might use this mode to combine two photographs and obtain bright colors and sharp edges.  Math formula is the same as used by SVG and Gimp.
     \item[Softlight:] Darkens or lightens the colors, dependent on the source color value.  If the source color is lighter than 0.5, the destination is lightened. If the source color is darker than $0.5$, the destination is darkened, as if it were burned in.  The degree of darkening or lightening is proportional to the difference between the source color and $0.5$.  If it is equal to $0.5$, the destination is unchanged.  Using pure black or white produces a distinctly darker or lighter area, but does not result in pure black or white.  The effect is similar to shining a diffused spotlight on the destination.  A layer with pure black or white becomes markedly darker or lighter, but does not become pure black or white.  Soft light is not related to “Hard light” in anything but the name, but it does tend to make the edges softer and the colors not so bright.   Math formula is the same as used by Gimp; SVG formula differs.
 \end{description}
 
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: "../CinelerraGG_Manual"
+%%% End: