class Eps (View source)

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

Properties

string $font
int $fontSize
string $stringCommands

%!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

Methods

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, int $size)

Set the font and size

string
getFont()

Get the font

int
getFontSize()

Get the font Size

void
line(int|float $xFrom = 0, int|float $yFrom = 0, int|float $xTo = 0, int|float $yTo = 0, int $lineWidth = 0)

Draw the line

void
rect(int|float $xFrom, int|float $yFrom, int|float $xTo, int|float $yTo, int $lineWidth)

Draw the rectangle

void
moveTo(int|float $x, int|float $y)

Set the current point

void
show(string $text)

Output/Display the text

void
showXY(string $text, int|float $x, int|float $y)

Output the text at specified co-ordinates

void
endEpsDoc()

Ends EPS Document

string
getOutputData()

No description

Details

void setTitle(string $value)

Set document title

Parameters

string $value

sets the title text

Return Value

void

void setAuthor(string $value)

Set document author

Parameters

string $value

sets the author

Return Value

void

void setDate(string $value)

Set document creation date

Parameters

string $value

sets the date

Return Value

void

void setOrientation(string $orientation)

Set document orientation

Parameters

string $orientation

sets the orientation

Return Value

void

void setFont(string $value, int $size)

Set the font and size

font can be set whenever needed in EPS

Parameters

string $value

sets the font name e.g Arial

int $size

sets the size of the font e.g 10

Return Value

void

string getFont()

Get the font

Return Value

string

return the font name e.g Arial

int getFontSize()

Get the font Size

Return Value

int

return the size of the font e.g 10

void line(int|float $xFrom = 0, int|float $yFrom = 0, int|float $xTo = 0, int|float $yTo = 0, int $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

int|float $xFrom

The x_from attribute defines the start left position of the element

int|float $yFrom

The y_from attribute defines the start right position of the element

int|float $xTo

The x_to attribute defines the end left position of the element

int|float $yTo

The y_to attribute defines the end right position of the element

int $lineWidth

Sets the width of the line e.g 2

Return Value

void

void rect(int|float $xFrom, int|float $yFrom, int|float $xTo, int|float $yTo, int $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

int|float $xFrom

The x_from attribute defines the start left position of the element

int|float $yFrom

The y_from attribute defines the start right position of the element

int|float $xTo

The x_to attribute defines the end left position of the element

int|float $yTo

The y_to attribute defines the end right position of the element

int $lineWidth

Sets the width of the line e.g 2

Return Value

void

void moveTo(int|float $x, int|float $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

int|float $x

The x attribute defines the left position of the element

int|float $y

The y attribute defines the right position of the element

Return Value

void

void show(string $text)

Output/Display the text

Parameters

string $text

The string to be displayed

Return Value

void

void showXY(string $text, int|float $x, int|float $y)

Output the text at specified co-ordinates

Parameters

string $text

String to be displayed

int|float $x

X attribute defines the left position of the element

int|float $y

Y attribute defines the right position of the element

Return Value

void

void endEpsDoc()

Ends EPS Document

Return Value

void

string getOutputData()

No description

Return Value

string