



Collapse All
Syntax| HRESULT PDFPAGE_EoClip () |
RemarksThis method sets the current path as the boundary for clipping subsequent drawings. The use of the clip operator may require some care, because clip operators do not use the current path. Also note that there is no practical way of removing a clipping path, except by using PDFPAGE_GStateRestore before clipping. This methods uses an even-odd rule for defining the "path inside".
Equivalent in new interface: IPDFDocument4::AlternateClip.
Example{ PDF object is supposed to be created }
PDF.BeginDoc;
{ create clip region as circle }
PDF.PDFPAGE_Circle(100, 100, 80);
PDF.PDFPAGE_Circle(140, 160, 80);
PDF.PDFPAGE_EoClip;
{ now region is clipped, draw a text }
PDF.PDFPAGE_SetActiveFont('Verdana', false, false, false, false, 12.0, 0);
for i := 1 To 20 do
begin
PDF.PDFPAGE_TextOut(10, 15*i, 0.0, 'text text text text text text text text text');
end;
PDF.EndDoc;
// PDF object is supposed to be created
PDF->BeginDoc();
// create clip region as circle
PDF->PDFPAGE_Circle(100, 100, 80);
PDF->PDFPAGE_Circle(140, 160, 80);
PDF->PDFPAGE_EoClip();
// now region is clipped, draw a text
PDF->PDFPAGE_SetActiveFont("Verdana", false, false, false, false, 12.0, 0);
for (int i = 0; i < 21; i++)
PDF->PDFPAGE_TextOut(10, 15*i, 0.0, "text text text text text text text text text");
PDF->EndDoc();
// PDF object is supposed to be created
PDF.BeginDoc();
// create clip region as circle
PDF.PDFPAGE_Circle(100, 100, 80);
PDF.PDFPAGE_Circle(140, 160, 80);
PDF.PDFPAGE_EoClip();
// now region is clipped, draw a text
PDF.PDFPAGE_SetActiveFont("Verdana", false, false, false, false, 12.0, 0);
for (int i = 0; i < 21; i++)
PDF.PDFPAGE_TextOut(10, 15*i, 0.0, "text text text text text text text text text");
PDF.EndDoc();
' PDF object is supposed to be created
PDF.BeginDoc
' create clip region as circle
PDF.PDFPAGE_Circle 100, 100, 80
PDF.PDFPAGE_Circle 140, 160, 80
PDF.PDFPAGE_EoClip
' now region is clipped, draw a text
PDF.PDFPAGE_SetActiveFont "Verdana", False, False, False, False, 12.0, 0
For i = 1 To 20
PDF.PDFPAGE_TextOut 10, 15*i, 0.0, "text text text text text text text text text"
Next
PDF.EndDoc
See Also