bracket_pdf.inc File Reference
Functions |
| bracket_pdf_setup_colors ($node, $pdf) |
| bracket_pdf_setup_bar_colors ($node, $pdf) |
| bracket_pdf_font_options () |
| bracket_pdf_setup_font ($node) |
| bracket_pdf_drawbracketset ($pdf, $node, $lr, $top, $width, $height, $spacing, $round, $startmatch, $endmatch, $orient='L', $comments=TRUE, $dashed=FALSE) |
| bracket_pdf_drawcell ($pdf, $lr, $top, $width, $height, $match, $orient, $comments=TRUE, $matchid=FALSE, $dashed=FALSE) |
| bracket_pdf_drawdashedline ($pdf, $x1, $y1, $x2, $y2) |
| bracket_pdf_insert_image ($pdf, $imgpath, $x, $y, $w=0, $center=FALSE) |
Variables |
global | $bracket_pdf_font_name = 'Helvetica' |
global | $bracket_pdf_font_xlarge = 14 |
global | $bracket_pdf_font_large = 10 |
global | $bracket_pdf_font_norm = 8 |
global | $bracket_pdf_font_small = 7 |
global | $bracket_pdf_font_xsmall = 6 |
Detailed Description
This file contains the pdf helper functions for the bracket module
- Author:
- Jim Bullington <jimb@jrbcs.com>
Function Documentation
bracket_pdf_drawbracketset |
( |
$ |
pdf, |
|
|
$ |
node, |
|
|
$ |
lr, |
|
|
$ |
top, |
|
|
$ |
width, |
|
|
$ |
height, |
|
|
$ |
spacing, |
|
|
$ |
round, |
|
|
$ |
startmatch, |
|
|
$ |
endmatch, |
|
|
$ |
orient = 'L' , |
|
|
$ |
comments = TRUE , |
|
|
$ |
dashed = FALSE | |
|
) |
| | |
Draw a bracket set on the given pdf
A bracket set is a vertical set of matches in a round
- Parameters:
-
| $pdf | the pdf object |
| $node | the bracket node |
| $lr | the left or right edge (x-coord) of the bracket set (depending on orientation) |
| $top | the top edge (y-coord) of the bracket set |
| $width | the width of the bracket set |
| $height | the vertical spacing between bracket lines (competitors) |
| $spacing | the vertical spacing between bracket cells (matches) |
| $round | the bracket round |
| $startmatch | the starting match of this bracket set |
| $endmatch | the ending match of this bracket set |
| $orient | the orientation of the bracket set - 'L'=left or 'R'=right (optional - default is left) |
| $comments | if true, match comments are displayed (optional - default is true) |
| $dashed | if true, dashed bracket lines are produced (optional - default is false) |
bracket_pdf_drawcell |
( |
$ |
pdf, |
|
|
$ |
lr, |
|
|
$ |
top, |
|
|
$ |
width, |
|
|
$ |
height, |
|
|
$ |
match, |
|
|
$ |
orient, |
|
|
$ |
comments = TRUE , |
|
|
$ |
matchid = FALSE , |
|
|
$ |
dashed = FALSE | |
|
) |
| | |
Draw a bracket cell on the given pdf
A bracket cell is a match
- Parameters:
-
| $pdf | the pdf object |
| $lr | the left or right edge (x-coord) of the bracket cell (depending on orientation) |
| $top | the top edge (y-coord) of the bracket set |
| $width | the width of the bracket set |
| $height | the vertical spacing between bracket lines (competitors) |
| $match | the match object to draw on this bracket cell |
| $orient | the orientation of the bracket set - 'L'=left or 'R'=right |
| $comments | if true, match comments are displayed (optional - default is true) |
| $matchid | if true, match ids are displayed (optional - default is false) |
| $dashed | if true, dashed bracket lines are produced (optional - default is false) |
bracket_pdf_drawdashedline |
( |
$ |
pdf, |
|
|
$ |
x1, |
|
|
$ |
y1, |
|
|
$ |
x2, |
|
|
$ |
y2 | |
|
) |
| | |
Draw a dashed line on the given pdf
- Parameters:
-
| $pdf | the pdf object |
| $x1 | the starting x-coord |
| $y1 | the starting y-coord |
| $x2 | the ending x-coord |
| $y2 | the ending y-coord |
bracket_pdf_font_options |
( |
|
) |
|
Return the pdf font options
- Returns:
- the current pdf font options
bracket_pdf_insert_image |
( |
$ |
pdf, |
|
|
$ |
imgpath, |
|
|
$ |
x, |
|
|
$ |
y, |
|
|
$ |
w = 0 , |
|
|
$ |
center = FALSE | |
|
) |
| | |
Insert an image into the given pdf
- Parameters:
-
| $pdf | the pdf object |
| $imgpath | the path to the image |
| $x | the x coordinate of the pdf at which to insert the image |
| $y | the y coordinate of the pdf at which to insert the image |
| $w | scale the image to this width (optional - default is no scaling) |
| $center | center the image over the coordinates (optional - default is FALSE) |
bracket_pdf_setup_bar_colors |
( |
$ |
node, |
|
|
$ |
pdf | |
|
) |
| | |
Setup pdf colors for bracket bar
- Parameters:
-
| $node | the bracket node |
| $pdf | the pdf object |
bracket_pdf_setup_colors |
( |
$ |
node, |
|
|
$ |
pdf | |
|
) |
| | |
Setup pdf colors
- Parameters:
-
| $node | the bracket node |
| $pdf | the pdf object |
bracket_pdf_setup_font |
( |
$ |
node |
) |
|
Set the pdf font
- Parameters:
-