[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Drag-and-drop markers classes for dealing with shapes on the server side.
Author: | Jamie Pratt <me@jamiep.org> |
Copyright: | 2012 The Open University |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 481 lines (16 kb) |
Included or required: | 0 times |
Referenced: | 2 times |
Includes or requires: | 0 files |
qtype_ddmarker_shape_rectangle:: (4 methods):
__construct()
outlying_coords_to_test()
is_point_in_shape()
center_point()
qtype_ddmarker_shape_circle:: (4 methods):
__construct()
outlying_coords_to_test()
is_point_in_shape()
center_point()
qtype_ddmarker_shape_polygon:: (5 methods):
__construct()
outlying_coords_to_test()
is_point_in_shape()
is_left()
center_point()
qtype_ddmarker_point:: (2 methods):
__construct()
dist()
Class: qtype_ddmarker_shape_rectangle - X-Ref
Class to represent a rectangle.__construct($coordsstring) X-Ref |
No description |
outlying_coords_to_test() X-Ref |
No description |
is_point_in_shape($xy) X-Ref |
No description |
center_point() X-Ref |
No description |
Class: qtype_ddmarker_shape_circle - X-Ref
Class to represent a circle.__construct($coordsstring) X-Ref |
No description |
outlying_coords_to_test() X-Ref |
No description |
is_point_in_shape($xy) X-Ref |
No description |
center_point() X-Ref |
No description |
Class: qtype_ddmarker_shape_polygon - X-Ref
Class to represent a polygon.__construct($coordsstring) X-Ref |
outlying_coords_to_test() X-Ref |
No description |
is_point_in_shape($xy) X-Ref |
No description |
is_left(qtype_ddmarker_point $start, qtype_ddmarker_point $end,qtype_ddmarker_point $point) X-Ref |
Tests if a point is left / on / right of an infinite line. param: qtype_ddmarker_point $start first of two points on the infinite line. param: qtype_ddmarker_point $end second of two points on the infinite line. param: qtype_ddmarker_point $point the oint to test. return: number > 0 if the point is left of the line. |
center_point() X-Ref |
No description |
__construct($coordsstring) X-Ref |
No description |
inside_width_height($widthheight) X-Ref |
No description |
is_only_numbers() X-Ref |
Test if all passed parameters consist of only numbers. return: bool True if only numbers |
is_point_in_bounding_box($pointxy, $xleftytop, $xrightybottom) X-Ref |
Checks if the point is within the bounding box made by top left and bottom right param: array $pointxy Array of the point (x, y) param: array $xleftytop Top left point of bounding box param: array $xrightybottom Bottom left point of bounding box return: bool |
get_coords_interpreter_error() X-Ref |
Gets any coordinate error return: string|bool String of the error or false if there is no error |
name() X-Ref |
Returns the name of the shape. return: string |
human_readable_name($lowercase = false) X-Ref |
Return a human readable name of the shape. param: bool $lowercase True if it should be lowercase. return: string |
human_readable_coords_format() X-Ref |
No description |
shape_options() X-Ref |
No description |
exists($shape) X-Ref |
Checks if the passed shape exists. param: string $shape The shape name return: bool |
create($shape, $coordsstring) X-Ref |
Creates a new shape of the specified type. param: string $shape The shape to create param: string $coordsstring The string describing the coordinates return: object |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |