Search code examples
phppdflib

Draw path is not closing the shape


I'm using PDFLib v-8 and trying to generate triangle using that path point. I'm able to generate 2 sides of triangle not the complete one. Though I can add one more path to that,but in the case of uneven shape I'll be not able to do that just because of unawareness of the complete shape.

Is there any what to determine the complete shape and draw the complete path using path point in pdflib ?

Thanks in advance..


Solution

  • You can use

    PDFLib_draw_path($triangle_path, x, y, "close stroke fitmethod=entire ");
    

    Here, close option will complete the shape.

    Thanks.