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

Class: File_Therion_ScrapLine

Source Location: /File_Therion-0.4.1/File/Therion/ScrapLine.php

Class Overview

File_Therion_BasicObject
   |
   --File_Therion_ScrapLine

Class representing a scrap line definition object.


Author(s):

Copyright:

  • 2016 Benedikt Hallinger

Variables

Methods


Inherited Variables

Inherited Methods

Class: File_Therion_BasicObject

File_Therion_BasicObject::addComment()
Add a comment.
File_Therion_BasicObject::getData()
Get some simple data of this object.
File_Therion_BasicObject::getOption()
Get option of this object.
File_Therion_BasicObject::getOptionsString()
Generate basic options string.
File_Therion_BasicObject::handleCommonOption()
Handle known options supported by several objects.
File_Therion_BasicObject::setData()
Set some simple data of this object.
File_Therion_BasicObject::setOption()
Set options of this object.
File_Therion_BasicObject::_verify()
Verify basic compliance of item.

Class Details

[line 27]
Class representing a scrap line definition object.

This is a vector graphic element that is used to form a renderable cavemap.



[ Top ]


Class Variables

$_data = array(
        'type' => "",  // main type of line
    )

[line 68]

Basic data elements.
  • Access: protected

Type:   array


[ Top ]

$_options = array(
        'id'          => "",
        'subtype'     => "", // main subtype of line
        
        'close'       => "",
        'outline'     => "",
        'orientation' => "",
        'reverse'     => "",
        'size'        => 0,
        'r-size'      => 0,
        'l-size'      => 0,
        'place'       => "", // <bottom/default/top>
        'clip'        => "", // <on/off>
        'visibility'  => "",
        'context'     => array(),// <point/line/area> <symbol-type>
'altitude'=>"",// only wall type
'border'=>"",// only slope type: <on/off>
'direction'=>"",// only direction type: <begin/end/both/none/point>
'gradient'=>"",// only contour type: <none/center/point>
'head'=>"",// only arrow type: <begin/end/both/none>
'text'=>"",// only label type
'height'=>"",// only pit or wall:pit types
)

[line 37]

Object options (id, ...).
  • Var: assoc array
  • Access: protected

Type:   array
Overrides:   Array


[ Top ]

$_points = array()

[line 82]

Points of this line.

Each array index holds a single point. Point order matters. The array is defined as following:

  • TODO: specify; most important: order and command like options for this point


Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 91]

File_Therion_ScrapLine __construct( string $type, [ $options = array()])

Create a new therion ScrapLine object.
  • Todo: Restrict naming convention, not all characters are allowed!
  • Access: public

Parameters:

string   $type   —  type of the line
   $options   — 

[ Top ]

addPoint   [line 181]

File_Therion_ScrapLinePoint addPoint( [$index $index = -1])

Add a new Point to this line.

The point created at the position will be returned as reference, so you can adjust coordinates etc afterwards.

The optional index parameter allows to adjust the insertion position; the point will be inserted at the index, pushing already present points one to the end (-1=end, 0=start, ...).

  • Return: created point as reference.
  • Todo: implement like addLine() at file level
  • Access: public

Parameters:

$index   $index   —  Where to add this point (default is end)

[ Top ]

count   [line 199]

int count( )

Count points of this line (SPL Countable).
  • Return: number of points
  • Access: public

[ Top ]

getLinePoints   [line 216]

array|File_Therion_ScrapLinePoint getLinePoints( [string $mark = null])

Get points of this line.

You may optionally query by named mark (eg 'end' or custom one). When given mark is not found, index will be tried instead. In querymode a found point will be returned or exception thrown.

  • Throws: OutOfBoundsException when requested mark is not available
  • Access: public

Parameters:

string   $mark   —  optional query selection

[ Top ]

parse   [line 106]

File_Therion_ScrapLine parse( array $lines)

Parses given Therion_Line-objects into internal data structures.
  • Return: ScrapLine object
  • Todo: implement me
  • Throws: InvalidArgumentException
  • Access: public

Parameters:

array   $lines   —  File_Therion_Line objects forming this object

[ Top ]


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