class Eps

This Class is EPS Library and helps in developing structure of EPS Schema Export

Properties

$font
$fontSize
$stringCommands

Methods

__construct()

The "Eps" constructor

void
setTitle(string $value)

Set document title

void
setAuthor(string $value)

Set document author

void
setDate(string $value)

Set document creation date

void
setOrientation(string $orientation)

Set document orientation

void
setFont(string $value, integer $size)

Set the font and size

string
getFont()

Get the font

string
getFontSize()

Get the font Size

void
line(integer $x_from = 0, integer $y_from = 0, integer $x_to = 0, integer $y_to = 0, integer $lineWidth = 0)

Draw the line

void
rect(integer $x_from, integer $y_from, integer $x_to, integer $y_to, integer $lineWidth)

Draw the rectangle

void
moveTo(integer $x, integer $y)

Set the current point

void
show(string $text)

Output/Display the text

void
showXY(string $text, integer $x, integer $y)

Output the text at specified co-ordinates

void
endEpsDoc()

Ends EPS Document

void
showOutput(string $fileName)

Output EPS Document for download

Details

at line 37
__construct()

The "Eps" constructor

Upon instantiation This starts writing the EPS Document. %!PS-Adobe-3.0 EPSF-3.0 This is the MUST first comment to include it shows/tells that the Post Script document is purely under Document Structuring Convention [DSC] and is Compliant Encapsulated Post Script Document

at line 50
void setTitle(string $value)

Set document title

Parameters

string $value sets the title text

Return Value

void

at line 62
void setAuthor(string $value)

Set document author

Parameters

string $value sets the author

Return Value

void

at line 74
void setDate(string $value)

Set document creation date

Parameters

string $value sets the date

Return Value

void

at line 86
void setOrientation(string $orientation)

Set document orientation

Parameters

string $orientation sets the orientation

Return Value

void

at line 111
void setFont(string $value, integer $size)

Set the font and size

font can be set whenever needed in EPS

Parameters

string $value sets the font name e.g Arial
integer $size sets the size of the font e.g 10

Return Value

void

at line 127
string getFont()

Get the font

Return Value

string return the font name e.g Arial

at line 137
string getFontSize()

Get the font Size

Return Value

string return the size of the font e.g 10

at line 160
void line(integer $x_from = 0, integer $y_from = 0, integer $x_to = 0, integer $y_to = 0, integer $lineWidth = 0)

Draw the line

drawing the lines from x,y source to x,y destination and set the width of the line. lines helps in showing relationships of tables

Parameters

integer $x_from The x_from attribute defines the start left position of the element
integer $y_from The y_from attribute defines the start right position of the element
integer $x_to The x_to attribute defines the end left position of the element
integer $y_to The y_to attribute defines the end right position of the element
integer $lineWidth Sets the width of the line e.g 2

Return Value

void

at line 191
void rect(integer $x_from, integer $y_from, integer $x_to, integer $y_to, integer $lineWidth)

Draw the rectangle

drawing the rectangle from x,y source to x,y destination and set the width of the line. rectangles drawn around the text shown of fields

Parameters

integer $x_from The x_from attribute defines the start left position of the element
integer $y_from The y_from attribute defines the start right position of the element
integer $x_to The x_to attribute defines the end left position of the element
integer $y_to The y_to attribute defines the end right position of the element
integer $lineWidth Sets the width of the line e.g 2

Return Value

void

at line 215
void moveTo(integer $x, integer $y)

Set the current point

The moveto operator takes two numbers off the stack and treats them as x and y coordinates to which to move. The coordinates specified become the current point.

Parameters

integer $x The x attribute defines the left position of the element
integer $y The y attribute defines the right position of the element

Return Value

void

at line 227
void show(string $text)

Output/Display the text

Parameters

string $text The string to be displayed

Return Value

void

at line 241
void showXY(string $text, integer $x, integer $y)

Output the text at specified co-ordinates

Parameters

string $text String to be displayed
integer $x X attribute defines the left position of the element
integer $y Y attribute defines the right position of the element

Return Value

void

at line 252
void endEpsDoc()

Ends EPS Document

Return Value

void

at line 264
void showOutput(string $fileName)

Output EPS Document for download

Parameters

string $fileName name of the eps document

Return Value

void