wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
ImageOutputStrategy Class Reference
+ Inheritance diagram for ImageOutputStrategy:

Public Member Functions

 ImageOutputStrategy ($format, $file, $map, $lineType=LINETYPE_DIRECT, $scale=100, $aspect=0.5, $border=50, $usemap='')
 
 writeHeader ()
 
 writeFooter ()
 
 writeObject (&$obj)
 
 drawConnectionLine ($poid, $oid)
 
 drawDirectLine ($start, $end)
 
 drawRoutedLine ($start, $end)
 
 calculateEndPoints ($poid, $oid)
 

Public Attributes

 $_format = null
 
 $_file = ''
 
 $_map = null
 
 $_img = null
 
 $_width = 0
 
 $_height = 0
 
 $_xscale = 0
 
 $_yscale = 0
 
 $_border = 0
 
 $_bgColor = null
 
 $_txtColor = null
 
 $_lineColor = null
 
 $_labelDim = null
 
 $_textPos = null
 
 $_usemap = ''
 

Detailed Description

This OutputStrategy outputs a tree of objects into an image file. It must be configured with a map that was calculated by a LayoutVisitor.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 33 of file class.ImageOutputStrategy.php.

Member Function Documentation

ImageOutputStrategy::ImageOutputStrategy (   $format,
  $file,
  $map,
  $lineType = LINETYPE_DIRECT,
  $scale = 100,
  $aspect = 0.5,
  $border = 50,
  $usemap = '' 
)

Constructor.

Parameters
formatImage format name [IMG_GIF | IMG_JPG | IMG_PNG | IMG_WBMP].
fileThe output file name.
mapThe position map provided by LayoutVisitor.
lineTypeThe linetype to use [LINETYPE_DIRECT|LINETYPE_ROUTED] DEFAULT LINETYPE_DIRECT.
scaleThe image scale (will be xscale) DEFAULT 100.
aspectThe image aspect (aspect = xscale/yscale) DEFAULT 0.5.
borderThe image border [px] DEFAULT 50.
usemapName of the HTML ImageMap to write to stdout ['' means no map] DEFAULT ''.

Definition at line 61 of file class.ImageOutputStrategy.php.

References WCMFException\throwEx().

Referenced by ElementImageOutputStrategy\ElementImageOutputStrategy().

+ Here is the call graph for this function:

ImageOutputStrategy::writeHeader ( )

Write the image header.

Implements OutputStrategy.

Definition at line 87 of file class.ImageOutputStrategy.php.

References $_border, and $_txtColor.

Referenced by ElementImageOutputStrategy\writeHeader().

ImageOutputStrategy::writeFooter ( )

Write the image footer.

Implements OutputStrategy.

Definition at line 110 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::writeObject ( $obj)

Write the object's content.

Parameters
objThe object to write.

Implements OutputStrategy.

Definition at line 129 of file class.ImageOutputStrategy.php.

References $_border, $_txtColor, drawConnectionLine(), STATE_DELETED, STATE_DIRTY, and STATE_NEW.

+ Here is the call graph for this function:

ImageOutputStrategy::drawConnectionLine (   $poid,
  $oid 
)

Draw connection line.

Attention
Internal use only.
Parameters
poidThe parent object's object id.
oidThe object's object id.

Definition at line 188 of file class.ImageOutputStrategy.php.

Referenced by ElementImageOutputStrategy\writeObject(), and writeObject().

ImageOutputStrategy::drawDirectLine (   $start,
  $end 
)

Draw direct line.

Attention
Internal use only.
Parameters
startThe start point (Position).
endThe end point (Position).

Definition at line 202 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::drawRoutedLine (   $start,
  $end 
)

Draw routed line.

Attention
Internal use only.
Parameters
startThe start point (Position).
endThe end point (Position).

Definition at line 217 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::calculateEndPoints (   $poid,
  $oid 
)

Calculate line end points.

Attention
Internal use only.
Parameters
poidThe parent object's object id.
oidThe object's object id.
Returns
Array containing start and end position

Definition at line 269 of file class.ImageOutputStrategy.php.

Member Data Documentation

ImageOutputStrategy::$_format = null

Definition at line 35 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_file = ''

Definition at line 36 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_map = null

Definition at line 37 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_img = null

Definition at line 38 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_width = 0

Definition at line 39 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_height = 0

Definition at line 40 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_xscale = 0

Definition at line 41 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_yscale = 0

Definition at line 42 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_border = 0
ImageOutputStrategy::$_bgColor = null
ImageOutputStrategy::$_txtColor = null
ImageOutputStrategy::$_lineColor = null

Definition at line 46 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_labelDim = null

Definition at line 47 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_textPos = null

Definition at line 48 of file class.ImageOutputStrategy.php.

ImageOutputStrategy::$_usemap = ''

Definition at line 49 of file class.ImageOutputStrategy.php.


The documentation for this class was generated from the following file: