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

Class: Image_Puzzle_Piece

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

Class Overview


Image_Puzzle_Piece class


Author(s):

Version:

  • @package_version@

Methods


Inherited Variables

Inherited Methods


Class Details

[line 31]
Image_Puzzle_Piece class


[ Top ]


Method Detail

__construct (Constructor)   [line 104]

Image_Puzzle_Piece __construct( integer $left, integer $top, integer $width, integer $height)

Constructor
  • Access: public

Parameters:

integer   $left   — 
integer   $top   — 
integer   $width   — 
integer   $height   — 

[ Top ]

__destruct (Destructor)   [line 111]

void __destruct( )

  • Access: public

[ Top ]

addTransparent   [line 227]

void addTransparent( $color, array|string|Image_Color2_Model $src)

Make transparent pixels which should be not visible

Color parameter is a color accepted by Image_Color2

  • See: Image_Color2
  • Access: public

Parameters:

array|string|Image_Color2_Model   $src   —  specifying a color. Non-RGB arrays should include the type element to specify a color model. Strings will be interpreted as hex if they begin with a #, otherwise they'll be treated as named colors.
   $color   — 

[ Top ]

getHeight   [line 196]

integer getHeight( )

Returns height in pixels of the piece
  • Access: public

[ Top ]

getLeft   [line 169]

integer getLeft( )

Returns X coordinate of this piece according to whole image
  • Access: public

[ Top ]

getTop   [line 178]

integer getTop( )

Returns Y coordinate of this piece according to whole image
  • Access: public

[ Top ]

getWidth   [line 187]

integer getWidth( )

Returns width in pixels of the piece
  • Access: public

[ Top ]

save   [line 205]

void save( string $filename)

Saves image to the disk on given $filename
  • Access: public

Parameters:

string   $filename   — 

[ Top ]

setBottomEdge   [line 147]

void setBottomEdge( Image_Puzzle_Edge $edge)

Set bottom edge for this piece
  • Access: public

Parameters:

Image_Puzzle_Edge   $edge   — 

[ Top ]

setImage   [line 157]

void setImage( resource $image)

Set piece image. It should be used only by Image_Puzzle class to set image with needed margins
  • Access: public

Parameters:

resource   $image   — 

[ Top ]

setLeftEdge   [line 120]

void setLeftEdge( Image_Puzzle_Edge $edge)

Set left edge for this piece
  • Access: public

Parameters:

Image_Puzzle_Edge   $edge   — 

[ Top ]

setRightEdge   [line 129]

void setRightEdge( Image_Puzzle_Edge $edge)

Set right edge for this piece
  • Access: public

Parameters:

Image_Puzzle_Edge   $edge   — 

[ Top ]

setTopEdge   [line 138]

void setTopEdge( Image_Puzzle_Edge $edge)

Set top edge for this piece
  • Access: public

Parameters:

Image_Puzzle_Edge   $edge   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:40:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.