phpImageCloud Class Methods.
Class Methods
imagecloud
void imagecloud(
int
$width, int
$height, [int
$bgr = 255], [int
$bgg = 255], [int
$bgb = 255], [float
$scale = 1])
[line 51]
Constructor
Notice: Don't try to use to large scale. up to 10 is ok.. but more.. it will burn your memory :)
Parameters:
-
int
$width
-
Width of image cloud
-
int
$height
-
Height of image cloud
-
int
$bgr
-
Background (red)
-
int
$bgg
-
Background (green)
-
int
$bgb
-
Background (blue)
-
float
$scale
-
Scale of images. 0.1 - 10 is ok.
[ Top ]
additem
bool|int additem(
string
$image, int
$value, [mixed
$id = false])
[line 79]
Calculate image items and coordinates and add its info to calculation array
Tags:
- return - True or int - need to add another item, False - image cloud is full, create it. If returns int - it's count of items in create array.
Parameters:
-
string
$image
-
Filename of image
-
int
$value
-
Value(Weight) of this image (1-100)
-
mixed
$id
-
Id of item (can be false or empty if not needed)
[ Top ]
copy_blur
array copy_blur(
mixed
$src, int
$x, int
$y, int
$dst_width, int
$dst_height)
[line 271]
Copy image (resampled) with simple blur
Tags:
- return - Array with items coordinates
Parameters:
-
mixed
$src
-
Image to copy
-
int
$x
-
X on result image
-
int
$y
-
Y on result image
-
int
$dst_width
-
Width of copy
-
int
$dst_height
-
Height of copy
[ Top ]
create
mixed create(
void
0)
[line 164]
Make final creating of image cloud
Tags:
- return - Image cloud image object (truecolor image)
Parameters:
[ Top ]
getarray
array getarray(
void
0)
[line 292]
Get data array. You need to cache it to calculate coordinates of click to item id
Tags:
- return - Array with items coordinates
Parameters:
[ Top ]
saveitemtofile
bool saveitemtofile(
int
$item_index,
$filename)
[line 188]
Save cloud item to filename. Must be PNG and writable.
Tags:
- return - true - ok, false - not much
Parameters:
-
int
$item_index
-
index of item in create array (additem returns count of elements in this array)
-
$filename
-
[ Top ]