Inheritance diagram for CAnnotationParser:

Public Member Functions | |
| clear () | |
| CAnnotationParser () | |
| getParsedAnnotations () | |
| getCaption () | |
| getCaptionCoords () | |
| getOriginalImageSize () | |
| getLastImageSize () | |
| getXML () | |
| startElement ($parser, $name, $attrs) | |
| endElement ($parser, $tagname) | |
| characterData ($parser, $data) | |
| parseString ($xml_string) | |
| parseFile ($path) | |
| getStrip () | |
| getCalloutColor () | |
Public Attributes | |
| $xml_string = "" | |
| $annotations = array() | |
| $caption = "" | |
| $sizex = 1 | |
| $sizey = 1 | |
| $lastx = 1 | |
| $lasty = 1 | |
| $captionx = 1 | |
| $captiony = 1 | |
| $name = "" | |
| $x = "" | |
| $y = "" | |
| $curtag = "a" | |
| $UID = 0 | |
| $depth = 0 | |
| $label_opened = 0 | |
| $label | |
| $callout_color = 0 | |
Class for working with XML contains annotations: Parse from string, file, get parsed annotations, image caption etc
|
|
Constructor. Initializing the object. |
|
|
Returns callout and frame color in web format (rrggbb) from parsed xml |
|
|
Return image caption if exists |
|
|
Return array with caption coordinates
['x'] will return X coord
|
|
|
Return array with last edited (when last annotations was made) image size
['x'] will return image width
|
|
|
Return array with original (when first annotations was made) image size
['x'] will return image width
|
|
|
Returns parsed annotations from XML.
Format: array of hashes $annotations = $parser->getParsedAnnotations();
foreach ($annotations as $a)
{
// Now we recalculate annotation positions because image size can be modified after placing comments
// and we need hold correct positions
$last = $parser->getLastImageSize();
$orig = $parser->getOriginalImageSize();
$x = round($a['x'] * ($last['x'] / $orig['x']));
$y = round($a['y'] * ($last['y'] / $orig['y']));
}
|
|
|
Return annotations without XML tags, separated by ';'
|
|
|
Return source XML |
|
|
Read XML string from a jpeg file and parsing it into array of annotations
|
|
|
Parsing XML string into array of annotations
|
1.4.6-NO