AlternateFill
IPDFDocument4 :: Page Operations :: Graphics

See Also Example
Collapse All

This method fills a path with color using an even-odd rule.

Syntax

HRESULT AlternateFill ()
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

This method is used to fill the inside of a path with the current fill color. This method uses the even-odd rule for defining the inside path.

The fill color may be set using methods SetColorFill orĀ SetColor.

Example

Difference between the Fill and AlternateFill Methods

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.DrawCircle(100, 100, 80);
PDF.DrawCircle(140, 160, 80);
PDF.Fill;
PDF.DrawCircle(300, 100, 80);
PDF.DrawCircle(340, 160, 80);
PDF.AlternateFill;
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->DrawCircle(100, 100, 80);
PDF->DrawCircle(140, 160, 80);
PDF->Fill();
PDF->DrawCircle(300, 100, 80);
PDF->DrawCircle(340, 160, 80);
PDF->AlternateFill();
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.DrawCircle(100, 100, 80);
PDF.DrawCircle(140, 160, 80);
PDF.Fill();
PDF.DrawCircle(300, 100, 80);
PDF.DrawCircle(340, 160, 80);
PDF.AlternateFill();
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.DrawCircle 100, 100, 80
PDF.DrawCircle 140, 160, 80
PDF.Fill
PDF.DrawCircle 300, 100, 80
PDF.DrawCircle 340, 160, 80
PDF.AlternateFill
PDF.SaveToFile "test.pdf", true

See Also

Reference