Page 310 - Open Soource Technologies 304.indd
P. 310

Web Technologies-I



                   Notes         The output of Example is shown in Figure 12.9.
                                                            Figure 12.9: A Sample Path































                                 We can use pdf_closepath( ) and pdf_fill_stroke( ) to close the path and then fill it with the
                                 current fill color by replacing the pdf_stroke( ) call in Example with these two lines:

                                 pdf_closepath($p);
                                 pdf_fill_stroke($p);
                                 The pdf_fill_stroke( ) function fills and strokes the path with the current fill and stroke colors.
                                 Our output now looks like Figure 12.10.

                                                        Figure 12.10: Closed and Filled Path


































        304                               LOVELY PROFESSIONAL UNIVERSITY
   305   306   307   308   309   310   311   312   313   314   315