![]() ![]() X being how far from left to right to draw the point and Y being how far from top to bottom. It takes one parameter, but that parameter is an array of points specified in x y coordinates. Instead there is a draw polygon function. Also notice that there is no draw square function. Notice that you can specify the line style and the line width. Here is some sample code that creates a square. This can be used to create bar graphs or to highlight certain areas. If you run the code you should see your PDF pop up with a beautiful header at the top of the page.Īnother fun thing is to create shapes in your PDF files. This will give us the full width of the page we then subtract 30 off of it (15 for the left border and 15 for the right border), the last parameter is the height of the cell, 40 will be plenty high to accommodate our text. To accomplish this we can use the mjwPDF classes PDFGetPageWidth function. We want it to stretch all the way over to the right side of the page (minus the 15 point right border). Next we have to specify how wide the box is going to be. The next parameter is 15 points down from the top. Next we tell it how far over from the left we want the box (or cell) in our case we said 15 points over from the left. ![]() The first parameter is simply the text we want displayed. The PDFSetFill=true tells mjwPDF to fill this box in when it prints out our text. ![]() Next the text color is set and our alignment and border. Next we set the DrawColor (which in this case will be the highlight or inside color of our box). You should recognize the first line of code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |