Base class to represent a shape.
More...
|
| static | create ($shape, $coordsstring) |
| | Creates a new shape of the specified type.
|
| |
| static | exists ($shape) |
| | Checks if the passed shape exists.
|
| |
|
static | human_readable_coords_format () |
| |
| static | human_readable_name ($lowercase=false) |
| | Return a human readable name of the shape.
|
| |
| static | name () |
| | Returns the name of the shape.
|
| |
|
static | shape_options () |
| |
|
| | is_only_numbers () |
| | Test if all passed parameters consist of only numbers.
|
| |
| | is_point_in_bounding_box ($pointxy, $xleftytop, $xrightybottom) |
| | Checks if the point is within the bounding box made by top left and bottom right.
|
| |
|
| outlying_coords_to_test () |
| |
|
|
bool | $error = false |
| | Indicates if there is an error.
|
| |
|
|
static string | $classnameprefix = 'qtype_ddmarker_shape_' |
| | The shape class prefix.
|
| |
Base class to represent a shape.
- Copyright
- 2012 The Open University
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ center_point()
| qtype_ddmarker_shape::center_point |
( |
| ) |
|
|
abstract |
◆ create()
| static qtype_ddmarker_shape::create |
( |
| $shape, |
|
|
| $coordsstring ) |
|
static |
Creates a new shape of the specified type.
- Parameters
-
| string | $shape | The shape to create |
| string | $coordsstring | The string describing the coordinates |
- Return values
-
◆ exists()
| static qtype_ddmarker_shape::exists |
( |
| $shape | ) |
|
|
static |
Checks if the passed shape exists.
- Parameters
-
| string | $shape | The shape name |
- Return values
-
◆ get_coords_interpreter_error()
| qtype_ddmarker_shape::get_coords_interpreter_error |
( |
| ) |
|
Gets any coordinate error.
- Return values
-
| string|bool | String of the error or false if there is no error |
◆ human_readable_name()
| static qtype_ddmarker_shape::human_readable_name |
( |
| $lowercase = false | ) |
|
|
static |
Return a human readable name of the shape.
- Parameters
-
| bool | $lowercase | True if it should be lowercase. |
- Return values
-
◆ is_only_numbers()
| qtype_ddmarker_shape::is_only_numbers |
( |
| ) |
|
|
protected |
Test if all passed parameters consist of only numbers.
- Return values
-
◆ is_point_in_bounding_box()
| qtype_ddmarker_shape::is_point_in_bounding_box |
( |
| $pointxy, |
|
|
| $xleftytop, |
|
|
| $xrightybottom ) |
|
protected |
Checks if the point is within the bounding box made by top left and bottom right.
- Parameters
-
| array | $pointxy | Array of the point (x, y) |
| array | $xleftytop | Top left point of bounding box |
| array | $xrightybottom | Bottom left point of bounding box |
- Return values
-
◆ is_point_in_shape()
| qtype_ddmarker_shape::is_point_in_shape |
( |
| $xy | ) |
|
|
abstract |
◆ name()
| static qtype_ddmarker_shape::name |
( |
| ) |
|
|
static |
Returns the name of the shape.
- Return values
-
The documentation for this class was generated from the following file:
- question/type/ddmarker/shapes.php