summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-11-27 12:00:23 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-11-27 12:00:23 +0000
commitf130ab5cb1155a0cda8725cbd1a52f7527acfada (patch)
treebc68f775c1d59eed1d834693ccc211cb580be4d2
parente5578da0740ae8fa7ff10207fbdd6aa38d7e4233 (diff)
downloadzetacomponents-graph-f130ab5cb1155a0cda8725cbd1a52f7527acfada.zip
zetacomponents-graph-f130ab5cb1155a0cda8725cbd1a52f7527acfada.tar.gz
- It was not possible to cause this exception
-rw-r--r--src/driver/flash.php5
-rw-r--r--src/exceptions/invalid_font.php43
-rw-r--r--src/graph_autoload.php1
3 files changed, 0 insertions, 49 deletions
diff --git a/src/driver/flash.php b/src/driver/flash.php
index 7c12de5..38507fd 100644
--- a/src/driver/flash.php
+++ b/src/driver/flash.php
@@ -315,11 +315,6 @@ class ezcGraphFlashDriver extends ezcGraphDriver
*/
public function drawTextBox( $string, ezcGraphCoordinate $position, $width, $height, $align, ezcGraphRotation $rotation = null )
{
- if ( $this->options->font->type !== ezcGraph::PALM_FONT )
- {
- throw new ezcGraphInvalidFontTypeException( $this->options->font->type, __CLASS__ );
- }
-
$padding = $this->options->font->padding + ( $this->options->font->border !== false ? $this->options->font->borderWidth : 0 );
$width = $this->modifyCoordinate( $width - $padding * 2 );
diff --git a/src/exceptions/invalid_font.php b/src/exceptions/invalid_font.php
deleted file mode 100644
index e9cc436..0000000
--- a/src/exceptions/invalid_font.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
- * File containing the ezcGraphInvalidFontTypeException class
- *
- * @package Graph
- * @version //autogentag//
- * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
- * @license http://ez.no/licenses/new_bsd New BSD License
- */
-/**
- * Exception thrown if font type cannot be rendered with one driver.
- *
- * @package Graph
- * @version //autogentag//
- */
-class ezcGraphInvalidFontTypeException extends ezcGraphException
-{
- /**
- * Constructor
- *
- * @param int $type
- * @param string $driver
- * @return void
- * @ignore
- */
- public function __construct( $type, $driver )
- {
- $fontNames = array(
- ezcGraph::TTF_FONT => 'True Type Font',
- ezcGraph::PS_FONT => 'Postscript Type 1 font',
- ezcGraph::PALM_FONT => 'Palm Font',
- );
-
- $fontName = ( isset( $fontNames[$type] )
- ? $fontName = $fontNames[$type]
- : 'Unknown'
- );
-
- parent::__construct( "Font type '{$fontName}' cannot be used with '{$driver}'." );
- }
-}
-
-?>
diff --git a/src/graph_autoload.php b/src/graph_autoload.php
index 0f7efa2..cc760c7 100644
--- a/src/graph_autoload.php
+++ b/src/graph_autoload.php
@@ -21,7 +21,6 @@ return array(
'ezcGraphInvalidAssignementException' => 'Graph/exceptions/invalid_assignement.php',
'ezcGraphInvalidDataException' => 'Graph/exceptions/invalid_data.php',
'ezcGraphInvalidDisplayTypeException' => 'Graph/exceptions/invalid_display_type.php',
- 'ezcGraphInvalidFontTypeException' => 'Graph/exceptions/invalid_font.php',
'ezcGraphInvalidImageFileException' => 'Graph/exceptions/invalid_image_file.php',
'ezcGraphMatrixInvalidDimensionsException' => 'Graph/exceptions/invalid_dimensions.php',
'ezcGraphMatrixOutOfBoundingsException' => 'Graph/exceptions/out_of_boundings.php',
OpenPOWER on IntegriCloud