<li class="Bulleted"><a href="06-Painting14.html#1016167">Limiting and Preventing Leakage</a></li><br/>
</td>
</tr>
</table>
<blockquote>
<h2 id="1014469" class="Heading1">
<a name="1014469"> </a>Filling Techniques
</h2>
<h3 id="1014472" class="Heading2">
<a name="1014472"> </a>Filling an Area with Media
</h3>
<p id="1014474" class="Body">
<a name="1014474"> </a>You can fill an area of an image with a gradient, pattern, weave, or color.
</p>
<p id="1014476" class="Body">
<a name="1014476"> </a>What about filling with paper? The paper is a texture; it has no color by itself. However, you can get texture into an image with various image effects. Many surface control effects let you use paper as the control medium. For more information about surface control effects, refer to <a href="15-Effects9.html#999878">"Apply Surface Texture"</a> and <a href="15-Effects10.html#1047932">"Other Surface Control Effects"</a>.
</p>
<h5 id="1014995" class="ToDoHead">
<a name="1014995"> </a>To fill an area of an image
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1015138"> </a>Do one of the following :</li>
</ol>
<ul>
<li class="Bulleted2"><a name="1014969"> </a>If you want to fill only part of an image, make a selection.</li>
<li class="Bulleted2"><a name="1014984"> </a>If you want to fill a layer, select the layer on the Layers palette.</li>
<li class="Bulleted2"><a name="1014988"> </a>If you want to fill an alpha channel, select the channel on the Channels palette. </li>
<li class="Bulleted2"><a name="1015013"> </a>If you want to fill the entire image, make sure there are no selections.</li>
<li class="SmartList1"><a name="1015087"> </a>Corel Painter uses the current color, pattern, gradient, or weave. Before filling, choose the media you want from the corresponding selector in the toolbox. </li>
</ul>
<h3 id="1015742" class="Heading2">
<a name="1015742"> </a>Filling Images Based on Color
</h3>
<p id="1015814" class="Body">
<a name="1015814"> </a>You can use the Paint Bucket tool to fill image areas based on pixel color. This method can be used on the canvas or in a channel. Corel Painter fills areas based on color boundaries and the current Tolerance and Feather settings.
</p>
<p id="1015827" class="Body">
<a name="1015827"> </a>Tolerance sets the amount of variance allowed from the color of the pixel you click on. With Tolerance set low, the Paint Bucket fills only contiguous pixels that are very close to the color of the pixel you click on. With Tolerance high, the Paint Bucket fills a greater range of colors.
</p>
<p id="1015832" class="Body">
<a name="1015832"> </a>Feathering softens the edges of the fill by controlling the fill opacity for pixels with colors outside the Tolerance range. With Feather set to zero (the default), only pixels in the Tolerance range are filled. With Feather set low, pixels with colors just outside the Tolerance range receive partial fill. Increasing the Feather setting increases the range of colors that receive partial fill. Pixels with colors further from the Tolerance range receive a more transparent fill. Typically, when Feather is high, Tolerance is set low.
</p>
<p id="1015929" class="Body">
<a name="1015929"> </a>The Lock Out Color feature protects areas of a given color from accidental filling. You can choose a color that will not accept filling when clicked with the Paint Bucket. Black is the default locked-out color.
</p>
<h5 id="1015743" class="ToDoHead">
<a name="1015743"> </a>To fill an image based on color
<li class="Bulleted2"><a name="1014518"> </a><span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Clone Source</span>-fills using the current clone source image. If you haven't defined a clone source, Corel Painter fills with the current pattern. </li>
<li class="Bulleted2"><a name="1014526"> </a><span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Weave</span>-fills with the selected weave</li>
</ul>
<ol type="1">
<li class="SmartList1" value="4"><a name="1014527"> </a>Choose the specific material you want from the Fill selector.</li>
<li class="SmartList1" value="5"><a name="1014528"> </a>Type a value in the Tolerance box, or adjust the pop-up slider, to specify the range of colors to be filled.</li>
<li class="SmartList1" value="6"><a name="1015847"> </a>Type a value in the Feather box, or adjust the pop-up slider, to specify the fill opacity for pixels outside the Tolerance range.</li>
<p id="1014531" class="ToDoBody">
<a name="1014531"> </a>If you want to create intermediate fill values on the boundaries, enable the Anti-Alias check box. This gives soft edges to the fill. Anti-aliasing is desirable when Feather is zero or extremely low.
</p>
<li class="SmartList1" value="7"><a name="1014532"> </a>Click the area of the image you want to fill.</li>
<p id="1014533" class="ToDoBody">
<a name="1014533"> </a>If the result is not what you want, undo the fill, change the settings, and try again.
<li class="SmartList1"><a name="1015368"> </a>To see how Fill Image works, do the following:<br />1. On a blank document, draw several brush strokes of different colors. <br />2. Select a new color.<br />3. Choose the Paint Bucket tool and click the Fill Image button on the property bar.<br />4. Click an area of the image.<br />5. Choose <span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Edit menu > Undo</span>, and click an area of the image containing a different color.<br />6. Change the Tolerance and Feather settings and repeat steps 4-5.</li>
<li class="SmartList1"><a name="1014535"> </a>You can constrain the fill to a rectangular area by dragging with the Paint Bucket tool.</li>
</ul>
<h5 id="1015937" class="ToDoHead">
<a name="1015937"> </a>To choose a lock-out color
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1015938"> </a>On the Colors palette, choose the color you want protected.</li>
<li class="SmartList1" value="2"><a name="1015939"> </a>Double-click the Paint Bucket tool in the toolbox. </li>
<li class="SmartList1" value="3"><a name="1015940"> </a>In the Lock Out Color dialog box, click Set. </li>
<p id="1015941" class="ToDoBody">
<a name="1015941"> </a>The color swatch updates to the new color, and the Lock Out Color check box is enabled.
</p>
</ol>
<h3 id="1014559" class="Heading2">
<a name="1014559"> </a>Filling Cells
</h3>
<p id="1015786" class="Body">
<a name="1015786"> </a>You can use the Paint Bucket tool to fill the interior of areas bounded by lines. This is especially good for producing solid fills of regions bounded by anti-aliased lines.
</p>
<p id="1016683" class="Body">
<a name="1016683"> </a>If you want to fill regions completely, without affecting the lines, you can first copy the lines to a selection. Then, when you fill the cells, the lines are protected. For information about the method used to copy lines to a selection, refer to <a href="12-Selections4.html#1014518">"Creating an Auto Selection"</a>. You can also control how well the Paint Bucket respects the selection by setting the mask threshold.
<li class="SmartList1" value="2"><a name="1014572"> </a>In the Auto Select dialog box, choose Image Luminance from the Using pop-up menu.</li>
<li class="SmartList1" value="3"><a name="1014576"> </a>Click OK. </li>
<p id="1016036" class="ToDoBody">
<a name="1016036"> </a>Corel Painter creates a selection that will protect the dark lines.
</p>
<p id="1014577" class="ToDoBody">
<a name="1014577"> </a>When you protect anti-aliased or non-black lines in this way, the lines in the selection have varying levels of transparency-depending on the pixel luminance. The Mask Threshold lets you compensate for the semi-transparency of the selection to get just the fill you want.
</p>
</ol>
<h5 id="1014579" class="ToDoHead">
<a name="1014579"> </a>To set the mask threshold for the Paint Bucket
<li class="SmartList1" value="2"><a name="1016047"> </a>In the Lock Out Color dialog box, move the Mask Threshold slider.</li>
<p id="1016052" class="ToDoBody">
<a name="1016052"> </a>This slider controls how well the Paint Bucket respects the selection. At zero, the fill will overrun the selection boundaries. Higher threshold values force the fill to respect the boundaries. The appropriate threshold setting depends on the softness of your lines. You'll have to experiment with the Mask Threshold slider settings until the fill is limited to the area within the line.
<li class="Bulleted2"><a name="1016109"> </a><span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Clone Source</span>-fills using the current clone source image. If you haven't defined a clone source, Corel Painter fills with the current pattern. </li>
<li class="Bulleted2"><a name="1016114"> </a><span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Weave</span>-fills with the selected weave</li>
</ul>
<ol type="1">
<li class="SmartList1" value="4"><a name="1016115"> </a>Choose the specific material you want from the Fill selector.</li>
<li class="SmartList1" value="5"><a name="1014594"> </a>Click inside a bounded region.</li>
<p id="1016136" class="ToDoBody">
<a name="1016136"> </a>Corel Painter fills the area.
</p>
<p id="1014598" class="ToDoBody">
<a name="1014598"> </a>If the fill overruns the lines, you should increase the Mask Threshold setting. If the fill leaves line pixels anti-aliased to the background color, you should reduce the Mask Threshold setting.
<li class="SmartList1"><a name="1015884"> </a>To see how Fill Cell works, do the following:<br />1. Draw a black circle on a blank document. <br />2. Select a new color.<br />3. Choose the Paint Bucket tool, and click the Fill Cell button on the property bar.<br />4. Click inside the circle.<br />5. Choose <span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Edit menu > Undo</span>.<br />6. Select another color.<br />7. Click outside the circle.</li>
<li class="SmartList1"><a name="1015893"> </a>You can constrain the fill to a rectangular area by dragging with the Paint Bucket tool.</li>
<li class="SmartList1"><a name="1016146"> </a>If you are recording your session as a script, cell fills are captured as well. When playing back at a different resolution, cell fills (and their limiting rectangles) are properly scaled. For information on recording and playing back sessions, refer to <a href="22-Scripting3.html#999575">"Understanding Scripting"</a>. For information on limiting rectangles, refer to <a href="06-Painting14.html#1016167">"Limiting and Preventing Leakage"</a>.</li>
</ul>
<h3 id="1016167" class="Heading2">
<a name="1016167"> </a>Limiting and Preventing Leakage
</h3>
<p id="1016168" class="Body">
<a name="1016168"> </a>In complex drawings, lines don't always meet. This can create fill leaks into areas you don't want to be filled-sometimes through the whole image.
</p>
<p id="1016169" class="Body">
<a name="1016169"> </a>You can't always tell if there's a leak just by looking at your image. If you click a small area and see the prompt, "Now Looking for Extent of Fill," there's probably a leak and Corel Painter is preparing to fill a bigger area than you had in mind. In this case, you can abort the fill.
</p>
<p id="1017303" class="Body">
<a name="1017303"> </a>You can limit leakage to a specific rectangular area. In typical cartoon line work, unbounded areas-for example, hair, tail feathers, and brush bristles-sometimes must be filled. By limiting leakage to a specific area, you can close off these items.
</p>
<p id="1017373" class="Body">
<a name="1017373"> </a>You can also close leaks by copying the lines to a selection (refer to <a href="06-Painting14.html#1016648">"To copy lines to a selection:"</a>), saving the selection to a channel, editing the channel, and then reloading it to the selection. For more information about editing channels, refer to <a href="13-Channelsb6.html#1009435">"Editing Channels"</a>.
<li class="SmartList1"><a name="1017253"> </a>If you don't catch the fill in time, choose <span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Edit menu > Undo</span> or press <span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Command</span>+<span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Z</span> (Mac OS) or <span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Ctrl</span>+<span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Z</span> (Windows) to undo a fill that has leaked outside of the boundaries.</li>
</ul>
<h5 id="1016173" class="ToDoHead">
<a name="1016173"> </a>To limit leakage
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1016174"> </a>Choose the Paint Bucket tool from the toolbox. </li>
<li class="SmartList1" value="2"><a name="1016175"> </a>On the property bar, click the Fill Cell button or the Fill Image button.</li>
<li class="SmartList1" value="3"><a name="1016176"> </a>Drag to create a rectangle that just covers the area you want to fill.</li>
<p id="1016177" class="ToDoBody">
<a name="1016177"> </a>If there is no leak, only the area within the lines is filled. If there is a leak, the fill will go outside the area, but not beyond the constraints of your rectangle.
</p>
</ol>
<h5 id="1014614" class="ToDoHead">
<a name="1014614"> </a>To close a leak
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1014615"> </a>Copy the lines to a selection.</li>
<p id="1017323" class="ToDoBody">
<a name="1017323"> </a>Refer to <a href="06-Painting14.html#1016648">"To copy lines to a selection:"</a>.
<li class="SmartList1" value="10"><a name="1017331"> </a>In the Load Selection dialog box, choose the modified channel from the Load From pop-up menu.</li>
<li class="SmartList1" value="11"><a name="1015674"> </a>Enable the Replace Selection option to replace the original with the edited version.</li>
<p id="1015675" class="ToDoBody">
<a name="1015675"> </a>If you want to adjust the mask threshold, double-click the Paint Bucket tool in the toolbox and move the slider.
<li class="SmartList1"><a name="1015685"> </a>The channel does not have to be selected to contain the fill. If you deselect the channel on the Channels palette, the loaded selection is still in effect.</li>