Image_Puzzle
[ class tree: Image_Puzzle ] [ index: Image_Puzzle ] [ all elements ]

Class: Image_Puzzle_Edge

Source Location: /Image_Puzzle-0.2.2/Image/Puzzle/Edge.php

Class Overview


Abstract class for puzzle edge


Author(s):

Version:

  • @package_version@

Variables

Methods


Child classes:

Image_Puzzle_Edge_HalfCircle
Half circle edge.
Image_Puzzle_Edge_Sinus
Sinus edge.
Image_Puzzle_Edge_Default
Default edge shape. It is like original puzzle shape which is combined of square and ellipse
Image_Puzzle_Edge_Arc
Arc edge
Image_Puzzle_Edge_Line
Linear edge.

Inherited Variables

Inherited Methods


Class Details

[line 31]
Abstract class for puzzle edge


[ Top ]


Class Variables

$longitude =

[line 38]

Longitude length of edge in pixels
  • Access: protected

Type:   int


[ Top ]

$transversal =

[line 45]

Transversal length of edge in pixels
  • Access: protected

Type:   int


[ Top ]



Method Detail

__construct (Constructor)   [line 54]

Image_Puzzle_Edge __construct( int $longitude, int $transversal)

Edge constructor.

Creates new edge object.

  • Access: public

Overridden in child classes as:

Image_Puzzle_Edge_HalfCircle::__construct()
Image_Puzzle_Edge_Sinus::__construct()
Image_Puzzle_Edge_Default::__construct()
Image_Puzzle_Edge_Arc::__construct()

Parameters:

int   $longitude     Longitude length of edge in pixels
int   $transversal     Transversal length of edge in pixels

[ Top ]

factory   [line 92]

Image_Puzzle_Edge factory( string $edgeName, int $longitude, int $transversal)

Edge factory for creating new edge objects in the basis of their names.
  • Return: Returns new edge object
  • Access: public

Parameters:

string   $edgeName     Name of the edge class
int   $longitude     Longitude length of edge in pixels
int   $transversal     Transversal length of edge in pixels

[ Top ]

getLeftTopMargin   [line 64]

void getLeftTopMargin( )

Returns left margin for vertical edge or top margin for horizontal edge.
  • Abstract:
  • Access: public

Overridden in child classes as:

Image_Puzzle_Edge_HalfCircle::getLeftTopMargin()
Image_Puzzle_Edge_Sinus::getLeftTopMargin()
Image_Puzzle_Edge_Default::getLeftTopMargin()
Image_Puzzle_Edge_Arc::getLeftTopMargin()
Image_Puzzle_Edge_Line::getLeftTopMargin()

[ Top ]

getRightBottomMargin   [line 71]

void getRightBottomMargin( )

Returns right margin for vertical edge or bottom margin for horizontal edge.
  • Abstract:
  • Access: public

Overridden in child classes as:

Image_Puzzle_Edge_HalfCircle::getRightBottomMargin()
Image_Puzzle_Edge_Sinus::getRightBottomMargin()
Image_Puzzle_Edge_Default::getRightBottomMargin()
Image_Puzzle_Edge_Arc::getRightBottomMargin()
Image_Puzzle_Edge_Line::getRightBottomMargin()

[ Top ]

isTransparent   [line 80]

boolean isTransparent( int $x, int $y)

Returns true if point x,y on the edge should be transparent.
  • Return: Returns true if point x,y should be transparent.
  • Access: public

Overridden in child classes as:

Image_Puzzle_Edge_HalfCircle::isTransparent()
Image_Puzzle_Edge_Sinus::isTransparent()
Image_Puzzle_Edge_Default::isTransparent()
Image_Puzzle_Edge_Arc::isTransparent()

Parameters:

int   $x     X coordinate
int   $y     Y coordinate

[ Top ]


Documentation generated on Sun, 24 Oct 2010 06:30:02 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.