HRESULT PDFPAGE_Clip () |
This method installs the current path as the boundary for clipping subsequent drawings. The use of the clip operators may require some care, because clip operator 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 a non-zero winding number rule for defining the "path inside".
Equivalent in new interface: IPDFDocument4::Clip.
{ PDF object is supposed to be created } PDF.BeginDoc; { create clip region as circle } PDF.PDFPAGE_Circle(80, 95, 70); PDF.PDFPAGE_Clip; { now region is clipped, draw a text } PDF.PDFPAGE_SetActiveFont('Verdana', false, false, false, false, 12.0, 0); for i := 1 To 10 do begin PDF.PDFPAGE_TextOut(10, 15*i, 0.0, '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(80, 95, 70); PDF->PDFPAGE_Clip(); // now region is clipped, draw a text PDF->PDFPAGE_SetActiveFont("Verdana", false, false, false, false, 12.0, 0); for (int i = 0; i < 10; i++) { PDF->PDFPAGE_TextOut(10, 15*i, 0.0, "text text text text text"); } PDF->EndDoc();
// PDF object is supposed to be created PDF.BeginDoc(); // create clip region as circle PDF.PDFPAGE_Circle(80, 95, 70); PDF.PDFPAGE_Clip(); // now region is clipped, draw a text PDF.PDFPAGE_SetActiveFont("Verdana", false, false, false, false, 12.0, 0); for (int i = 0; i < 10; i++) { PDF.PDFPAGE_TextOut(10, 15*i, 0.0, "text text text text text"); } PDF.EndDoc();
' PDF object is supposed to be created PDF.BeginDoc ' create clip region as circle PDF.PDFPAGE_Circle 80, 95, 70 PDF.PDFPAGE_Clip ' now region is clipped, draw a text PDF.PDFPAGE_SetActiveFont "Verdana", False, False, False, False, 12.0, 0 For i = 1 To 10 PDF.PDFPAGE_TextOut 10, 15*i, 0.0, "text text text text text" Next PDF.EndDoc