Преглед изворни кода

[GENERIC] Zend_Barcode promoted to trunk

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19695 44c647ce-9c0f-0410-b52a-842ac1e357ba
mikaelkael пре 16 година
родитељ
комит
5dc4c78bd4
69 измењених фајлова са 47076 додато и 0 уклоњено
  1. 8 0
      documentation/manual/en/manual.xml.in
  2. 196 0
      documentation/manual/en/module_specs/Zend_Barcode-Creation.xml
  3. 12 0
      documentation/manual/en/module_specs/Zend_Barcode-Introduction.xml
  4. 442 0
      documentation/manual/en/module_specs/Zend_Barcode-Objects.xml
  5. 247 0
      documentation/manual/en/module_specs/Zend_Barcode-Objects_Details.xml
  6. 287 0
      documentation/manual/en/module_specs/Zend_Barcode-Renderers.xml
  7. 352 0
      library/Zend/Barcode.php
  8. 63 0
      library/Zend/Barcode/Exception.php
  9. 180 0
      library/Zend/Barcode/Object/Code25.php
  10. 204 0
      library/Zend/Barcode/Object/Code39.php
  11. 100 0
      library/Zend/Barcode/Object/Error.php
  12. 35 0
      library/Zend/Barcode/Object/Exception.php
  13. 215 0
      library/Zend/Barcode/Object/Int25.php
  14. 132 0
      library/Zend/Barcode/Object/Itf14.php
  15. 1176 0
      library/Zend/Barcode/Object/ObjectAbstract.php
  16. 35 0
      library/Zend/Barcode/Renderer/Exception.php
  17. 452 0
      library/Zend/Barcode/Renderer/Image.php
  18. 242 0
      library/Zend/Barcode/Renderer/Pdf.php
  19. 548 0
      library/Zend/Barcode/Renderer/RendererAbstract.php
  20. 2 0
      tests/Zend/AllTests.php
  21. 86 0
      tests/Zend/Barcode/AllTests.php
  22. 337 0
      tests/Zend/Barcode/FactoryTest.php
  23. 201 0
      tests/Zend/Barcode/Object/Code25Test.php
  24. 203 0
      tests/Zend/Barcode/Object/Code39Test.php
  25. 83 0
      tests/Zend/Barcode/Object/ErrorTest.php
  26. 257 0
      tests/Zend/Barcode/Object/Int25Test.php
  27. 230 0
      tests/Zend/Barcode/Object/Itf14Test.php
  28. 484 0
      tests/Zend/Barcode/Object/TestCommon.php
  29. 11 0
      tests/Zend/Barcode/Object/_files/BarcodeNamespace.php
  30. 4 0
      tests/Zend/Barcode/Object/_files/BarcodeNamespaceWithoutExtendingObjectAbstract.php
  31. 37 0
      tests/Zend/Barcode/Object/_files/BarcodeTest.php
  32. 1706 0
      tests/Zend/Barcode/Object/_files/Code25_0123456789_border_instructions.php
  33. 1706 0
      tests/Zend/Barcode/Object/_files/Code25_0123456789_border_oriented_instructions.php
  34. 1672 0
      tests/Zend/Barcode/Object/_files/Code25_0123456789_instructions.php
  35. 1672 0
      tests/Zend/Barcode/Object/_files/Code25_0123456789_oriented_instructions.php
  36. 1807 0
      tests/Zend/Barcode/Object/_files/Code25_0123456789_stretchtext_instructions.php
  37. 1807 0
      tests/Zend/Barcode/Object/_files/Code25_0123456789_stretchtext_oriented_instructions.php
  38. 1822 0
      tests/Zend/Barcode/Object/_files/Code39_0123456789_border_instructions.php
  39. 1822 0
      tests/Zend/Barcode/Object/_files/Code39_0123456789_border_oriented_instructions.php
  40. 1788 0
      tests/Zend/Barcode/Object/_files/Code39_0123456789_instructions.php
  41. 1788 0
      tests/Zend/Barcode/Object/_files/Code39_0123456789_oriented_instructions.php
  42. 1953 0
      tests/Zend/Barcode/Object/_files/Code39_0123456789_stretchtext_instructions.php
  43. 1953 0
      tests/Zend/Barcode/Object/_files/Code39_0123456789_stretchtext_oriented_instructions.php
  44. 34 0
      tests/Zend/Barcode/Object/_files/Error_errortext_instructions.php
  45. 947 0
      tests/Zend/Barcode/Object/_files/Int25_0123456789_bearerbar_instructions.php
  46. 947 0
      tests/Zend/Barcode/Object/_files/Int25_0123456789_bearerbar_oriented_instructions.php
  47. 923 0
      tests/Zend/Barcode/Object/_files/Int25_0123456789_border_instructions.php
  48. 923 0
      tests/Zend/Barcode/Object/_files/Int25_0123456789_border_oriented_instructions.php
  49. 889 0
      tests/Zend/Barcode/Object/_files/Int25_0123456789_instructions.php
  50. 889 0
      tests/Zend/Barcode/Object/_files/Int25_0123456789_oriented_instructions.php
  51. 1024 0
      tests/Zend/Barcode/Object/_files/Int25_0123456789_stretchtext_instructions.php
  52. 1024 0
      tests/Zend/Barcode/Object/_files/Int25_0123456789_stretchtext_oriented_instructions.php
  53. 1237 0
      tests/Zend/Barcode/Object/_files/Itf14_0000123456789_bearerbar_instructions.php
  54. 1237 0
      tests/Zend/Barcode/Object/_files/Itf14_0000123456789_bearerbar_oriented_instructions.php
  55. 1213 0
      tests/Zend/Barcode/Object/_files/Itf14_0000123456789_border_instructions.php
  56. 1213 0
      tests/Zend/Barcode/Object/_files/Itf14_0000123456789_border_oriented_instructions.php
  57. 1179 0
      tests/Zend/Barcode/Object/_files/Itf14_0000123456789_instructions.php
  58. 1179 0
      tests/Zend/Barcode/Object/_files/Itf14_0000123456789_oriented_instructions.php
  59. 1374 0
      tests/Zend/Barcode/Object/_files/Itf14_0000123456789_stretchtext_instructions.php
  60. 1374 0
      tests/Zend/Barcode/Object/_files/Itf14_0000123456789_stretchtext_oriented_instructions.php
  61. 124 0
      tests/Zend/Barcode/Object/_fonts/COPYRIGHT.TXT
  62. 11 0
      tests/Zend/Barcode/Object/_fonts/README.TXT
  63. 162 0
      tests/Zend/Barcode/Object/_fonts/RELEASENOTES.TXT
  64. BIN
      tests/Zend/Barcode/Object/_fonts/Vera.ttf
  65. 347 0
      tests/Zend/Barcode/Renderer/ImageTest.php
  66. 144 0
      tests/Zend/Barcode/Renderer/PdfTest.php
  67. 310 0
      tests/Zend/Barcode/Renderer/TestCommon.php
  68. 11 0
      tests/Zend/Barcode/Renderer/_files/RendererNamespace.php
  69. 4 0
      tests/Zend/Barcode/Renderer/_files/RendererNamespaceWithoutExtendingRendererAbstract.php

+ 8 - 0
documentation/manual/en/manual.xml.in

@@ -68,6 +68,14 @@
         <xi:include href="module_specs/Zend_Auth_Adapter_OpenId.xml" />
     </chapter>
 
+    <chapter id="zend.barcode">
+        <title>Zend_Barcode</title>
+        <xi:include href="module_specs/Zend_Barcode-Introduction.xml" />
+        <xi:include href="module_specs/Zend_Barcode-Creation.xml" />
+        <xi:include href="module_specs/Zend_Barcode-Objects.xml" parse="xml"/>
+        <xi:include href="module_specs/Zend_Barcode-Renderers.xml" />
+    </chapter>
+
     <chapter id="zend.cache">
         <title>Zend_Cache</title>
         <xi:include href="module_specs/Zend_Cache-Introduction.xml" />

+ 196 - 0
documentation/manual/en/module_specs/Zend_Barcode-Creation.xml

@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Reviewed: no -->
+<sect1 id="zend.barcode.creation">
+    <title>Barcode creation using Zend_Barcode class</title>
+
+    <sect2 id="zend.barcode.creation.configuration">
+        <title>Using Zend_Barcode::factory</title>
+
+        <para>
+            <classname>Zend_Barcode</classname> uses a factory method to create an instance of a
+            renderer that extends <classname>Zend_Barcode_Renderer_RendererAbstract</classname>. The
+            factory method accepts five arguments.
+        </para>
+
+        <orderedlist>
+            <listitem>
+                <para>The name of the barcode format (e.g., "code39") (required)</para>
+            </listitem>
+
+            <listitem>
+                <para>The name of the renderer (e.g., "image") (required)</para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    Options to pass to the barcode object (an array or
+                    <classname>Zend_Config</classname> object) (optional)
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    Options to pass to the renderer object (an array or
+                    <classname>Zend_Config</classname> object) (optional)
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    Boolean to indicate whether or not to automatically render errors. If an
+                    exception occurs, the provided barcode object will be replaced with an Error
+                    representation (optional default <constant>TRUE</constant>)
+                </para>
+            </listitem>
+        </orderedlist>
+
+        <example id="zend.barcode.creation.configuration.example-1">
+            <title>Getting a Renderer with Zend_Barcode::factory()</title>
+
+            <para>
+                <methodname>Zend_Barcode::factory()</methodname> instantiates barcode objects and
+                renderers and ties them together. In this first example, we will use the
+                <emphasis>Code39</emphasis> barcode type together with the
+                <emphasis>Image</emphasis> renderer.
+            </para>
+
+            <programlisting language="php"><![CDATA[
+// Only the text to draw is required
+$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');
+
+// No required options
+$rendererOptions = array();
+$renderer = Zend_Barcode::factory(
+    'code39', 'image', $barcodeOptions, $rendererOptions
+);
+]]></programlisting>
+        </example>
+
+        <example id="zend.barcode.creation.configuration.example-2">
+            <title>Using Zend_Barcode::factory() with Zend_Config objects</title>
+
+            <para>
+                You may pass a <classname>Zend_Config</classname> object to the factory in order to
+                create the necessary objects. The following example is functionally equivalent to
+                the previous.
+            </para>
+
+            <programlisting language="php"><![CDATA[
+// Using only one Zend_Config object
+$config = new Zend_Config(array(
+    'barcode'        => 'code39',
+    'barcodeParams'  => array('text' => 'ZEND-FRAMEWORK'),
+    'renderer'       => 'image',
+    'rendererParams' => array('imageType' => 'gif'),
+));
+
+$renderer = Zend_Barcode::factory($config);
+]]></programlisting>
+        </example>
+    </sect2>
+
+    <sect2 id="zend.barcode.creation.drawing">
+        <title>Drawing a barcode</title>
+
+        <para>
+            When you <emphasis>draw</emphasis> the barcode, you retrieve the resource in which the
+            barcode is drawn. To draw a barcode, you can call the <methodname>draw()</methodname> of
+            the renderer, or simply use the proxy method provided by
+            <classname>Zend_Barcode</classname>.
+        </para>
+
+        <example id="zend.barcode.creation.drawing.example-1">
+            <title>Drawing a barcode with the renderer object</title>
+
+            <programlisting language="php"><![CDATA[
+// Only the text to draw is required
+$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');
+
+// No required options
+$rendererOptions = array();
+
+// Draw the barcode in a new image,
+$imageResource = Zend_Barcode::factory(
+    'code39', 'image', $barcodeOptions, $rendererOptions
+)->draw();
+]]></programlisting>
+        </example>
+
+        <example id="zend.barcode.creation.drawing.example-2">
+            <title>Drawing a barcode with Zend_Barcode::draw()</title>
+
+            <programlisting language="php"><![CDATA[
+// Only the text to draw is required
+$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');
+
+// No required options
+$rendererOptions = array();
+
+// Draw the barcode in a new image,
+$imageResource = Zend_Barcode::draw(
+    'code39', 'image', $barcodeOptions, $rendererOptions
+);
+]]></programlisting>
+        </example>
+    </sect2>
+
+    <sect2 id="zend.barcode.creation.renderering">
+        <title>Renderering a barcode</title>
+
+        <para>
+            When you render a barcode, you draw the barcode, you send the headers and you send the
+            resource (e.g. to a browser). To render a barcode, you can call the
+            <methodname>render()</methodname> method of the renderer or simply use the proxy method
+            provided by <classname>Zend_Barcode</classname>.
+        </para>
+
+        <example id="zend.barcode.creation.renderering.example-1">
+            <title>Renderering a barcode with the renderer object</title>
+
+            <programlisting language="php"><![CDATA[
+// Only the text to draw is required
+$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');
+
+// No required options
+$rendererOptions = array();
+
+// Draw the barcode in a new image,
+// send the headers and the image
+Zend_Barcode::factory(
+    'code39', 'image', $barcodeOptions, $rendererOptions
+)->render();
+]]></programlisting>
+
+            <para>
+                This will generate this barcode:
+            </para>
+
+            <para>
+                <inlinegraphic width="275" align="center" valign="middle"
+                    fileref="figures/zend.barcode.introduction.example-1.png" format="PNG"/>
+            </para>
+        </example>
+
+        <example id="zend.barcode.creation.renderering.example-2">
+            <title>Renderering a barcode with Zend_Barcode::render()</title>
+
+            <programlisting language="php"><![CDATA[
+// Only the text to draw is required
+$barcodeOptions = array('text' => 'ZEND-FRAMEWORK');
+
+// No required options
+$rendererOptions = array();
+
+// Draw the barcode in a new image,
+// send the headers and the image
+Zend_Barcode::render(
+    'code39', 'image', $barcodeOptions, $rendererOptions
+);
+]]></programlisting>
+
+            <para>
+                This will generate the same barcode as the previous example.
+            </para>
+        </example>
+    </sect2>
+</sect1>

+ 12 - 0
documentation/manual/en/module_specs/Zend_Barcode-Introduction.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Reviewed: no -->
+<sect1 id="zend.barcode.introduction">
+    <title>Introduction</title>
+
+    <para>
+        <classname>Zend_Barcode</classname> provides a generic way to generate barcodes. The
+        <classname>Zend_Barcode</classname> component is divided into two subcomponents: barcode
+        objects and renderers. Objects you allow to create barcodes independently of the
+        renderer. Renderer allow you to draw barcodes based on the support required.
+    </para>
+</sect1>

+ 442 - 0
documentation/manual/en/module_specs/Zend_Barcode-Objects.xml

@@ -0,0 +1,442 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Reviewed: no -->
+<sect1 id="zend.barcode.objects" xmlns:xi="http://www.w3.org/2001/XInclude">
+    <title>Zend_Barcode Objects</title>
+
+    <para>
+        Barcode objects allow you to generate barcodes independently of the rendering support. After
+        generation, you can retrieve the barcode as an array of drawing instructions that you can
+        provide to a renderer.
+    </para>
+
+    <para>
+        Objects have a large number of options. Most of them are common to all objects. These
+        options can be set in four ways:
+    </para>
+
+    <itemizedlist>
+        <listitem>
+            <para>
+                As an array or a <classname>Zend_Config</classname> object passed to the
+                constructor.
+            </para>
+        </listitem>
+
+        <listitem>
+            <para>
+                As an array passed to the <methodname>setOptions()</methodname> method.
+            </para>
+        </listitem>
+
+        <listitem>
+            <para>
+                As a <classname>Zend_Config</classname> object passed to the
+                <methodname>setConfig()</methodname> method.
+            </para>
+        </listitem>
+
+        <listitem>
+            <para>Via individual setters for each configuration type.</para>
+        </listitem>
+    </itemizedlist>
+
+    <example id="zend.barcode.objects.configuration">
+        <title>Different ways to parameterize a barcode object</title>
+
+        <programlisting language="php"><![CDATA[
+$options = array('text' => 'ZEND-FRAMEWORK', 'barHeight' => 40);
+
+// Case 1: constructor
+$barcode = new Zend_Barcode_Object_Code39($options);
+
+// Case 2: setOptions()
+$barcode = new Zend_Barcode_Object_Code39();
+$barcode->setOptions($options);
+
+// Case 3: setConfig()
+$config  = new Zend_Config($options);
+$barcode = new Zend_Barcode_Object_Code39();
+$barcode->setConfig($config);
+
+// Case 4: individual setters
+$barcode = new Zend_Barcode_Object_Code39();
+$barcode->setText('ZEND-FRAMEWORK')
+        ->setBarHeight(40);
+]]></programlisting>
+    </example>
+
+    <sect2 id="zend.barcode.objects.common.options">
+        <title>Common Options</title>
+
+        <para>
+            In the following list, the values have no units; we will use the term "unit." For
+            example, the default value of the "thin bar" is "1 unit". The real units depend on the
+            rendering support (see <link linkend="zend.barcode.renderers">the renderers
+                documentation</link> for more information). Setters are each named by uppercasing
+            the initial letter of the option and prefixing the name with "set" (e.g. "barHeight"
+            becomes "setBarHeight"). All options have a corresponding getter prefixed with "get"
+            (e.g. "getBarHeight"). Available options are:
+        </para>
+
+        <table id="zend.barcode.objects.common.options.table">
+            <title>Common Options</title>
+
+            <tgroup cols="4">
+                <thead>
+                    <row>
+                        <entry>Option</entry>
+
+                        <entry>Data Type</entry>
+
+                        <entry>Default Value</entry>
+
+                        <entry>Description</entry>
+                    </row>
+                </thead>
+
+                <tbody>
+                    <row>
+                        <entry><emphasis>barcodeNamespace</emphasis></entry>
+
+                        <entry><type>String</type></entry>
+
+                        <entry><classname>Zend_Barcode_Object</classname></entry>
+
+                        <entry>
+                            Namespace of the barcode; for example, if you need to extend the
+                            embedding objects
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>barHeight</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>50</entry>
+
+                        <entry>Height of the bars</entry>
+                    </row>
+                    <row>
+                        <entry><emphasis>barThickWidth</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>3</entry>
+
+                        <entry>Width of the thick bar</entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>barThinWidth</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>1</entry>
+
+                        <entry>Width of the thin</entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>factor</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>1</entry>
+
+                        <entry>Factor by which to multiply bar widths and font sizes</entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>foreColor</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>0 (black)</entry>
+
+                        <entry>
+                            Color of the bar and the text. Could be provided as an integer
+                            or as a <acronym>HTML</acronym> value (e.g. "#333333")
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>backgroundColor</emphasis></entry>
+
+                        <entry><type>Integer</type> or <type>String</type></entry>
+
+                        <entry>16777125 (white)</entry>
+
+                        <entry>
+                            Color of the background. Could be provided as an integer
+                            or as a <acronym>HTML</acronym> value (e.g. "#333333")
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>reverseColor</emphasis></entry>
+
+                        <entry><type>Boolean</type></entry>
+
+                        <entry><constant>FALSE</constant></entry>
+
+                        <entry>Allow switching the color of the bar and the background</entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>orientation</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>0</entry>
+
+                        <entry>Orientation of the barcode</entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>font</emphasis></entry>
+
+                        <entry><type>String</type> or <type>Integer</type></entry>
+
+                        <entry><constant>NULL</constant></entry>
+
+                        <entry>
+                            Font path to a <acronym>TTF</acronym> font or a number between 1 and 5
+                            if using image generation with GD (internal fonts)
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>fontSize</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>10</entry>
+
+                        <entry>Size of the font (not applicable with numeric fonts)</entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>withBorder</emphasis></entry>
+
+                        <entry><type>Boolean</type></entry>
+
+                        <entry><constant>FALSE</constant></entry>
+
+                        <entry>Draw a border around the barcode and the quiet zones</entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>drawText</emphasis></entry>
+
+                        <entry><type>Boolean</type></entry>
+
+                        <entry><constant>TRUE</constant></entry>
+
+                        <entry>Set if the text is displayed below the barcode</entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>stretchText</emphasis></entry>
+
+                        <entry><type>Boolean</type></entry>
+
+                        <entry><constant>FALSE</constant></entry>
+
+                        <entry>Specify if the text is stretched all along the barcode</entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>withChecksum</emphasis></entry>
+
+                        <entry><type>Boolean</type></entry>
+
+                        <entry><constant>FALSE</constant></entry>
+
+                        <entry>
+                            Indicate whether or not the checksum is automatically added to
+                            the barcode
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>withChecksumInText</emphasis></entry>
+
+                        <entry><type>Boolean</type></entry>
+
+                        <entry><constant>FALSE</constant></entry>
+
+                        <entry>
+                            Indicate whether or not the checksum is displayed in the textual
+                            representation
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>text</emphasis></entry>
+
+                        <entry><type>String</type></entry>
+
+                        <entry><constant>NULL</constant></entry>
+
+                        <entry>The text to represent as a barcode</entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+
+        <sect3 id="zend.barcode.objects.common.options.barcodefont">
+            <title>Particular case of static setBarcodeFont()</title>
+
+            <para>
+                You can set a commont font for all your objects by using the static method
+                <methodname>Zend_Barcode_Object::setBarcodeFont()</methodname>. This value
+                can be always be overridden for individual objects by using the
+                <methodname>setFont()</methodname> method.
+            </para>
+
+            <programlisting language="php"><![CDATA[
+// In your bootstrap:
+Zend_Barcode_Object::setBarcodeFont('my_font.ttf');
+
+// Later in your code:
+Zend_Barcode::render(
+    'code39',
+    'pdf',
+    array('text' => 'ZEND-FRAMEWORK')
+); // will use 'my_font.ttf'
+
+// or:
+Zend_Barcode::render(
+    'code39',
+    'image',
+    array(
+        'text' => 'ZEND-FRAMEWORK',
+        'font' => 3
+    )
+); // will use the 3rd GD internal font
+]]></programlisting>
+        </sect3>
+    </sect2>
+
+    <sect2 id="zend.barcode.objects.common.getters">
+        <title>Common Additional Getters</title>
+
+        <para></para>
+
+        <table id="zend.barcode.objects.common.getters.table">
+            <title>Common Getters</title>
+
+            <tgroup cols="3">
+                <thead>
+                    <row>
+                        <entry>Getter</entry>
+
+                        <entry>Data Type</entry>
+
+                        <entry>Description</entry>
+                    </row>
+                </thead>
+
+                <tbody>
+                    <row>
+                        <entry><methodname>getType()</methodname></entry>
+
+                        <entry><type>String</type></entry>
+
+                        <entry>
+                            Return the name of the barcode class without the namespace (e.g.
+                            <classname>Zend_Barcode_Object_Code39</classname> returns simply
+                            "code39")
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><methodname>getRawText()</methodname></entry>
+
+                        <entry><type>String</type></entry>
+
+                        <entry>
+                            Return the original text provided to the object
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><methodname>getTextToDisplay()</methodname></entry>
+
+                        <entry><type>String</type></entry>
+
+                        <entry>
+                            Return the text to display, including, if activated, the checksum value
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><methodname>getQuietZone()</methodname></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>
+                            Return the size of the space needed before and after the barcode
+                            without any drawing
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><methodname>getInstructions()</methodname></entry>
+
+                        <entry><type>Array</type></entry>
+
+                        <entry>
+                            Return drawing instructions as an array.
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><methodname>getHeight($recalculate = false)</methodname></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>
+                            Return the height of the barcode calculated after possible rotation
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><methodname>getWidth($recalculate = false)</methodname></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>
+                            Return the width of the barcode calculated after possible rotation
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><methodname>getOffsetTop($recalculate = false)</methodname></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>
+                            Return the position of the top of the barcode calculated after
+                            possible rotation
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><methodname>getOffsetLeft($recalculate = false)</methodname></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>
+                            Return the position of the left of the barcode calculated after
+                            possible rotation
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+    </sect2>
+
+    <xi:include href="Zend_Barcode-Objects_Details.xml" />
+</sect1>

+ 247 - 0
documentation/manual/en/module_specs/Zend_Barcode-Objects_Details.xml

@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Reviewed: no -->
+<sect2 id="zend.barcode.objects.details">
+    <title>Description of shipped barcodes</title>
+
+    <para>
+        You will find below detailed information about all barcode types shipped by default with
+        Zend Framework.
+    </para>
+
+    <sect3 id="zend.barcode.objects.details.error">
+        <title>Zend_Barcode_Object_Error</title>
+
+        <para>
+            <inlinegraphic width="400" align="center" valign="middle"
+                fileref="figures/zend.barcode.objects.details.error.png" format="PNG"/>
+        </para>
+
+        <para>
+            This barcode is a special case. It is internally used to automatically render
+            an exception caught by the <classname>Zend_Barcode</classname> component.
+        </para>
+    </sect3>
+
+    <sect3 id="zend.barcode.objects.details.code25">
+        <title>Zend_Barcode_Object_Code25</title>
+
+        <para>
+            <inlinegraphic width="152" align="center" valign="middle"
+                fileref="figures/zend.barcode.objects.details.code25.png" format="PNG"/>
+        </para>
+
+        <itemizedlist>
+            <listitem>
+                <para>
+                    <emphasis>Name:</emphasis> Code 25 (or Code 2 of 5 or Code 25 Industrial)
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Allowed characters:</emphasis> '0123456789'
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Checksum:</emphasis> optional (modulo 10)
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Length:</emphasis> variable
+                </para>
+            </listitem>
+        </itemizedlist>
+
+        <para>
+            There are no particular options for this barcode.
+        </para>
+    </sect3>
+
+    <sect3 id="zend.barcode.objects.details.code39">
+        <title>Zend_Barcode_Object_Code39</title>
+
+        <para>
+            <inlinegraphic width="275" align="center" valign="middle"
+                fileref="figures/zend.barcode.introduction.example-1.png" format="PNG"/>
+        </para>
+
+        <itemizedlist>
+            <listitem>
+                <para>
+                    <emphasis>Name:</emphasis> Code 39
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Allowed characters:</emphasis>
+                    '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ -.$/+%'
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Checksum:</emphasis> optional (modulo 43)
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Length:</emphasis> variable
+                </para>
+            </listitem>
+        </itemizedlist>
+
+        <note>
+            <para>
+                <classname>Zend_Barcode_Object_Code39</classname> will automatically add
+                the start and stop characters ('*') for you.
+            </para>
+        </note>
+
+        <para>
+            There are no particular options for this barcode.
+        </para>
+    </sect3>
+
+    <sect3 id="zend.barcode.objects.details.itf14">
+        <title>Zend_Barcode_Object_Itf14</title>
+
+        <para>
+            <inlinegraphic width="155" align="center" valign="middle"
+                fileref="figures/zend.barcode.objects.details.itf14.png" format="PNG"/>
+        </para>
+
+        <para>
+            This barcode extends <classname>Zend_Barcode_Object_Int25</classname>
+            (Code 2 of 5 Interleaved), and inherits some of its capabilities; it also has a few
+            particulars of its own.
+        </para>
+
+        <itemizedlist>
+            <listitem>
+                <para>
+                    <emphasis>Name:</emphasis> ITF-14
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Allowed characters:</emphasis> '0123456789'
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Checksum:</emphasis> mandatory (modulo 10)
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Length:</emphasis> 14 characters (including checksum)
+                </para>
+            </listitem>
+        </itemizedlist>
+
+        <para>
+            There are no particular options for this barcode.
+        </para>
+
+        <note>
+            <para>
+                If the number of characters is not equal to 14,
+                <classname>Zend_Barcode_Object_Itf14</classname> will automatically prepend missing
+                zeros to the barcode text.
+            </para>
+        </note>
+    </sect3>
+
+    <sect3 id="zend.barcode.objects.details.int25">
+        <title>Zend_Barcode_Object_Int25</title>
+
+        <para>
+            <inlinegraphic width="101" align="center" valign="middle"
+                fileref="figures/zend.barcode.objects.details.int25.png" format="PNG"/>
+        </para>
+
+        <para>
+            This barcode extends <classname>Zend_Barcode_Object_Code25</classname>
+            (Code 2 of 5), and has the same particulars and options, and adds the following:.
+        </para>
+
+        <itemizedlist>
+            <listitem>
+                <para>
+                    <emphasis>Name:</emphasis> Code 2 of 5 Interleaved
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Allowed characters:</emphasis> '0123456789'
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Checksum:</emphasis> optional (modulo 10)
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    <emphasis>Length:</emphasis> variable (always even number of characters)
+                </para>
+            </listitem>
+        </itemizedlist>
+
+        <para>
+            Available options include:
+        </para>
+
+        <table id="zend.barcode.objects.details.int25.table">
+            <title>Zend_Barcode_Object_Int25 Options</title>
+
+            <tgroup cols="4">
+                <thead>
+                    <row>
+                        <entry>Option</entry>
+
+                        <entry>Data Type</entry>
+
+                        <entry>Default Value</entry>
+
+                        <entry>Description</entry>
+                    </row>
+                </thead>
+
+                <tbody>
+                    <row>
+                        <entry><emphasis>withBearerBars</emphasis></entry>
+
+                        <entry><type>Boolean</type></entry>
+
+                        <entry><constant>FALSE</constant></entry>
+
+                        <entry>
+                            Draw a thick bar at the top and the bottom of the barcode.
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+
+        <note>
+            <para>
+                If the number of characters is not even,
+                <classname>Zend_Barcode_Object_Int25</classname> will automatically prepend the
+                missing zero to the barcode text.
+            </para>
+        </note>
+    </sect3>
+</sect2>

+ 287 - 0
documentation/manual/en/module_specs/Zend_Barcode-Renderers.xml

@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Reviewed: no -->
+<sect1 id="zend.barcode.renderers">
+    <title>Zend_Barcode Renderers</title>
+
+    <para>
+        Renderers have some common options. These options can be set in four ways:
+    </para>
+
+    <itemizedlist>
+        <listitem>
+            <para>
+                As an array or a <classname>Zend_Config</classname> object passed to the
+                constructor.
+            </para>
+        </listitem>
+
+        <listitem>
+            <para>
+                As an array passed to the <methodname>setOptions()</methodname> method.
+            </para>
+        </listitem>
+
+        <listitem>
+            <para>
+                As a <classname>Zend_Config</classname> object passed to the
+                <methodname>setConfig()</methodname> method.
+            </para>
+        </listitem>
+
+        <listitem>
+            <para>As discrete values passed to individual setters.</para>
+        </listitem>
+    </itemizedlist>
+
+    <example id="zend.barcode.renderers.configuration">
+        <title>Different ways to parameterize a renderer object</title>
+
+        <programlisting language="php"><![CDATA[
+$options = array('topOffset' => 10);
+
+// Case 1
+$renderer = new Zend_Barcode_Renderer_Pdf($options);
+
+// Case 2
+$renderer = new Zend_Barcode_Renderer_Pdf();
+$renderer->setOptions($options);
+
+// Case 3
+$config   = new Zend_Config($options);
+$renderer = new Zend_Barcode_Renderer_Pdf();
+$renderer->setConfig($config);
+
+// Case 4
+$renderer = new Zend_Barcode_Renderer_Pdf();
+$renderer->setTopOffset(10);
+]]></programlisting>
+    </example>
+
+    <sect2 id="zend.barcode.renderers.common.options">
+        <title>Common Options</title>
+
+        <para>
+            In the following list, the values have no unit; we will use the term "unit." For
+            example, the default value of the "thin bar" is "1 unit." The real units depend on the
+            rendering support. The individual setters are obtained by uppercasing the initial
+            letter of the option and prefixing the name with "set" (e.g. "barHeight" =>
+            "setBarHeight"). All options have a correspondant getter prefixed with "get" (e.g.
+            "getBarHeight"). Available options are:
+        </para>
+
+        <table id="zend.barcode.renderers.common.options.table">
+            <title>Common Options</title>
+
+            <tgroup cols="4">
+                <thead>
+                    <row>
+                        <entry>Option</entry>
+
+                        <entry>Data Type</entry>
+
+                        <entry>Default Value</entry>
+
+                        <entry>Description</entry>
+                    </row>
+                </thead>
+
+                <tbody>
+                    <row>
+                        <entry><emphasis>rendererNamespace</emphasis></entry>
+
+                        <entry><type>String</type></entry>
+
+                        <entry><classname>Zend_Barcode_Renderer</classname></entry>
+                        <entry>
+                            Namespace of the renderer; for example, if you need to extend the
+                            renderers
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>horizontalPosition</emphasis></entry>
+
+                        <entry><type>String</type></entry>
+
+                        <entry>"left"</entry>
+
+                        <entry>
+                            Can be "left", "center" or "right". Can be useful with
+                            <acronym>PDF</acronym> or if the <methodname>setWidth()</methodname>
+                            method is used with an image renderer.
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>verticalPosition</emphasis></entry>
+
+                        <entry><type>String</type></entry>
+
+                        <entry>"top"</entry>
+
+                        <entry>
+                            Can be "top", "middle" or "bottom". Can be useful with
+                            <acronym>PDF</acronym> or if the <methodname>setHeight()</methodname>
+                            method is used with an image renderer.
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>leftOffset</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>0</entry>
+
+                        <entry>
+                            Top position of the barcode inside the renderer. If used, this value
+                            will override the "horizontalPosition" option.
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>topOffset</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>0</entry>
+
+                        <entry>
+                            Top position of the barcode inside the renderer. If used, this value
+                            will override the "verticalPosition" option.
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>automaticRenderError</emphasis></entry>
+
+                        <entry><type>Boolean</type></entry>
+
+                        <entry><constant>TRUE</constant></entry>
+
+                        <entry>
+                            Whether or not to automatically render errors. If an exception occurs,
+                            the provided barcode object will be replaced with an Error
+                            representation. Note that some errors (or exceptions) can not be
+                            rendered.
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>moduleSize</emphasis></entry>
+
+                        <entry><type>Float</type></entry>
+
+                        <entry>1</entry>
+
+                        <entry>
+                            Size of a rendering module in the support.
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>barcode</emphasis></entry>
+
+                        <entry><classname>Zend_Barcode_Object</classname></entry>
+
+                        <entry><constant>NULL</constant></entry>
+
+                        <entry>
+                            The barcode object to render.
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+
+        <para>
+            An additional getter exists: <methodname>getType()</methodname>. It returns the name of
+            the renderer class without the namespace (e.g.
+            <classname>Zend_Barcode_Renderer_Image</classname> returns "image").
+        </para>
+    </sect2>
+
+    <sect2 id="zend.barcode.renderers.image">
+        <title>Zend_Barcode_Renderer_Image</title>
+
+        <para>
+            The Image renderer will draw the instruction list of the barcode object in an image
+            resource. The component requires the GD extension.
+            The default width of a module is 1 pixel.
+        </para>
+
+        <para>Available option are:</para>
+
+        <table id="zend.barcode.renderers.image.table">
+            <title>Zend_Barcode_Renderer_Image Options</title>
+
+            <tgroup cols="4">
+                <thead>
+                    <row>
+                        <entry>Option</entry>
+
+                        <entry>Data Type</entry>
+
+                        <entry>Default Value</entry>
+
+                        <entry>Description</entry>
+                    </row>
+                </thead>
+
+                <tbody>
+                    <row>
+                        <entry><emphasis>height</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>0</entry>
+
+                        <entry>
+                            Allow you to specify the height of the result image. If "0",
+                            the height will be calculated by the barcode object.
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>width</emphasis></entry>
+
+                        <entry><type>Integer</type></entry>
+
+                        <entry>0</entry>
+
+                        <entry>
+                            Allow you to specify the width of the result image. If "0",
+                            the width will be calculated by the barcode object.
+                        </entry>
+                    </row>
+
+                    <row>
+                        <entry><emphasis>imageType</emphasis></entry>
+
+                        <entry><type>String</type></entry>
+
+                        <entry>"png"</entry>
+
+                        <entry>
+                            Specify the image format. Can be "png", "jpeg", "jpg" or "gif".
+                        </entry>
+                    </row>
+                </tbody>
+            </tgroup>
+        </table>
+    </sect2>
+
+    <sect2 id="zend.barcode.renderers.pdf">
+        <title>Zend_Barcode_Renderer_Pdf</title>
+
+        <para>
+            The <acronym>PDF</acronym> renderer will draw the instruction list of the barcode
+            object in a <acronym>PDF</acronym> document.
+            The default width of a module is 0.5 point.
+        </para>
+
+        <para>
+            There are no particular options for this renderer.
+        </para>
+    </sect2>
+</sect1>

+ 352 - 0
library/Zend/Barcode.php

@@ -0,0 +1,352 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Class for generate Barcode
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode
+{
+    /**
+     * Factory for Zend_Barcode classes.
+     *
+     * First argument may be a string containing the base of the adapter class
+     * name, e.g. 'int25' corresponds to class Zend_Barcode_Object_Int25.  This
+     * is case-insensitive.
+     *
+     * First argument may alternatively be an object of type Zend_Config.
+     * The barcode class base name is read from the 'barcode' property.
+     * The barcode config parameters are read from the 'params' property.
+     *
+     * Second argument is optional and may be an associative array of key-value
+     * pairs.  This is used as the argument to the barcode constructor.
+     *
+     * If the first argument is of type Zend_Config, it is assumed to contain
+     * all parameters, and the second argument is ignored.
+     *
+     * @param  mixed $barcode         String name of barcode class, or Zend_Config object.
+     * @param  mixed $renderer        String name of renderer class
+     * @param  mixed $barcodeConfig   OPTIONAL; an array or Zend_Config object with barcode parameters.
+     * @param  mixed $rendererConfig  OPTIONAL; an array or Zend_Config object with renderer parameters.
+     * @param  boolean $automaticRenderError  OPTIONAL; set the automatic rendering of exception
+     * @return Zend_Barcode
+     * @throws Zend_Barcode_Exception
+     */
+    public static function factory(
+        $barcode, 
+        $renderer = 'image', 
+        $barcodeConfig = array(), 
+        $rendererConfig = array(), 
+        $automaticRenderError = true
+    ) {
+        /*
+         * Convert Zend_Config argument to plain string
+         * barcode name and separate config object.
+         */
+        if ($barcode instanceof Zend_Config) {
+            if (isset($barcode->rendererParams)) {
+                $rendererConfig = $barcode->rendererParams->toArray();
+            }
+            if (isset($barcode->renderer)) {
+                $renderer = (string) $barcode->renderer;
+            }
+            if (isset($barcode->barcodeParams)) {
+                $barcodeConfig = $barcode->barcodeParams->toArray();
+            }
+            if (isset($barcode->barcode)) {
+                $barcode = (string) $barcode->barcode;
+            } else {
+                $barcode = null;
+            }
+        }
+
+        try {
+            $barcode  = self::makeBarcode($barcode, $barcodeConfig);
+            $renderer = self::makeRenderer($renderer, $rendererConfig);
+        } catch (Zend_Exception $e) {
+            $renderable = ($e instanceof Zend_Barcode_Exception) ? $e->isRenderable() : false;
+            if ($automaticRenderError && $renderable) {
+                $barcode = self::makeBarcode('error', array(
+                    'text' => $e->getMessage()
+                ));
+                $renderer = self::makeRenderer($renderer, array());
+            } else {
+                throw $e;
+            }
+        }
+
+        $renderer->setAutomaticRenderError($automaticRenderError);
+        return $renderer->setBarcode($barcode);
+    }
+
+    /**
+     * Barcode Constructor
+     *
+     * @param mixed $barcode        String name of barcode class, or Zend_Config object.
+     * @param mixed $barcodeConfig  OPTIONAL; an array or Zend_Config object with barcode parameters.
+     * @return Zend_Barcode_Object
+     */
+    public static function makeBarcode($barcode, $barcodeConfig = array())
+    {
+        if ($barcode instanceof Zend_Barcode_Object_ObjectAbstract) {
+            return $barcode;
+        }
+
+        /*
+         * Convert Zend_Config argument to plain string
+         * barcode name and separate config object.
+         */
+        if ($barcode instanceof Zend_Config) {
+            if (isset($barcode->barcodeParams) && $barcode->barcodeParams instanceof Zend_Config) {
+                $barcodeConfig = $barcode->barcodeParams->toArray();
+            }
+            if (isset($barcode->barcode)) {
+                $barcode = (string) $barcode->barcode;
+            } else {
+                $barcode = null;
+            }
+        }
+        if ($barcodeConfig instanceof Zend_Config) {
+            $barcodeConfig = $barcodeConfig->toArray();
+        }
+
+        /*
+         * Verify that barcode parameters are in an array.
+         */
+        if (!is_array($barcodeConfig)) {
+            /**
+             * @see Zend_Barcode_Exception
+             */
+            require_once 'Zend/Barcode/Exception.php';
+            throw new Zend_Barcode_Exception(
+                'Barcode parameters must be in an array or a Zend_Config object'
+            );
+        }
+
+        /*
+         * Verify that an barcode name has been specified.
+         */
+        if (!is_string($barcode) || empty($barcode)) {
+            /**
+             * @see Zend_Barcode_Exception
+             */
+            require_once 'Zend/Barcode/Exception.php';
+            throw new Zend_Barcode_Exception(
+                'Barcode name must be specified in a string'
+            );
+        }
+        /*
+         * Form full barcode class name
+         */
+        $barcodeNamespace = 'Zend_Barcode_Object';
+        if (isset($barcodeConfig['barcodeNamespace'])) {
+            $barcodeNamespace = $barcodeConfig['barcodeNamespace'];
+        }
+
+        $barcodeName = strtolower($barcodeNamespace . '_' . $barcode);
+        $barcodeName = str_replace(' ', '_', ucwords(
+            str_replace( '_', ' ', $barcodeName)
+        ));
+
+        /*
+         * Load the barcode class.  This throws an exception
+         * if the specified class cannot be loaded.
+         */
+        if (!class_exists($barcodeName)) {
+            require_once 'Zend/Loader.php';
+            Zend_Loader::loadClass($barcodeName);
+        }
+
+        /*
+         * Create an instance of the barcode class.
+         * Pass the config to the barcode class constructor.
+         */
+        $bcAdapter = new $barcodeName($barcodeConfig);
+
+        /*
+         * Verify that the object created is a descendent of the abstract barcode type.
+         */
+        if (!$bcAdapter instanceof Zend_Barcode_Object_ObjectAbstract) {
+            /**
+             * @see Zend_Barcode_Exception
+             */
+            require_once 'Zend/Barcode/Exception.php';
+            throw new Zend_Barcode_Exception(
+                "Barcode class '$barcodeName' does not extend Zend_Barcode_Object_ObjectAbstract"
+            );
+        }
+        return $bcAdapter;
+    }
+
+    /**
+     * Renderer Constructor
+     *
+     * @param mixed $renderer           String name of renderer class, or Zend_Config object.
+     * @param mixed $rendererConfig     OPTIONAL; an array or Zend_Config object with renderer parameters.
+     * @return Zend_Barcode_Renderer
+     */
+    public static function makeRenderer($renderer = 'image', $rendererConfig = array())
+    {
+        if ($renderer instanceof Zend_Barcode_Renderer_RendererAbstract) {
+            return $renderer;
+        }
+
+        /*
+         * Convert Zend_Config argument to plain string
+         * barcode name and separate config object.
+         */
+        if ($renderer instanceof Zend_Config) {
+            if (isset($renderer->rendererParams)) {
+                $rendererConfig = $renderer->rendererParams->toArray();
+            }
+            if (isset($renderer->renderer)) {
+                $renderer = (string) $renderer->renderer;
+            }
+        }
+        if ($rendererConfig instanceof Zend_Config) {
+            $rendererConfig = $rendererConfig->toArray();
+        }
+
+        /*
+         * Verify that barcode parameters are in an array.
+         */
+        if (!is_array($rendererConfig)) {
+            /**
+             * @see Zend_Barcode_Exception
+             */
+            require_once 'Zend/Barcode/Exception.php';
+            $e = new Zend_Barcode_Exception(
+                'Barcode parameters must be in an array or a Zend_Config object'
+            );
+            $e->setIsRenderable(false);
+            throw $e;
+        }
+
+        /*
+         * Verify that an barcode name has been specified.
+         */
+        if (!is_string($renderer) || empty($renderer)) {
+            /**
+             * @see Zend_Barcode_Exception
+             */
+            require_once 'Zend/Barcode/Exception.php';
+            $e = new Zend_Barcode_Exception(
+                'Renderer name must be specified in a string'
+            );
+            $e->setIsRenderable(false);
+            throw $e;
+        }
+
+        /*
+         * Form full barcode class name
+         */
+        $rendererNamespace = 'Zend_Barcode_Renderer';
+        if (isset($rendererConfig['rendererNamespace'])) {
+            $rendererNamespace = $rendererConfig['rendererNamespace'];
+        }
+
+        $rendererName = strtolower($rendererNamespace . '_' . $renderer);
+        $rendererName = str_replace(' ', '_', ucwords(
+            str_replace( '_', ' ', $rendererName)
+        ));
+
+        /*
+         * Load the barcode class.  This throws an exception
+         * if the specified class cannot be loaded.
+         */
+        if (!class_exists($rendererName)) {
+            require_once 'Zend/Loader.php';
+            Zend_Loader::loadClass($rendererName);
+        }
+
+        /*
+         * Create an instance of the barcode class.
+         * Pass the config to the barcode class constructor.
+         */
+        $rdrAdapter = new $rendererName($rendererConfig);
+
+        /*
+         * Verify that the object created is a descendent of the abstract barcode type.
+         */
+        if (!$rdrAdapter instanceof Zend_Barcode_Renderer_RendererAbstract) {
+            /**
+             * @see Zend_Barcode_Exception
+             */
+            require_once 'Zend/Barcode/Exception.php';
+            $e = new Zend_Barcode_Exception(
+                "Renderer class '$rendererName' does not extend Zend_Barcode_Renderer_RendererAbstract"
+            );
+            $e->setIsRenderable(false);
+            throw $e;
+        }
+        return $rdrAdapter;
+    }
+
+    /**
+     * Proxy to renderer render() method
+     *
+     * @param string | Zend_Barcode_Object | array | Zend_Config $barcode
+     * @param string | Zend_Barcode_Renderer $renderer
+     * @param array | Zend_Config $barcodeConfig
+     * @param array | Zend_Config $rendererConfig
+     */
+    public static function render(
+        $barcode, 
+        $renderer, 
+        $barcodeConfig = array(), 
+        $rendererConfig = array()
+    ) {
+        self::factory($barcode, $renderer, $barcodeConfig, $rendererConfig)->render();
+    }
+
+    /**
+     * Proxy to renderer draw() method
+     *
+     * @param string | Zend_Barcode_Object | array | Zend_Config $barcode
+     * @param string | Zend_Barcode_Renderer $renderer
+     * @param array | Zend_Config $barcodeConfig
+     * @param array | Zend_Config $rendererConfig
+     * @return mixed
+     */
+    public static function draw(
+        $barcode, 
+        $renderer, 
+        $barcodeConfig = array(), 
+        $rendererConfig = array()
+    ) {
+        return self::factory($barcode, $renderer, $barcodeConfig, $rendererConfig)->draw();
+    }
+
+    /**
+     * Proxy for setBarcodeFont of Zend_Barcode_Object
+     * @param string $font
+     * @eturn void
+     */
+    public static function setBarcodeFont($font)
+    {
+        require_once 'Zend/Barcode/Object/ObjectAbstract.php';
+        Zend_Barcode_Object_ObjectAbstract::setBarcodeFont($font);
+    }
+}

+ 63 - 0
library/Zend/Barcode/Exception.php

@@ -0,0 +1,63 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to version 1.0 of the Zend Framework
+ * license, that is bundled with this package in the file LICENSE.txt, and
+ * is available through the world-wide-web at the following URL:
+ * http://framework.zend.com/license/new-bsd. If you did not receive
+ * a copy of the Zend Framework license and are unable to obtain it
+ * through the world-wide-web, please send a note to license@zend.com
+ * so we can mail you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+/**
+ * Zend_Exception
+ */
+require_once 'Zend/Exception.php';
+
+/**
+ * Zend_Barcode_Exception
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Exception extends Zend_Exception
+{
+    /**
+     * Is this exception renderable?
+     * @var bool
+     */
+    protected $_isRenderable = true;
+
+    /**
+     * Set renderable flag
+     * 
+     * @param  bool $flag 
+     * @return Zend_Barcode_Exception
+     */
+    public function setIsRenderable($flag)
+    {
+        $this->_isRenderable = (bool) $flag;
+        return $this;
+    }
+
+    /**
+     * Retrieve renderable flag
+     * 
+     * @return bool
+     */
+    public function isRenderable()
+    {
+        return $this->_isRenderable;
+    }
+}

+ 180 - 0
library/Zend/Barcode/Object/Code25.php

@@ -0,0 +1,180 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage Object
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * @see Zend_Barcode_Object_ObjectAbstract
+ */
+require_once 'Zend/Barcode/Object/ObjectAbstract.php';
+
+/**
+ * @see Zend_Validate_Barcode
+ */
+require_once 'Zend/Validate/Barcode.php';
+
+/**
+ * Class for generate Interleaved 2 of 5 barcode
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Code25 extends Zend_Barcode_Object_ObjectAbstract
+{
+    /**
+     * Coding map
+     * - 0 = narrow bar
+     * - 1 = wide bar
+     * @var array
+     */
+    protected $_codingMap = array(
+        '0' => '00110',
+        '1' => '10001',
+        '2' => '01001',
+        '3' => '11000',
+        '4' => '00101',
+        '5' => '10100',
+        '6' => '01100',
+        '7' => '00011',
+        '8' => '10010',
+        '9' => '01010',
+    );
+
+    /**
+     * Check allowed characters
+     * @param string $value
+     * @return string
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function validateText($value)
+    {
+        $validator = new Zend_Validate_Barcode(array(
+            'adapter'  => 'code25',
+            'checksum' => false,
+        ));
+        if (!$validator->isValid($value)) {
+            $message = implode("\n", $validator->getMessages());
+
+            /**
+             * @see Zend_Barcode_Object_Exception
+             */
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception($message);
+        }
+    }
+
+    /**
+     * Width of the barcode (in pixels)
+     * @return integer
+     */
+    protected function _calculateBarcodeWidth()
+    {
+        $quietZone       = $this->getQuietZone();
+        $startCharacter  = (2 * $this->_barThickWidth + 4 * $this->_barThinWidth) * $this->_factor;
+        $characterLength = (3 * $this->_barThinWidth + 2 * $this->_barThickWidth + 5 * $this->_barThinWidth) 
+                         * $this->_factor;
+        $encodedData     = strlen($this->getText()) * $characterLength;
+        $stopCharacter   = (2 * $this->_barThickWidth + 4 * $this->_barThinWidth) * $this->_factor;
+        return $quietZone + $startCharacter + $encodedData + $stopCharacter + $quietZone;
+    }
+
+    /**
+     * Partial check of interleaved 2 of 5 barcode
+     * @return void
+     */
+    protected function _checkParams()
+    {
+        $this->_checkRatio();
+    }
+
+    /**
+     * Prepare array to draw barcode
+     * @return array
+     */
+    protected function _prepareBarcode()
+    {
+        $barcodeTable = array();
+
+        // Start character (30301)
+        $barcodeTable[] = array(1 , $this->_barThickWidth , 0 , 1);
+        $barcodeTable[] = array(0 , $this->_barThinWidth , 0 , 1);
+        $barcodeTable[] = array(1 , $this->_barThickWidth , 0 , 1);
+        $barcodeTable[] = array(0 , $this->_barThinWidth , 0 , 1);
+        $barcodeTable[] = array(1 , $this->_barThinWidth , 0 , 1);
+        $barcodeTable[] = array(0 , 1);
+
+        $text = str_split($this->getText());
+        foreach ($text as $char) {
+            $barcodeChar = str_split($this->_codingMap[$char]);
+            foreach ($barcodeChar as $c) {
+                /* visible, width, top, length */
+                $width = $c ? $this->_barThickWidth : $this->_barThinWidth;
+                $barcodeTable[] = array(1 , $width , 0 , 1);
+                $barcodeTable[] = array(0 , 1);
+            }
+        }
+
+        // Stop character (30103)
+        $barcodeTable[] = array(1 , $this->_barThickWidth , 0 , 1);
+        $barcodeTable[] = array(0 , $this->_barThinWidth , 0 , 1);
+        $barcodeTable[] = array(1 , $this->_barThinWidth , 0 , 1);
+        $barcodeTable[] = array(0 , $this->_barThinWidth , 0 , 1);
+        $barcodeTable[] = array(1 , $this->_barThickWidth , 0 , 1);
+        return $barcodeTable;
+    }
+
+    /**
+     * Get barcode checksum
+     * 
+     * @param  string $text 
+     * @return int
+     */
+    public function getChecksum($text)
+    {
+        $this->_checkText($text);
+        $factor   = 3;
+        $checksum = 0;
+
+        for ($i = strlen($text); $i > 0; $i --) {
+            $checksum += intval($text{$i - 1}) * $factor;
+            $factor    = 4 - $factor;
+        }
+
+        $checksum = 10 - ($checksum % 10);
+
+        if ($checksum == 10) {
+            $checksum = 0;
+        }
+
+        return $checksum;
+    }
+
+    /**
+     * Retrieve text with checksum appended
+     * 
+     * @return string
+     */
+    protected function _getTextWithChecksum()
+    {
+        return $this->_text . $this->getChecksum($this->_text);
+    }
+}

+ 204 - 0
library/Zend/Barcode/Object/Code39.php

@@ -0,0 +1,204 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage Object
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * @see Zend_Barcode_Object_ObjectAbstract
+ */
+require_once 'Zend/Barcode/Object/ObjectAbstract.php';
+
+/**
+ * @see 'Zend_Validate_Barcode'
+ */
+require_once 'Zend/Validate/Barcode.php';
+
+/**
+ * Class for generate Code39 barcode
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Code39 extends Zend_Barcode_Object_ObjectAbstract
+{
+    /**
+     * Coding map
+     * @var array
+     */
+    private $_codingMap = array(
+        '0' => '000110100',
+        '1' => '100100001',
+        '2' => '001100001',
+        '3' => '101100000',
+        '4' => '000110001',
+        '5' => '100110000',
+        '6' => '001110000',
+        '7' => '000100101',
+        '8' => '100100100',
+        '9' => '001100100',
+        'A' => '100001001',
+        'B' => '001001001',
+        'C' => '101001000',
+        'D' => '000011001',
+        'E' => '100011000',
+        'F' => '001011000',
+        'G' => '000001101',
+        'H' => '100001100',
+        'I' => '001001100',
+        'J' => '000011100',
+        'K' => '100000011',
+        'L' => '001000011',
+        'M' => '101000010',
+        'N' => '000010011',
+        'O' => '100010010',
+        'P' => '001010010',
+        'Q' => '000000111',
+        'R' => '100000110',
+        'S' => '001000110',
+        'T' => '000010110',
+        'U' => '110000001',
+        'V' => '011000001',
+        'W' => '111000000',
+        'X' => '010010001',
+        'Y' => '110010000',
+        'Z' => '011010000',
+        '-' => '010000101',
+        '.' => '110000100',
+        ' ' => '011000100',
+        '$' => '010101000',
+        '/' => '010100010',
+        '+' => '010001010',
+        '%' => '000101010',
+        '*' => '010010100',
+    );
+
+    /**
+     * Check for invalid characters
+     * @param   string $value    Text to be ckecked
+     * @return  void
+     */
+    public function validateText($value)
+    {
+        $validator = new Zend_Validate_Barcode(array(
+            'adapter'  => 'code39',
+            'checksum' => false,
+        ));
+
+        if (!$validator->isValid($value)) {
+            $message = implode("\n", $validator->getMessages());
+            /**
+             * @see Zend_Barcode_Object_Exception
+             */
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception($message);
+        }
+    }
+
+    /**
+     * Partial check of Code39 barcode
+     * @return void
+     */
+    protected function _checkParams()
+    {
+        $this->_checkRatio();
+    }
+
+    /**
+     * Width of the barcode (in pixels)
+     * @return int
+     */
+    protected function _calculateBarcodeWidth()
+    {
+        $quietZone       = $this->getQuietZone();
+        $characterLength = (6 * $this->_barThinWidth + 3 * $this->_barThickWidth + 1) * $this->_factor;
+        $encodedData     = strlen($this->getText()) * $characterLength - $this->_factor;
+        return $quietZone + $encodedData + $quietZone;
+    }
+
+    /**
+     * Retrieve text to display
+     * @return string
+     */
+    public function getText()
+    {
+        return '*' . parent::getText() . '*';
+    }
+
+    /**
+     * Retrieve text to display
+     * @return string
+     */
+    public function getTextToDisplay()
+    {
+        return '*' . parent::getTextToDisplay() . '*';
+    }
+
+    /**
+     * Prepare array to draw barcode
+     * @return array
+     */
+    protected function _prepareBarcode()
+    {
+        $text         = str_split($this->getText());
+        $barcodeTable = array();
+        foreach ($text as $char) {
+            $barcodeChar = str_split($this->_codingMap[$char]);
+            $visible     = true;
+            foreach ($barcodeChar as $c) {
+                /* visible, width, top, length */
+                $width          = $c ? $this->_barThickWidth : $this->_barThinWidth;
+                $barcodeTable[] = array((int) $visible, $width, 0, 1);
+                $visible = ! $visible;
+            }
+            $barcodeTable[] = array(0 , 1);
+        }
+        return $barcodeTable;
+    }
+
+    /**
+     * Get barcode checksum
+     * 
+     * @param  string $text 
+     * @return int
+     */
+    public function getChecksum($text)
+    {
+        $this->_checkText($text);
+        $text     = str_split($text);
+        $charset  = array_flip(array_keys($this->_codingMap));
+        $checksum = 0;
+        foreach ($text as $character) {
+            $checksum += $charset[$character];
+        }
+        return array_search(($checksum % 43), $charset);
+    }
+
+    /**
+     * Get text with appended checksum
+     * 
+     * @return string
+     */
+    protected function _getTextWithChecksum()
+    {
+        return $this->_text . $this->getChecksum($this->_text);
+    }
+}

+ 100 - 0
library/Zend/Barcode/Object/Error.php

@@ -0,0 +1,100 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage Object
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/** @see Zend_Barcode_Object_ObjectAbstract */
+require_once 'Zend/Barcode/Object/ObjectAbstract.php';
+
+/**
+ * Class for generate Barcode
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Error extends Zend_Barcode_Object_ObjectAbstract
+{
+    /**
+     * All texts are accepted
+     * @param string $value
+     * @return boolean
+     */
+    public function validateText($value)
+    {
+        return true;
+    }
+
+    /**
+     * Height is forced
+     * @return integer
+     */
+    public function getHeight($recalculate = false)
+    {
+        return 40;
+    }
+
+    /**
+     * Width is forced
+     * @return integer
+     */
+    public function getWidth($recalculate = false)
+    {
+        return 400;
+    }
+
+    /**
+     * Reset precedent instructions
+     * and draw the error message
+     * @return array
+     */
+    public function draw()
+    {
+        $this->_instructions = array();
+        $this->_addText('ERROR:', 10, array(5 , 18), $this->_font, 0, 'left');
+        $this->_addText($this->_text, 10, array(5 , 32), $this->_font, 0, 'left');
+        return $this->_instructions;
+    }
+
+    /**
+     * For compatibility reason
+     * @return void
+     */
+    protected function _prepareBarcode()
+    {
+    }
+
+    /**
+     * For compatibility reason
+     * @return void
+     */
+    protected function _checkParams()
+    {
+    }
+
+    /**
+     * For compatibility reason
+     * @return void
+     */
+    protected function _calculateBarcodeWidth()
+    {
+    }
+}

+ 35 - 0
library/Zend/Barcode/Object/Exception.php

@@ -0,0 +1,35 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to version 1.0 of the Zend Framework
+ * license, that is bundled with this package in the file LICENSE.txt, and
+ * is available through the world-wide-web at the following URL:
+ * http://framework.zend.com/license/new-bsd. If you did not receive
+ * a copy of the Zend Framework license and are unable to obtain it
+ * through the world-wide-web, please send a note to license@zend.com
+ * so we can mail you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/** @see Zend_Barcode_Exception */
+require_once 'Zend/Barcode/Exception.php';
+
+/**
+ * Zend_Barcode_Renderer_Exception
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Exception extends Zend_Barcode_Exception
+{
+}

+ 215 - 0
library/Zend/Barcode/Object/Int25.php

@@ -0,0 +1,215 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage Object
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/** @see Zend_Barcode_Object_Code25 */
+require_once 'Zend/Barcode/Object/Code25.php';
+
+/** @see Zend_Validate_Barcode */
+require_once 'Zend/Validate/Barcode.php';
+
+/**
+ * Class for generate Interleaved 2 of 5 barcode
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Int25 extends Zend_Barcode_Object_Code25
+{
+    /**
+     * Drawing of bearer bars
+     * @var boolean
+     */
+    private $_withBearerBars = false;
+
+    /**
+     * Activate/deactivate drawing of bearer bars
+     * @param boolean $value
+     * @return Zend_Barcode_Object_Int25
+     */
+    public function setWithBearerBars($value)
+    {
+        $this->_withBearerBars = (bool) $value;
+        return $this;
+    }
+
+    /**
+     * Retrieve if bearer bars are enabled
+     * @return boolean
+     */
+    public function getWithBearerBars()
+    {
+        return $this->_withBearerBars;
+    }
+
+    /**
+     * Check allowed characters
+     * @param string $value
+     * @return string
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function validateText($value)
+    {
+        $value = (strlen($value) % 2 ? '0' . $value : $value);
+        parent::validateText($value);
+    }
+
+    /**
+     * Retrieve text to encode
+     * @return string
+     */
+    public function getText()
+    {
+        if ($this->_withChecksum) {
+            $text =  $this->_getTextWithChecksum();
+        } else {
+            $text = $this->_text;
+        }
+        return (strlen($text) % 2 ? '0' . $text : $text);
+    }
+
+    /**
+     * Retrieve text to display
+     * @return string
+     */
+    public function getTextToDisplay()
+    {
+        if ($this->_withChecksumInText) {
+            $text = $this->_getTextWithChecksum();
+            return (strlen($text) % 2 ? '0' . $text : $text);
+        }
+
+        $text = $this->_text;
+        if ($this->_withChecksum) {
+            return (strlen($text) % 2 ? $text : '0' . $text);
+        }
+
+        return (strlen($text) % 2 ? '0' . $text : $text);
+    }
+
+    /**
+     * Width of the barcode (in pixels)
+     * @return integer
+     */
+    protected function _calculateBarcodeWidth()
+    {
+        $quietZone       = $this->getQuietZone();
+        $startCharacter  = (4 * $this->_barThinWidth) * $this->_factor;
+        $characterLength = (3 * $this->_barThinWidth + 2 * $this->_barThickWidth) * $this->_factor;
+        $encodedData     = strlen($this->getText()) * $characterLength;
+        $stopCharacter   = ($this->_barThickWidth + 2 * $this->_barThinWidth) * $this->_factor;
+        return $quietZone + $startCharacter + $encodedData + $stopCharacter + $quietZone;
+    }
+
+    /**
+     * Prepare array to draw barcode
+     * @return array
+     */
+    protected function _prepareBarcode()
+    {
+        if ($this->_withBearerBars) {
+            $this->_withBorder = false;
+        }
+
+        // Start character (0000)
+        $barcodeTable[] = array(1, $this->_barThinWidth, 0, 1);
+        $barcodeTable[] = array(0, $this->_barThinWidth, 0, 1);
+        $barcodeTable[] = array(1, $this->_barThinWidth, 0, 1);
+        $barcodeTable[] = array(0, $this->_barThinWidth, 0, 1);
+
+        // Encoded $text
+        $text = $this->getText();
+        for ($i = 0; $i < strlen($text); $i += 2) { // Draw 2 chars at a time
+            $char1 = substr($text, $i, 1);
+            $char2 = substr($text, $i + 1, 1);
+
+            // Interleave
+            for ($ibar = 0; $ibar < 5; $ibar ++) {
+                // Draws char1 bar (fore color)
+                $barWidth = (substr($this->_codingMap[$char1], $ibar, 1)) 
+                          ? $this->_barThickWidth 
+                          : $this->_barThinWidth;
+
+                $barcodeTable[] = array(1, $barWidth, 0, 1);
+
+                // Left space corresponding to char2 (background color)
+                $barWidth = (substr($this->_codingMap[$char2], $ibar, 1)) 
+                          ? $this->_barThickWidth 
+                          : $this->_barThinWidth;
+                $barcodeTable[] = array(0, $barWidth, 0 , 1);
+            }
+        }
+
+        // Stop character (100)
+        $barcodeTable[] = array(1 , $this->_barThickWidth, 0, 1);
+        $barcodeTable[] = array(0 , $this->_barThinWidth,  0, 1);
+        $barcodeTable[] = array(1 , $this->_barThinWidth,  0, 1);
+        return $barcodeTable;
+    }
+
+    /**
+     * Drawing of bearer bars (if enabled)
+     *
+     * @return void
+     */
+    protected function _postDrawBarcode()
+    {
+        if (!$this->_withBearerBars) {
+            return;
+        }
+
+        $width  = $this->_barThickWidth * $this->_factor;
+        $point1 = $this->_rotate(-1, -1);
+        $point2 = $this->_rotate($this->_calculateWidth() - 1, -1);
+        $point3 = $this->_rotate($this->_calculateWidth() - 1, $width - 1);
+        $point4 = $this->_rotate(-1, $width - 1);
+        $this->_addPolygon(array(
+            $point1,
+            $point2,
+            $point3,
+            $point4,
+        ));
+        $point1 = $this->_rotate(
+            0,
+            0 + $this->_barHeight * $this->_factor - 1
+        );
+        $point2 = $this->_rotate(
+            $this->_calculateWidth() - 1,
+            0 + $this->_barHeight * $this->_factor - 1
+        );
+        $point3 = $this->_rotate(
+            $this->_calculateWidth() - 1,
+            0 + $this->_barHeight * $this->_factor - $width
+        );
+        $point4 = $this->_rotate(
+            0,
+            0 + $this->_barHeight * $this->_factor - $width
+        );
+        $this->_addPolygon(array(
+            $point1,
+            $point2,
+            $point3,
+            $point4,
+        ));
+    }
+}

+ 132 - 0
library/Zend/Barcode/Object/Itf14.php

@@ -0,0 +1,132 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage Object
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/** @see Zend_Barcode_Object_Int25 */
+require_once 'Zend/Barcode/Object/Int25.php';
+
+/** @see Zend_Validate_Barcode */
+require_once 'Zend/Validate/Barcode.php';
+
+/**
+ * Class for generate Itf14 barcode
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Itf14 extends Zend_Barcode_Object_Int25
+{
+    /**
+     * Constructor
+     * @param array|Zend_Config $options
+     * @return void
+     */
+    public function __construct($options = null)
+    {
+        parent::__construct($options);
+
+        // Checksum is mandatory with Itf14
+        $this->_withChecksum = true;
+
+        // Default to true but not mandatory
+        $this->_withChecksumInText = true;
+    }
+
+    /**
+     * Activate/deactivate the automatic generation
+     * of the checksum character
+     * added to the barcode text
+     * @param boolean $value
+     * @return Zend_Barcode_Object
+     */
+    public function setWithChecksum($value)
+    {
+        // Checksum is mandatory with Itf14
+        return $this;
+    }
+
+    /**
+     * Activate/deactivate the automatic generation
+     * of the checksum character
+     * added to the barcode text
+     * @param boolean $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setWithChecksumInText($value)
+    {
+        return $this;
+    }
+
+    /**
+     * Retrieve text to encode
+     * @return string
+     */
+    public function getText()
+    {
+        $text = $this->_getTextWithChecksum();
+        if (strlen($text) < 14) {
+            $text = str_repeat('0', 14 - strlen($text)) . $text;
+        }
+        return $text;
+    }
+
+    /**
+     * Retrieve text to display
+     * @return string
+     */
+    public function getTextToDisplay()
+    {
+        return $this->getText();
+    }
+
+    /**
+     * Check allowed characters
+     * @param string $value
+     * @return string
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function validateText($value)
+    {
+        $validator = new Zend_Validate_Barcode(array(
+            'adapter'  => 'itf14',
+            'checksum' => false,
+        ));
+
+        // prepend '0'
+        if (strlen($value) < 13) {
+            $value = str_repeat('0', 13 - strlen($value)) . $value;
+        }
+
+        // add a '0' because checksum is mandatory
+        if (!$validator->isValid($value . '0')) {
+            $message = implode("\n", $validator->getMessages());
+
+            /**
+             * @see Zend_Barcode_Object_Exception
+             */
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception($message);
+        }
+    }
+}

+ 1176 - 0
library/Zend/Barcode/Object/ObjectAbstract.php

@@ -0,0 +1,1176 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage Object
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Class for generate Barcode
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+abstract class Zend_Barcode_Object_ObjectAbstract
+{
+    /**
+     * Namespace of the barcode for autoloading
+     * @var string
+     */
+    protected $_barcodeNamespace = 'Zend_Barcode_Object';
+
+    /**
+     * Set of drawing instructions
+     * @var array
+     */
+    protected $_instructions = array();
+
+    /**
+     * Barcode type
+     * @var string
+     */
+    protected $_type = null;
+
+    /**
+     * Height of the object
+     * @var integer
+     */
+    protected $_height = null;
+
+    /**
+     * Width of the object
+     * @var integer
+     */
+    protected $_width = null;
+
+    /**
+     * Height of the bar
+     * @var integer
+     */
+    protected $_barHeight = 50;
+
+    /**
+     * Width of a thin bar
+     * @var integer
+     */
+    protected $_barThinWidth = 1;
+
+    /**
+     * Width of a thick bar
+     * @var integer
+     */
+    protected $_barThickWidth = 3;
+
+    /**
+     * Factor to multiply bar and font measure
+     * (barHeight, barThinWidth, barThickWidth & fontSize)
+     * @var integer
+     */
+    protected $_factor = 1;
+
+    /**
+     * Font and bars color of the object
+     * @var integer
+     */
+    protected $_foreColor = 0x000000;
+
+    /**
+     * Background color of the object
+     * @var integer
+     */
+    protected $_backgroundColor = 0xFFFFFF;
+
+    /**
+     * Activate/deactivate border of the object
+     * @var boolean
+     */
+    protected $_withBorder = false;
+
+    /**
+     * Orientation of the barcode in degrees
+     * @var float
+     */
+    protected $_orientation = 0;
+
+    /**
+     * Offset from the top the object
+     * (calculated from the orientation)
+     * @var integer
+     */
+    protected $_offsetTop = null;
+
+    /**
+     * Offset from the left the object
+     * (calculated from the orientation)
+     * @var integer
+     */
+    protected $_offsetLeft = null;
+
+    /**
+     * Text to display
+     * @var string
+     */
+    protected $_text = null;
+
+    /**
+     * Display (or not) human readable text
+     * @var boolean
+     */
+    protected $_drawText = true;
+
+    /**
+     * Adjust (or not) position of human readable characters with barcode
+     * @var boolean
+     */
+    protected $_stretchText = false;
+
+    /**
+     * Font resource
+     *  - integer (1 to 5): corresponds to GD included fonts
+     *  - string: corresponds to path of a TTF font
+     * @var integer|string
+     */
+    protected $_font = null;
+
+    /**
+     * Font size
+     * @var float
+     */
+    protected $_fontSize = 10;
+
+    /**
+     * Drawing of checksum
+     * @var boolean
+     */
+    protected $_withChecksum = false;
+
+    /**
+     * Drawing of checksum inside text
+     * @var boolean
+     */
+    protected $_withChecksumInText = false;
+
+    /**
+     * TTF font name: can be set before instanciation of the object
+     * @var string
+     */
+    protected static $_staticFont = null;
+
+    /**
+     * Constructor
+     * @param array|Zend_Config $options
+     * @return void
+     */
+    public function __construct($options = null)
+    {
+        if (self::$_staticFont !== null) {
+            $this->_font = self::$_staticFont;
+        }
+        if ($options instanceof Zend_Config) {
+            $options = $options->toArray();
+        }
+        if (is_array($options)) {
+            $this->setOptions($options);
+        }
+        $this->_type = strtolower(substr(get_class($this), strlen($this->_barcodeNamespace) + 1));
+    }
+
+    /**
+     * Set barcode state from options array
+     * @param  array $options
+     * @return Zend_Barcode_Object
+     */
+    public function setOptions($options)
+    {
+        foreach ($options as $key => $value) {
+            $method = 'set' . $key;
+            if (method_exists($this, $method)) {
+                $this->$method($value);
+            }
+        }
+        return $this;
+    }
+
+    /**
+     * Set barcode state from config object
+     * @param Zend_Config $config
+     * @return Zend_Barcode_Object
+     */
+    public function setConfig(Zend_Config $config)
+    {
+        return $this->setOptions($config->toArray());
+    }
+
+    /**
+     * Set barcode namespace for autoloading
+     *
+     * @param string $namespace
+     * @return Zend_Barcode_Object
+     */
+    public function setBarcodeNamespace($namespace)
+    {
+        $this->_barcodeNamespace = $namespace;
+        return $this;
+    }
+
+    /**
+     * Retrieve barcode namespace
+     *
+     * @return string
+     */
+    public function getBarcodeNamespace()
+    {
+        return $this->_barcodeNamespace;
+    }
+
+    /**
+     * Retrieve type of barcode
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->_type;
+    }
+
+    /**
+     * Set height of the barcode bar
+     * @param integer $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setBarHeight($value)
+    {
+        if (intval($value) <= 0) {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(
+                'Bar height must be greater than 0'
+            );
+        }
+        $this->_barHeight = intval($value);
+        return $this;
+    }
+
+    /**
+     * Get height of the barcode bar
+     * @return integer
+     */
+    public function getBarHeight()
+    {
+        return $this->_barHeight;
+    }
+
+    /**
+     * Set thickness of thin bar
+     * @param integer $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setBarThinWidth($value)
+    {
+        if (intval($value) <= 0) {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(
+                'Bar width must be greater than 0'
+            );
+        }
+        $this->_barThinWidth = intval($value);
+        return $this;
+    }
+
+    /**
+     * Get thickness of thin bar
+     * @return integer
+     */
+    public function getBarThinWidth()
+    {
+        return $this->_barThinWidth;
+    }
+
+    /**
+     * Set thickness of thick bar
+     * @param integer $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setBarThickWidth($value)
+    {
+        if (intval($value) <= 0) {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(
+                'Bar width must be greater than 0'
+            );
+        }
+        $this->_barThickWidth = intval($value);
+        return $this;
+    }
+
+    /**
+     * Get thickness of thick bar
+     * @return integer
+     */
+    public function getBarThickWidth()
+    {
+        return $this->_barThickWidth;
+    }
+
+    /**
+     * Set factor applying to
+     * thinBarWidth - thickBarWidth - barHeight - fontSize
+     * @param integer $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setFactor($value)
+    {
+        if (floatval($value) <= 0) {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(
+                'Factor must be greater than 0'
+            );
+        }
+        $this->_factor = floatval($value);
+        return $this;
+    }
+
+    /**
+     * Get factor applying to
+     * thinBarWidth - thickBarWidth - barHeight - fontSize
+     * @return integer
+     */
+    public function getFactor()
+    {
+        return $this->_factor;
+    }
+
+    /**
+     * Set color of the barcode and text
+     * @param string $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setForeColor($value)
+    {
+        if (preg_match('`\#[0-9A-F]{6}`', $value)) {
+            $this->_foreColor = hexdec($value);
+        } elseif (is_numeric($value) && $value >= 0 && $value <= 16777125) {
+            $this->_foreColor = intval($value);
+        } else {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(
+                'Text color must be set as #[0-9A-F]{6}'
+            );
+        }
+        return $this;
+    }
+
+    /**
+     * Retrieve color of the barcode and text
+     * @return unknown
+     */
+    public function getForeColor()
+    {
+        return $this->_foreColor;
+    }
+
+    /**
+     * Set the color of the background
+     * @param integer $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setBackgroundColor($value)
+    {
+        if (preg_match('`\#[0-9A-F]{6}`', $value)) {
+            $this->_backgroundColor = hexdec($value);
+        } elseif (is_numeric($value) && $value >= 0 && $value <= 16777125) {
+            $this->_backgroundColor = intval($value);
+        } else {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(
+                'Background color must be set as #[0-9A-F]{6}'
+            );
+        }
+        return $this;
+    }
+
+    /**
+     * Retrieve background color of the image
+     * @return integer
+     */
+    public function getBackgroundColor()
+    {
+        return $this->_backgroundColor;
+    }
+
+    /**
+     * Activate/deactivate drawing of the bar
+     * @param boolean $value
+     * @return Zend_Barcode_Object
+     */
+    public function setWithBorder($value)
+    {
+        $this->_withBorder = (bool) $value;
+        return $this;
+    }
+
+    /**
+     * Retrieve if border are draw or not
+     * @return boolean
+     */
+    public function getWithBorder()
+    {
+        return $this->_withBorder;
+    }
+
+    /**
+     * Allow fast inversion of font/bars color and background color
+     * @return Zend_Barcode_Object
+     */
+    public function setReverseColor()
+    {
+        $tmp                    = $this->_foreColor;
+        $this->_foreColor       = $this->_backgroundColor;
+        $this->_backgroundColor = $tmp;
+        return $this;
+    }
+
+    /**
+     * Set orientation of barcode and text
+     * @param float $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setOrientation($value)
+    {
+        $this->_orientation = floatval($value) - floor(floatval($value) / 360) * 360;
+        return $this;
+    }
+
+    /**
+     * Retrieve orientation of barcode and text
+     * @return float
+     */
+    public function getOrientation()
+    {
+        return $this->_orientation;
+    }
+
+    /**
+     * Set text to encode
+     * @param string $value
+     * @return Zend_Barcode_Object
+     */
+    public function setText($value)
+    {
+        $this->_text = trim($value);
+        return $this;
+    }
+
+    /**
+     * Retrieve text to encode
+     * @return string
+     */
+    public function getText()
+    {
+        if ($this->_withChecksum) {
+            return $this->_getTextWithChecksum();
+        }
+        return $this->_text;
+    }
+
+    /**
+     * Retrieve text to encode
+     * @return string
+     */
+    public function getRawText()
+    {
+        return $this->_text;
+    }
+
+    /**
+     * Retrieve text to display
+     * @return string
+     */
+    public function getTextToDisplay()
+    {
+        if ($this->_withChecksumInText) {
+            return $this->_getTextWithChecksum();
+        }
+        return $this->_text;
+    }
+
+    /**
+     * Activate/deactivate drawing of text to encode
+     * @param boolean $value
+     * @return Zend_Barcode_Object
+     */
+    public function setDrawText($value)
+    {
+        $this->_drawText = (bool) $value;
+        return $this;
+    }
+
+    /**
+     * Retrieve if drawing of text to encode is enabled
+     * @return boolean
+     */
+    public function getDrawText()
+    {
+        return $this->_drawText;
+    }
+
+    /**
+     * Activate/deactivate the adjustment of the position
+     * of the characters to the position of the bars
+     * @param boolean $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setStretchText($value)
+    {
+        $this->_stretchText = (bool) $value;
+        return $this;
+    }
+
+    /**
+     * Retrieve if the adjustment of the position of the characters
+     * to the position of the bars is enabled
+     * @return boolean
+     */
+    public function getStretchText()
+    {
+        return $this->_stretchText;
+    }
+
+    /**
+     * Activate/deactivate the automatic generation
+     * of the checksum character
+     * added to the barcode text
+     * @param boolean $value
+     * @return Zend_Barcode_Object
+     */
+    public function setWithChecksum($value)
+    {
+        $this->_withChecksum = (bool) $value;
+        return $this;
+    }
+
+    /**
+     * Retrieve if the checksum character is automatically
+     * added to the barcode text
+     * @return boolean
+     */
+    public function getWithChecksum()
+    {
+        return $this->_withChecksum;
+    }
+
+    /**
+     * Activate/deactivate the automatic generation
+     * of the checksum character
+     * added to the barcode text
+     * @param boolean $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setWithChecksumInText($value)
+    {
+        $this->_withChecksumInText = (bool) $value;
+        return $this;
+    }
+
+    /**
+     * Retrieve if the checksum character is automatically
+     * added to the barcode text
+     * @return boolean
+     */
+    public function getWithChecksumInText()
+    {
+        return $this->_withChecksumInText;
+    }
+
+    /**
+     * Set the font for all instances of barcode
+     * @param string $font
+     * @return void
+     */
+    public static function setBarcodeFont($font)
+    {
+        if (is_string($font)) {
+            self::$_staticFont = $font;
+        }
+    }
+
+    /**
+     * Set the font:
+     *  - if integer between 1 and 5, use gd built-in fonts
+     *  - if string, $value is assumed to be the path to a TTF font
+     * @param integer|string $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setFont($value)
+    {
+        if (is_int($value) && $value >= 1 && $value <= 5) {
+            if (!extension_loaded('gd')) {
+                require_once 'Zend/Barcode/Object/Exception.php';
+                throw new Zend_Barcode_Object_Exception(
+                    'GD extension is required to use numeric font'
+                );
+            }
+
+            // Case of numeric font with GD
+            $this->_font = $value;
+
+            // In this case font size is given by:
+            $this->_fontSize = imagefontheight($value);
+        } elseif (is_string($value)) {
+            $this->_font = $value;
+        } else {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(sprintf(
+                'Invalid font "%s" provided to setFont()',
+                $value
+            ));
+        }
+        return $this;
+    }
+
+    /**
+     * Retrieve the font
+     * @return integer|string
+     */
+    public function getFont()
+    {
+        return $this->_font;
+    }
+
+    /**
+     * Set the size of the font in case of TTF
+     * @param float $value
+     * @return Zend_Barcode_Object
+     * @throw Zend_Barcode_Object_Exception
+     */
+    public function setFontSize($value)
+    {
+        if (is_numeric($this->_font)) {
+            // Case of numeric font with GD
+            return $this;
+        }
+
+        if (!is_numeric($value)) {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(
+                'Font size must be a numeric value'
+            );
+        }
+
+        $this->_fontSize = $value;
+        return $this;
+    }
+
+    /**
+     * Retrieve the size of the font in case of TTF
+     * @return float
+     */
+    public function getFontSize()
+    {
+        return $this->_fontSize;
+    }
+
+    /**
+     * Quiet zone before first bar
+     * and after the last bar
+     * @return integer
+     */
+    public function getQuietZone()
+    {
+        return 10 * $this->_barThinWidth * $this->_factor;
+    }
+
+    /**
+     * Add an instruction in the array of instructions
+     * @param array $instruction
+     */
+    protected function _addInstruction(array $instruction)
+    {
+        $this->_instructions[] = $instruction;
+    }
+
+    /**
+     * Retrieve the set of drawing instructions
+     * @return array
+     */
+    public function getInstructions()
+    {
+        return $this->_instructions;
+    }
+
+    /**
+     * Add a polygon drawing instruction in the set of instructions
+     * @param array $points
+     * @param integer $color
+     * @param boolean $filled
+     */
+    protected function _addPolygon(array $points, $color = null, $filled = true)
+    {
+        if ($color === null) {
+            $color = $this->_foreColor;
+        }
+        $this->_addInstruction(array(
+            'type'   => 'polygon',
+            'points' => $points,
+            'color'  => $color,
+            'filled' => $filled,
+        ));
+    }
+
+    /**
+     * Add a text drawing instruction in the set of instructions
+     * @param string $text
+     * @param float $size
+     * @param array $position
+     * @param string $font
+     * @param integer $color
+     * @param string $alignment
+     * @param float $orientation
+     */
+    protected function _addText(
+        $text, 
+        $size, 
+        $position, 
+        $font, 
+        $color, 
+        $alignment = 'center', 
+        $orientation = 0
+    ) {
+        if ($color === null) {
+            $color = $this->_foreColor;
+        }
+        $this->_addInstruction(array(
+            'type'        => 'text', 
+            'text'        => $text,
+            'size'        => $size,
+            'position'    => $position,
+            'font'        => $font,
+            'color'       => $color,
+            'alignment'   => $alignment,
+            'orientation' => $orientation,
+        ));
+    }
+
+    /**
+     * Checking of parameters after all settings
+     * @return void
+     */
+    public function checkParams()
+    {
+        $this->_checkText();
+        $this->_checkFontAndOrientation();
+        $this->_checkParams();
+        return true;
+    }
+
+    /**
+     * Check if a text is really provided to barcode
+     * @return void
+     * @throw Zend_Barcode_Object_Exception
+     */
+    protected function _checkText($value = null)
+    {
+        if ($value === null) {
+            $value = $this->_text;
+        }
+        if (!strlen($value)) {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(
+                'A text must be provide to Barcode before drawing'
+            );
+        }
+        $this->validateText($value);
+    }
+
+    /**
+     * Check the ratio between the thick and the thin bar
+     * @param integer $min
+     * @param integer $max
+     * @return void
+     * @throw Zend_Barcode_Object_Exception
+     */
+    protected function _checkRatio($min = 2, $max = 3)
+    {
+        $ratio = $this->_barThickWidth / $this->_barThinWidth;
+        if (!($ratio >= $min && $ratio <= $max)) {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(sprintf(
+                'Ratio thick/thin bar must be between %0.1f and %0.1f (actual %0.3f)',
+                $min,
+                $max,
+                $ratio
+            ));
+        }
+    }
+
+    /**
+     * Drawing with an angle is just allow TTF font
+     * @return void
+     * @throw Zend_Barcode_Object_Exception
+     */
+    protected function _checkFontAndOrientation()
+    {
+        if (is_numeric($this->_font) && $this->_orientation != 0) {
+            require_once 'Zend/Barcode/Object/Exception.php';
+            throw new Zend_Barcode_Object_Exception(
+                'Only drawing with TTF font allow orientation of the barcode.'
+            );
+        }
+    }
+
+    /**
+     * Width of the result image
+     * (before any rotation)
+     * @return integer
+     */
+    protected function _calculateWidth()
+    {
+        return (int) $this->_withBorder 
+            + $this->_calculateBarcodeWidth() 
+            + (int) $this->_withBorder;
+    }
+
+    /**
+     * Calculate the width of the barcode
+     * @return integer
+     */
+    abstract protected function _calculateBarcodeWidth();
+
+    /**
+     * Height of the result object
+     * @return integer
+     */
+    protected function _calculateHeight()
+    {
+        return (int) $this->_withBorder * 2 
+            + $this->_calculateBarcodeHeight() 
+            + (int) $this->_withBorder * 2;
+    }
+
+    /**
+     * Height of the barcode
+     * @return integer
+     */
+    protected function _calculateBarcodeHeight()
+    {
+        $textHeight = 0;
+        $extraHeight = 0;
+        if ($this->_drawText) {
+            $textHeight += $this->_fontSize;
+            $extraHeight = 1;
+        }
+        return ($this->_barHeight + $textHeight) * $this->_factor + $extraHeight;
+    }
+
+    /**
+     * Get height of the result object
+     * @return integer
+     */
+    public function getHeight($recalculate = false)
+    {
+        if ($this->_height === null || $recalculate) {
+            $this->_height = 
+                abs($this->_calculateHeight() * cos($this->_orientation / 180 * pi())) 
+                + abs($this->_calculateWidth() * sin($this->_orientation / 180 * pi()));
+        }
+        return $this->_height;
+    }
+
+    /**
+     * Get width of the result object
+     * @return integer
+     */
+    public function getWidth($recalculate = false)
+    {
+        if ($this->_width === null || $recalculate) {
+            $this->_width = 
+                abs($this->_calculateWidth() * cos($this->_orientation / 180 * pi())) 
+                + abs($this->_calculateHeight() * sin($this->_orientation / 180 * pi()));
+        }
+        return $this->_width;
+    }
+
+    /**
+     * Calculate the offset from the left of the object
+     * if an orientation is activated
+     * @param boolean $recalculate
+     * @return float
+     */
+    public function getOffsetLeft($recalculate = false)
+    {
+        if ($this->_offsetLeft === null || $recalculate) {
+            $this->_offsetLeft = - min(array(
+                0 * cos(
+                        $this->_orientation / 180 * pi()) - 0 * sin(
+                        $this->_orientation / 180 * pi()),
+                0 * cos(
+                        $this->_orientation / 180 * pi()) - $this->_calculateBarcodeHeight() * sin(
+                        $this->_orientation / 180 * pi()),
+                $this->_calculateBarcodeWidth() * cos(
+                        $this->_orientation / 180 * pi()) - $this->_calculateBarcodeHeight() * sin(
+                        $this->_orientation / 180 * pi()),
+                $this->_calculateBarcodeWidth() * cos(
+                        $this->_orientation / 180 * pi()) - 0 * sin(
+                        $this->_orientation / 180 * pi()),
+            ));
+        }
+        return $this->_offsetLeft;
+    }
+
+    /**
+     * Calculate the offset from the top of the object
+     * if an orientation is activated
+     * @param boolean $recalculate
+     * @return float
+     */
+    public function getOffsetTop($recalculate = false)
+    {
+        if ($this->_offsetTop === null || $recalculate) {
+            $this->_offsetTop = - min(array(
+                0 * cos(
+                        $this->_orientation / 180 * pi()) + 0 * sin(
+                        $this->_orientation / 180 * pi()),
+                $this->_calculateBarcodeHeight() * cos(
+                        $this->_orientation / 180 * pi()) + 0 * sin(
+                        $this->_orientation / 180 * pi()),
+                $this->_calculateBarcodeHeight() * cos(
+                        $this->_orientation / 180 * pi()) + $this->_calculateBarcodeWidth() * sin(
+                        $this->_orientation / 180 * pi()),
+                0 * cos(
+                        $this->_orientation / 180 * pi()) + $this->_calculateBarcodeWidth() * sin(
+                        $this->_orientation / 180 * pi()),
+            ));
+        }
+        return $this->_offsetTop;
+    }
+
+    /**
+     * Apply rotation on a point in X/Y dimensions
+     * @param float $x1     x-position before rotation
+     * @param float $y1     y-position before rotation
+     * @return array        Array of two elements corresponding to the new XY point
+     */
+    protected function _rotate($x1, $y1)
+    {
+        $x2 = $x1 * cos($this->_orientation / 180 * pi()) 
+            - $y1 * sin($this->_orientation / 180 * pi()) 
+            + $this->getOffsetLeft();
+        $y2 = $y1 * cos($this->_orientation / 180 * pi()) 
+            + $x1 * sin($this->_orientation / 180 * pi()) 
+            + $this->getOffsetTop();
+        return array(intval($x2) , intval($y2));
+    }
+
+    /**
+     * Complete drawing of the barcode
+     * @return array Table of instructions
+     */
+    public function draw()
+    {
+        $this->checkParams();
+        $this->_drawBarcode();
+        $this->_drawBorder();
+        $this->_drawText();
+        return $this->getInstructions();
+    }
+
+    /**
+     * Draw the barcode
+     * @return void
+     */
+    protected function _drawBarcode()
+    {
+        $barcodeTable = $this->_prepareBarcode();
+
+        $this->_preDrawBarcode();
+
+        $xpos = (int) $this->_withBorder;
+        $ypos = (int) $this->_withBorder;
+
+        $point1 = $this->_rotate(0, 0);
+        $point2 = $this->_rotate(0, $this->_calculateHeight() - 1);
+        $point3 = $this->_rotate(
+            $this->_calculateWidth() - 1,
+            $this->_calculateHeight() - 1
+        );
+        $point4 = $this->_rotate($this->_calculateWidth() - 1, 0);
+
+        $this->_addPolygon(array(
+            $point1, 
+            $point2, 
+            $point3, 
+            $point4
+        ), $this->_backgroundColor);
+
+        $xpos     += $this->getQuietZone();
+        $barLength = $this->_barHeight * $this->_factor;
+
+        foreach ($barcodeTable as $bar) {
+            $width = $bar[1] * $this->_factor;
+            if ($bar[0]) {
+                $point1 = $this->_rotate($xpos, $ypos + $bar[2] * $barLength);
+                $point2 = $this->_rotate($xpos, $ypos + $bar[3] * $barLength);
+                $point3 = $this->_rotate(
+                    $xpos + $width - 1, 
+                    $ypos + $bar[3] * $barLength
+                );
+                $point4 = $this->_rotate(
+                    $xpos + $width - 1,
+                    $ypos + $bar[2] * $barLength
+                );
+                $this->_addPolygon(array(
+                    $point1,
+                    $point2,
+                    $point3,
+                    $point4,
+                ));
+            }
+            $xpos += $width;
+        }
+
+        $this->_postDrawBarcode();
+    }
+
+    /**
+     * Partial function to draw border
+     * @return void
+     */
+    protected function _drawBorder()
+    {
+        if ($this->_withBorder) {
+            $point1 = $this->_rotate(0, 0);
+            $point2 = $this->_rotate($this->_calculateWidth() - 1, 0);
+            $point3 = $this->_rotate(
+                $this->_calculateWidth() - 1,
+                $this->_calculateHeight() - 1
+            );
+            $point4 = $this->_rotate(0, $this->_calculateHeight() - 1);
+            $this->_addPolygon(array(
+                $point1,
+                $point2,
+                $point3,
+                $point4,
+                $point1,
+            ), $this->_foreColor, false);
+        }
+    }
+
+    /**
+     * Partial function to draw text
+     * @return void
+     */
+    protected function _drawText()
+    {
+        if ($this->_drawText) {
+            $text = $this->getTextToDisplay();
+            if ($this->_stretchText) {
+                $textLength = strlen($text);
+                $space      = ($this->_calculateWidth() - 2 * $this->getQuietZone()) / $textLength;
+                for ($i = 0; $i < $textLength; $i ++) {
+                    $leftPosition = $this->getQuietZone() + $space * ($i + 0.5);
+                    $this->_addText(
+                        $text{$i},
+                        $this->_fontSize * $this->_factor,
+                        $this->_rotate(
+                            $leftPosition,
+                            (int) $this->_withBorder * 2 
+                                + $this->_factor * ($this->_barHeight + $this->_fontSize)
+                        ),
+                        $this->_font,
+                        $this->_foreColor,
+                        'center',
+                        - $this->_orientation
+                    );
+                }
+            } else {
+                $this->_addText(
+                    $text,
+                    $this->_fontSize * $this->_factor,
+                    $this->_rotate(
+                        $this->_calculateWidth() / 2,
+                        (int) $this->_withBorder * 2 
+                            + $this->_factor * ($this->_barHeight + $this->_fontSize)
+                    ),
+                    $this->_font,
+                    $this->_foreColor,
+                    'center',
+                    - $this->_orientation
+                );
+            }
+        }
+    }
+
+    /**
+     * Each child must verify allowed characters
+     *
+     * @return void
+     */
+    abstract public function validateText($value);
+
+    /**
+     * Each child must prepare the barcode and return
+     * a table like array(
+     *     0 => array( 
+     *         0 => int (visible(black) or not(white))
+     *         1 => int (width of the bar)
+     *         2 => float (0->1 position from the top of the beginning of the bar in %)
+     *         3 => float (0->1 position from the top of the end of the bar in %)
+     *     ),
+     *     1 => ...
+     * )
+     *
+     * @return array
+     */
+    abstract protected function _prepareBarcode();
+
+    /**
+     * Checking of parameters after all settings
+     *
+     * @return void
+     */
+    abstract protected function _checkParams();
+
+    /**
+     * Allow each child to draw something else
+     *
+     * @return void
+     */
+    protected function _preDrawBarcode()
+    {
+    }
+
+    /**
+     * Allow each child to draw something else
+     * (ex: bearer bars in interleaved 2 of 5 code)
+     *
+     * @return void
+     */
+    protected function _postDrawBarcode()
+    {
+    }
+}

+ 35 - 0
library/Zend/Barcode/Renderer/Exception.php

@@ -0,0 +1,35 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to version 1.0 of the Zend Framework
+ * license, that is bundled with this package in the file LICENSE.txt, and
+ * is available through the world-wide-web at the following URL:
+ * http://framework.zend.com/license/new-bsd. If you did not receive
+ * a copy of the Zend Framework license and are unable to obtain it
+ * through the world-wide-web, please send a note to license@zend.com
+ * so we can mail you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/** @see Zend_Barcode_Exception */
+require_once 'Zend/Barcode/Exception.php';
+
+/**
+ * Zend_Barcode_Renderer_Exception
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Renderer_Exception extends Zend_Barcode_Exception
+{
+}

+ 452 - 0
library/Zend/Barcode/Renderer/Image.php

@@ -0,0 +1,452 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage Renderer
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/** @see Zend_Barcode_Renderer_RendererAbstract*/
+require_once 'Zend/Barcode/Renderer/RendererAbstract.php';
+
+/**
+ * Class for rendering the barcode as image
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Renderer_Image extends Zend_Barcode_Renderer_RendererAbstract
+{
+    /**
+     * List of authorized output format
+     * @var array
+     */
+    protected $_allowedImageType = array(
+        'png', 
+        'jpeg', 
+        'gif',
+    );
+
+    /**
+     * Image format
+     * @var string
+     */
+    protected $_imageType = 'png';
+
+    /**
+     * Resource for the image
+     * @var resource
+     */
+    protected $_resource = null;
+
+    /**
+     * Resource for the font and bars color of the image
+     * @var integer
+     */
+    protected $_imageForeColor = null;
+
+    /**
+     * Resource for the background color of the image
+     * @var integer
+     */
+    protected $_imageBackgroundColor = null;
+
+    /**
+     * Height of the rendered image wanted by user
+     * @var integer
+     */
+    protected $_userHeight = 0;
+
+    /**
+     * Width of the rendered image wanted by user
+     * @var integer
+     */
+    protected $_userWidth = 0;
+
+    /**
+     * Set height of the result image
+     * @param null|integer $value
+     * @return Zend_Image_Barcode_Abstract
+     * @throw Zend_Image_Barcode_Exception
+     */
+    public function setHeight($value)
+    {
+        if (!is_numeric($value) || intval($value) < 0) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                'Image height must be greater than or equals 0'
+            );
+        }
+        $this->_userHeight = intval($value);
+        return $this;
+    }
+
+    /**
+     * Get barcode height
+     * 
+     * @return int
+     */
+    public function getHeight()
+    {
+        return $this->_userHeight;
+    }
+
+    /**
+     * Set barcode width
+     * 
+     * @param mixed $value 
+     * @return void
+     */
+    public function setWidth($value)
+    {
+        if (!is_numeric($value) || intval($value) < 0) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                'Image width must be greater than or equals 0'
+            );
+        }
+        $this->_userWidth = intval($value);
+        return $this;
+    }
+
+    /**
+     * Get barcode width
+     * 
+     * @return int
+     */
+    public function getWidth()
+    {
+        return $this->_userWidth;
+    }
+
+    /**
+     * Set an image resource to draw the barcode inside
+     *
+     * @param resource $value
+     * @return Zend_Barcode_Renderer
+     * @throw Zend_Barcode_Renderer_Exception
+     */
+    public function setResource($image)
+    {
+        if (gettype($image) != 'resource' || get_resource_type($image) != 'gd') {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                'Invalid image resource provided to setResource()'
+            );
+        }
+        $this->_resource = $image;
+        return $this;
+    }
+
+    /**
+     * Set the image type to produce (png, jpeg, gif)
+     *
+     * @param string $value
+     * @return Zend_Barcode_RendererAbstract
+     * @throw Zend_Barcode_Renderer_Exception
+     */
+    public function setImageType($value)
+    {
+        if ($value == 'jpg') {
+            $value = 'jpeg';
+        }
+
+        if (!in_array($value, $this->_allowedImageType)) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(sprintf(
+                'Invalid type "%s" provided to setImageType()',
+                $value
+            ));
+        }
+
+        $this->_imageType = $value;
+        return $this;
+    }
+
+    /**
+     * Retrieve the image type to produce
+     * 
+     * @return string
+     */
+    public function getImageType()
+    {
+        return $this->_imageType;
+    }
+
+    /**
+     * Initialize the image resource
+     *
+     * @return void
+     */
+    protected function _initRenderer()
+    {
+        if (!extension_loaded('gd')) {
+            require_once 'Zend/Barcode/Exception.php';
+            $e = new Zend_Barcode_Exception(
+                'Gd extension must be loaded to render barcode as image'
+            );
+            $e->setIsRenderable(false);
+            throw $e;
+        }
+
+        $barcodeWidth  = $this->_barcode->getWidth(true);
+        $barcodeHeight = $this->_barcode->getHeight(true);
+
+        if ($this->_resource !== null) {
+            $foreColor       = $this->_barcode->getForeColor();
+            $backgroundColor = $this->_barcode->getBackgroundColor();
+            $this->_imageBackgroundColor = imagecolorallocate(
+                $this->_resource,
+                ($backgroundColor & 0xFF0000) >> 16,
+                ($backgroundColor & 0x00FF00) >> 8,
+                $backgroundColor & 0x0000FF
+            );
+            $this->_imageForeColor = imagecolorallocate(
+                $this->_resource,
+                ($foreColor & 0xFF0000) >> 16,
+                ($foreColor & 0x00FF00) >> 8,
+                $foreColor & 0x0000FF
+            );
+        } else {
+            $width = $barcodeWidth;
+            $height = $barcodeHeight;
+            if ($this->_userWidth && $this->_barcode->getType() != 'error') {
+                $width = $this->_userWidth;
+            }
+            if ($this->_userHeight && $this->_barcode->getType() != 'error') {
+                $height = $this->_userHeight;
+            }
+
+            $foreColor       = $this->_barcode->getForeColor();
+            $backgroundColor = $this->_barcode->getBackgroundColor();
+            $this->_resource = imagecreatetruecolor($width, $height);
+
+            $this->_imageBackgroundColor = imagecolorallocate(
+                $this->_resource,
+                ($backgroundColor & 0xFF0000) >> 16,
+                ($backgroundColor & 0x00FF00) >> 8,
+                $backgroundColor & 0x0000FF
+            );
+            $this->_imageForeColor = imagecolorallocate(
+                $this->_resource,
+                ($foreColor & 0xFF0000) >> 16,
+                ($foreColor & 0x00FF00) >> 8,
+                $foreColor & 0x0000FF
+            );
+            $white = imagecolorallocate($this->_resource, 255, 255, 255);
+            imagefilledrectangle($this->_resource, 0, 0, $width - 1, $height - 1, $white);
+        }
+        $this->_adjustPosition(imagesy($this->_resource), imagesx($this->_resource));
+        imagefilledrectangle(
+            $this->_resource, 
+            $this->_leftOffset, 
+            $this->_topOffset,
+            $this->_leftOffset + $barcodeWidth - 1,
+            $this->_topOffset + $barcodeHeight - 1,
+            $this->_imageBackgroundColor
+        );
+    }
+
+    /**
+     * Check barcode parameters
+     * 
+     * @return void
+     */
+    protected function _checkParams()
+    {
+        $this->_checkDimensions();
+    }
+
+    /**
+     * Check barcode dimensions
+     * 
+     * @return void
+     */
+    protected function _checkDimensions()
+    {
+        if ($this->_resource !== null) {
+            if (imagesy($this->_resource) < $this->_barcode->getHeight(true)) {
+                require_once 'Zend/Barcode/Renderer/Exception.php';
+                throw new Zend_Barcode_Renderer_Exception(
+                    'Barcode is define outside the image (height)'
+                );
+            }
+        } else {
+            if ($this->_userHeight) {
+                $height = $this->_barcode->getHeight(true);
+                if ($this->_userHeight < $height) {
+                    require_once 'Zend/Barcode/Renderer/Exception.php';
+                    throw new Zend_Barcode_Renderer_Exception(sprintf(
+                        "Barcode is define outside the image (calculated: '%d', provided: '%d')",
+                        $height,
+                        $this->_userHeight
+                    ));
+                }
+            }
+        }
+        if ($this->_resource !== null) {
+            if (imagesx($this->_resource) < $this->_barcode->getWidth(true)) {
+                require_once 'Zend/Barcode/Renderer/Exception.php';
+                throw new Zend_Barcode_Renderer_Exception(
+                    'Barcode is define outside the image (width)'
+                );
+            }
+        } else {
+            if ($this->_userWidth) {
+                $width = $this->_barcode->getWidth(true);
+                if ($this->_userWidth < $width) {
+                    require_once 'Zend/Barcode/Renderer/Exception.php';
+                    throw new Zend_Barcode_Renderer_Exception(sprintf(
+                        "Barcode is define outside the image (calculated: '%d', provided: '%d')",
+                        $width,
+                        $this->_userWidth
+                    ));
+                }
+            }
+        }
+    }
+
+    /**
+     * Draw and render the barcode with correct headers
+     *
+     * @return mixed
+     */
+    public function render()
+    {
+        $this->draw();
+        header("Content-Type: image/" . $this->_imageType);
+        $functionName = 'image' . $this->_imageType;
+        call_user_func($functionName, $this->_resource);
+        @imagedestroy($this->_resource);
+    }
+
+    /**
+     * Draw a polygon in the image resource
+     *
+     * @param array $points
+     * @param integer $color
+     * @param boolean $filled
+     */
+    protected function _drawPolygon($points, $color, $filled = true)
+    {
+        $newPoints = array(
+            $points[0][0] + $this->_leftOffset,
+            $points[0][1] + $this->_topOffset,
+            $points[1][0] + $this->_leftOffset,
+            $points[1][1] + $this->_topOffset,
+            $points[2][0] + $this->_leftOffset,
+            $points[2][1] + $this->_topOffset,
+            $points[3][0] + $this->_leftOffset,
+            $points[3][1] + $this->_topOffset,
+        );
+
+        $allocatedColor = imagecolorallocate(
+            $this->_resource, 
+            ($color & 0xFF0000) >> 16,
+            ($color & 0x00FF00) >> 8,
+            $color & 0x0000FF
+        );
+
+        if ($filled) {
+            imagefilledpolygon($this->_resource, $newPoints, 4, $allocatedColor);
+        } else {
+            imagepolygon($this->_resource, $newPoints, 4, $allocatedColor);
+        }
+    }
+
+    /**
+     * Draw a polygon in the image resource
+     *
+     * @param string $text
+     * @param float $size
+     * @param array $position
+     * @param string $font
+     * @param integer $color
+     * @param string $alignment
+     * @param float $orientation
+     */
+    protected function _drawText($text, $size, $position, $font, $color, $alignment = 'center', $orientation = 0)
+    {
+        $allocatedColor = imagecolorallocate(
+            $this->_resource, 
+            ($color & 0xFF0000) >> 16,
+            ($color & 0x00FF00) >> 8,
+            $color & 0x0000FF
+        );
+
+        if ($font == null) {
+            $font = 3;
+        }
+        $position[0] += $this->_leftOffset;
+        $position[1] += $this->_topOffset;
+
+        if (is_numeric($font)) {
+            if ($orientation) {
+                /**
+                 * imagestring() doesn't allow orientation, if orientation
+                 * needed: a TTF font is required.
+                 * Throwing an exception here, allow to use automaticRenderError
+                 * to informe user of the problem instead of simply not drawing
+                 * the text
+                 */
+                require_once 'Zend/Barcode/Renderer/Exception.php';
+                throw new Zend_Barcode_Renderer_Exception(
+                    'No orientation possible with GD internal font'
+                );
+            }
+            $fontWidth = imagefontwidth($font);
+            $positionY = $position[1] - imagefontheight($font);
+            switch ($alignment) {
+                case 'left':
+                    $positionX = $position[0];
+                    break;
+                case 'center':
+                    $positionX = $position[0] - ceil(($fontWidth * strlen($text)) / 2);
+                    break;
+                case 'right':
+                    $positionX = $position[0] - ($fontWidth * strlen($text));
+                    break;
+            }
+            imagestring($this->_resource, $font, $positionX, $positionY, $text, $color);
+        } else {
+            $box = imagettfbbox($size, 0, $font, $text);
+            switch ($alignment) {
+                case 'left':
+                    $width = 0;
+                    break;
+                case 'center':
+                    $width = ($box[2] - $box[0]) / 2;
+                    break;
+                case 'right':
+                    $width = ($box[2] - $box[0]);
+                    break;
+            }
+            imagettftext(
+                $this->_resource, 
+                $size, 
+                $orientation,
+                $position[0] - ($width * cos(pi() * $orientation / 180)),
+                $position[1] + ($width * sin(pi() * $orientation / 180)),
+                $allocatedColor,
+                $font, 
+                $text
+            );
+        }
+    }
+}

+ 242 - 0
library/Zend/Barcode/Renderer/Pdf.php

@@ -0,0 +1,242 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage Renderer
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/** @see Zend_Barcode_Renderer_RendererAbstract */
+require_once 'Zend/Barcode/Renderer/RendererAbstract.php';
+
+/** @see Zend_Pdf */
+require_once 'Zend/Pdf.php';
+
+/** @see Zend_Pdf_Page */
+require_once 'Zend/Pdf/Page.php';
+
+/** @see Zend_Pdf_Color_Rgb */
+require_once 'Zend/Pdf/Color/Rgb.php';
+
+/**
+ * Class for rendering the barcode in PDF resource
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Renderer_Pdf extends Zend_Barcode_Renderer_RendererAbstract
+{
+    /**
+     * PDF resource
+     * @var Zend_Pdf
+     */
+    protected $_resource = null;
+
+    /**
+     * Page number in PDF resource
+     * @var integer
+     */
+    protected $_page = 0;
+
+    /**
+     * Module size rendering
+     * @var float
+     */
+    protected $_moduleSize = 0.5;
+
+    /**
+     * Set an image resource to draw the barcode inside
+     * @param resource $value
+     * @return Zend_Barcode_Renderer
+     * @throw Zend_Barcode_Renderer_Exception
+     */
+    public function setResource($pdf, $page = 0)
+    {
+        if (!$pdf instanceof Zend_Pdf) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                'Invalid Zend_Pdf resource provided to setResource()'
+            );
+        }
+
+        $this->_resource = $pdf;
+        $this->_page     = intval($page);
+
+        if (!count($this->_resource->pages)) {
+            $this->_page = 0;
+            $this->_resource->pages[] = new Zend_Pdf_Page(
+                Zend_Pdf_Page::SIZE_A4
+            );
+        }
+        return $this;
+    }
+
+    /**
+     * Check renderer parameters
+     * 
+     * @return void
+     */
+    protected function _checkParams()
+    {
+    }
+
+    /**
+     * Draw the barcode in the PDF, send headers and the PDF
+     * @return mixed
+     */
+    public function render()
+    {
+        $this->draw();
+        header("Content-Type: application/pdf");
+        echo $this->_resource->render();
+    }
+
+    /**
+     * Initialize the PDF resource
+     * @return void
+     */
+    protected function _initRenderer()
+    {
+        if ($this->_resource === null) {
+            $this->_resource = new Zend_Pdf();
+            $this->_resource->pages[] = new Zend_Pdf_Page(
+                Zend_Pdf_Page::SIZE_A4
+            );
+        }
+
+        $pdfPage = $this->_resource->pages[$this->_page];
+        $this->_adjustPosition($pdfPage->getHeight(), $pdfPage->getWidth());
+    }
+
+    /**
+     * Draw a polygon in the rendering resource
+     * @param array $points
+     * @param integer $color
+     * @param boolean $filled
+     */
+    protected function _drawPolygon($points, $color, $filled = true)
+    {
+        $page = $this->_resource->pages[$this->_page];
+        foreach ($points as $point) {
+            $x[] = $point[0] * $this->_moduleSize + $this->_leftOffset;
+            $y[] = $page->getHeight() - $point[1] * $this->_moduleSize - $this->_topOffset;
+        }
+        if (count($y) == 4) {
+            if ($x[0] != $x[3] && $y[0] == $y[3]) {
+                $y[0] -= ($this->_moduleSize / 2);
+                $y[3] -= ($this->_moduleSize / 2);
+            }
+            if ($x[1] != $x[2] && $y[1] == $y[2]) {
+                $y[1] += ($this->_moduleSize / 2);
+                $y[2] += ($this->_moduleSize / 2);
+            }
+        }
+
+        $color = new Zend_Pdf_Color_RGB(
+            ($color & 0xFF0000) >> 16,
+            ($color & 0x00FF00) >> 8,
+            $color & 0x0000FF
+        );
+
+        $page->setLineColor($color);
+        $page->setFillColor($color);
+        $page->setLineWidth($this->_moduleSize);
+
+        $fillType = ($filled)
+                  ? Zend_Pdf_Page::SHAPE_DRAW_FILL_AND_STROKE
+                  : Zend_Pdf_Page::SHAPE_DRAW_STROKE;
+
+        $page->drawPolygon($x, $y, $fillType);
+    }
+
+    /**
+     * Draw a polygon in the rendering resource
+     * @param string $text
+     * @param float $size
+     * @param array $position
+     * @param string $font
+     * @param integer $color
+     * @param string $alignment
+     * @param float $orientation
+     */
+    protected function _drawText(
+        $text, 
+        $size, 
+        $position, 
+        $font, 
+        $color, 
+        $alignment = 'center', 
+        $orientation = 0
+    ) {
+        $page  = $this->_resource->pages[$this->_page];
+        $color = new Zend_Pdf_Color_RGB(
+            ($color & 0xFF0000) >> 16,
+            ($color & 0x00FF00) >> 8,
+            $color & 0x0000FF
+        );
+
+        $page->setLineColor($color);
+        $page->setFillColor($color);
+        $page->setFont(Zend_Pdf_Font::fontWithPath($font), $size * $this->_moduleSize);
+
+        $width = $this->widthForStringUsingFontSize(
+            $text,
+            Zend_Pdf_Font::fontWithPath($font),
+            $size * $this->_moduleSize
+        );
+
+        $left = $position[0] * $this->_moduleSize + $this->_leftOffset;
+        $top  = $page->getHeight() - $position[1] * $this->_moduleSize - $this->_topOffset;
+
+        switch ($alignment) {
+            case 'center':
+                $left -= ($width / 2) * cos(pi() * $orientation / 180);
+                $top  -= ($width / 2) * sin(pi() * $orientation / 180);
+                break;
+            case 'right':
+                $left -= $width;
+                break;
+        }
+
+        $page->rotate($left, $top, pi() * $orientation / 180);
+        $page->drawText($text, $left, $top);
+        $page->rotate($left, $top, - pi() * $orientation / 180);
+    }
+
+    /**
+     * Calculate the width of a string:
+     * in case of using alignment parameter in drawText
+     * @param string $text
+     * @param Zend_Pdf_Font $font
+     * @param float $fontSize
+     * @return float
+     */
+    public function widthForStringUsingFontSize($text, $font, $fontSize)
+    {
+        $drawingString = iconv('UTF-8', 'UTF-16BE//IGNORE', $text);
+        $characters    = array();
+        for ($i = 0; $i < strlen($drawingString); $i ++) {
+            $characters[] = (ord($drawingString[$i ++]) << 8) | ord($drawingString[$i]);
+        }
+        $glyphs = $font->glyphNumbersForCharacters($characters);
+        $widths = $font->widthsForGlyphs($glyphs);
+        $stringWidth = (array_sum($widths) / $font->getUnitsPerEm()) * $fontSize;
+        return $stringWidth;
+    }
+}

+ 548 - 0
library/Zend/Barcode/Renderer/RendererAbstract.php

@@ -0,0 +1,548 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage Renderer
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Class for rendering the barcode
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+abstract class Zend_Barcode_Renderer_RendererAbstract
+{
+    /**
+     * Namespace of the renderer for autoloading
+     * @var string
+     */
+    protected $_rendererNamespace = 'Zend_Barcode_Renderer';
+
+    /**
+     * Renderer type
+     * @var string
+     */
+    protected $_type = null;
+
+    /**
+     * Activate/Deactivate the automatic rendering of exception
+     * @var boolean
+     */
+    protected $_automaticRenderError = false;
+
+    /**
+     * Offset of the barcode from the top of the rendering resource
+     * @var integer
+     */
+    protected $_topOffset = 0;
+
+    /**
+     * Offset of the barcode from the left of the rendering resource
+     * @var integer
+     */
+    protected $_leftOffset = 0;
+
+    /**
+     * Horizontal position of the barcode in the rendering resource
+     * @var integer
+     */
+    protected $_horizontalPosition = 'left';
+
+    /**
+     * Vertical position of the barcode in the rendering resource
+     * @var integer
+     */
+    protected $_verticalPosition = 'top';
+
+    /**
+     * Module size rendering
+     * @var float
+     */
+    protected $_moduleSize = 1;
+
+    /**
+     * Barcode object
+     * @var Zend_Barcode_Object
+     */
+    protected $_barcode;
+
+    /**
+     * Drawing resource
+     */
+    protected $_resource;
+
+    /**
+     * Constructor
+     * @param array|Zend_Config $options
+     * @return void
+     */
+    public function __construct($options = null)
+    {
+        if ($options instanceof Zend_Config) {
+            $options = $options->toArray();
+        }
+        if (is_array($options)) {
+            $this->setOptions($options);
+        }
+        $this->_type = strtolower(substr(
+            get_class($this),
+            strlen($this->_rendererNamespace) + 1
+        ));
+    }
+
+    /**
+     * Set renderer state from options array
+     * @param  array $options
+     * @return Zend_Renderer_Object
+     */
+    public function setOptions($options)
+    {
+        foreach ($options as $key => $value) {
+            $method = 'set' . $key;
+            if (method_exists($this, $method)) {
+                $this->$method($value);
+            }
+        }
+        return $this;
+    }
+
+    /**
+     * Set renderer state from config object
+     * @param Zend_Config $config
+     * @return Zend_Renderer_Object
+     */
+    public function setConfig(Zend_Config $config)
+    {
+        return $this->setOptions($config->toArray());
+    }
+
+    /**
+     * Set renderer namespace for autoloading
+     *
+     * @param string $namespace
+     * @return Zend_Renderer_Object
+     */
+    public function setRendererNamespace($namespace)
+    {
+        $this->_rendererNamespace = $namespace;
+        return $this;
+    }
+
+    /**
+     * Retrieve renderer namespace
+     *
+     * @return string
+     */
+    public function getRendererNamespace()
+    {
+        return $this->_rendererNamespace;
+    }
+
+    /**
+     * Retrieve renderer type
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->_type;
+    }
+
+    /**
+     * Manually adjust top position
+     * @param integer $value
+     * @return Zend_Barcode_Renderer
+     * @throw Zend_Barcode_Renderer_Exception
+     */
+    public function setTopOffset($value)
+    {
+        if (!is_numeric($value) || intval($value) < 0) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                'Vertical position must be greater than or equals 0'
+            );
+        }
+        $this->_topOffset = intval($value);
+        return $this;
+    }
+
+    /**
+     * Retrieve vertical adjustment
+     * @return integer
+     */
+    public function getTopOffset()
+    {
+        return $this->_topOffset;
+    }
+
+    /**
+     * Manually adjust left position
+     * @param integer $value
+     * @return Zend_Barcode_Renderer
+     * @throw Zend_Barcode_Renderer_Exception
+     */
+    public function setLeftOffset($value)
+    {
+        if (!is_numeric($value) || intval($value) < 0) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                'Horizontal position must be greater than or equals 0'
+            );
+        }
+        $this->_leftOffset = intval($value);
+        return $this;
+    }
+
+    /**
+     * Retrieve vertical adjustment
+     * @return integer
+     */
+    public function getLeftOffset()
+    {
+        return $this->_leftOffset;
+    }
+
+    /**
+     * Activate/Deactivate the automatic rendering of exception
+     * @param boolean $value
+     */
+    public function setAutomaticRenderError($value)
+    {
+        $this->_automaticRenderError = (bool) $value;
+        return $this;
+    }
+
+    /**
+     * Horizontal position of the barcode in the rendering resource
+     * @param string $value
+     * @return Zend_Barcode_Renderer
+     * @throw Zend_Barcode_Renderer_Exception
+     */
+    public function setHorizontalPosition($value)
+    {
+        if (!in_array($value, array('left' , 'center' , 'right'))) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                "Invalid barcode position provided must be 'left', 'center' or 'right'"
+            );
+        }
+        $this->_horizontalPosition = $value;
+        return $this;
+    }
+
+    /**
+     * Horizontal position of the barcode in the rendering resource
+     * @return string
+     */
+    public function getHorizontalPosition()
+    {
+        return $this->_horizontalPosition;
+    }
+
+    /**
+     * Vertical position of the barcode in the rendering resource
+     * @param string $value
+     * @return Zend_Barcode_Renderer
+     * @throw Zend_Barcode_Renderer_Exception
+     */
+    public function setVerticalPosition($value)
+    {
+        if (!in_array($value, array('top' , 'middle' , 'bottom'))) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                "Invalid barcode position provided must be 'top', 'middle' or 'bottom'"
+            );
+        }
+        $this->_verticalPosition = $value;
+        return $this;
+    }
+
+    /**
+     * Vertical position of the barcode in the rendering resource
+     * @return string
+     */
+    public function getVerticalPosition()
+    {
+        return $this->_verticalPosition;
+    }
+
+    /**
+     * Set the size of a module
+     * @param float $value
+     * @return Zend_Barcode_Renderer
+     * @throw Zend_Barcode_Renderer_Exception
+     */
+    public function setModuleSize($value)
+    {
+        if (!is_numeric($value) || floatval($value) <= 0) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                'Float size must be greater than 0'
+            );
+        }
+        $this->_moduleSize = floatval($value);
+        return $this;
+    }
+
+
+    /**
+     * Set the size of a module
+     * @return float
+     */
+    public function getModuleSize()
+    {
+        return $this->_moduleSize;
+    }
+
+    /**
+     * Retrieve the automatic rendering of exception
+     * @return boolean
+     */
+    public function getAutomaticRenderError()
+    {
+        return $this->_automaticRenderError;
+    }
+
+    /**
+     * Set the barcode object
+     * @param Zend_Barcode_Object $barcode
+     * @return Zend_Barcode_Renderer
+     */
+    public function setBarcode($barcode)
+    {
+        if (!$barcode instanceof Zend_Barcode_Object_ObjectAbstract) {
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                'Invalid barcode object provided to setBarcode()'
+            );
+        }
+        $this->_barcode = $barcode;
+        return $this;
+    }
+
+    /**
+     * Retrieve the barcode object
+     * @return Zend_Barcode_Object
+     */
+    public function getBarcode()
+    {
+        return $this->_barcode;
+    }
+
+    /**
+     * Checking of parameters after all settings
+     * @return boolean
+     */
+    public function checkParams()
+    {
+        $this->_checkBarcodeObject();
+        $this->_checkParams();
+        return true;
+    }
+
+    /**
+     * Check if a barcode object is correctly provided
+     * @return void
+     * @throw Zend_Barcode_Renderer_Exception
+     */
+    protected function _checkBarcodeObject()
+    {
+        if ($this->_barcode === null) {
+            /**
+             * @see Zend_Barcode_Renderer_Exception
+             */
+            require_once 'Zend/Barcode/Renderer/Exception.php';
+            throw new Zend_Barcode_Renderer_Exception(
+                'No barcode object provided'
+            );
+        }
+    }
+
+    /**
+     * Calculate the left and top offset of the barcode in the
+     * rendering support
+     *
+     * @param float $supportHeight
+     * @param float $supportWidth
+     * @return void
+     */
+    protected function _adjustPosition($supportHeight, $supportWidth)
+    {
+        $barcodeHeight = $this->_barcode->getHeight(true) * $this->_moduleSize;
+        if ($barcodeHeight != $supportHeight) {
+            switch ($this->_verticalPosition) {
+                case 'top':
+                    $this->_topOffset = 0;
+                    break;
+                case 'middle':
+                    $this->_topOffset = floor(
+                            ($supportHeight - $barcodeHeight) / 2);
+                    break;
+                case 'bottom':
+                    $this->_topOffset = $supportHeight - $barcodeHeight;
+                    break;
+                default:
+                    require_once 'Zend/Barcode/Renderer/Exception.php';
+                    throw new Zend_Barcode_Renderer_Exception(
+                        'Invalid vertical position provided; must be one of "top", "middle", or "bottom"'
+                    );
+            }
+        }
+        $barcodeWidth = $this->_barcode->getWidth(true) * $this->_moduleSize;
+        if ($barcodeWidth != $supportWidth) {
+            switch ($this->_horizontalPosition) {
+                case 'left':
+                    $this->_leftOffset = 0;
+                    break;
+                case 'center':
+                    $this->_leftOffset = floor(
+                            ($supportWidth - $barcodeWidth) / 2);
+                    break;
+                case 'right':
+                    $this->_leftOffset = $supportWidth - $barcodeWidth;
+                    break;
+                default:
+                    require_once 'Zend/Barcode/Renderer/Exception.php';
+                    throw new Zend_Barcode_Renderer_Exception(
+                        'Invalid horizontal position provided; must be one of "left", "center", or "right"'
+                    );
+            }
+        }
+    }
+
+    /**
+     * Draw the barcode in the rendering resource
+     * @return mixed
+     */
+    public function draw()
+    {
+        try {
+            $this->checkParams();
+            $this->_initRenderer();
+            $this->_drawInstructionList();
+        } catch (Zend_Exception $e) {
+            $renderable = false;
+            if ($e instanceof Zend_Barcode_Exception) {
+                $renderable = $e->isRenderable();
+            }
+            if ($this->_automaticRenderError && $renderable) {
+                $barcode = Zend_Barcode::makeBarcode(
+                    'error',
+                    array('text' => $e->getMessage())
+                );
+                $this->setBarcode($barcode);
+                $this->_resource = null;
+                $this->_initRenderer();
+                $this->_drawInstructionList();
+            } else {
+                if ($e instanceof Zend_Barcode_Exception) {
+                    $e->setIsRenderable(false);
+                }
+                throw $e;
+            }
+        }
+        return $this->_resource;
+    }
+
+    /**
+     * Sub process to draw the barcode instructions
+     * Needed by the automatic error rendering
+     */
+    private function _drawInstructionList()
+    {
+        $instructionList = $this->_barcode->draw();
+        foreach ($instructionList as $instruction) {
+            switch ($instruction['type']) {
+                case 'polygon':
+                    $this->_drawPolygon(
+                        $instruction['points'],
+                        $instruction['color'],
+                        $instruction['filled']
+                    );
+                    break;
+                case 'text': //$text, $size, $position, $font, $color, $alignment = 'center', $orientation = 0)
+                    $this->_drawText(
+                        $instruction['text'],
+                        $instruction['size'],
+                        $instruction['position'],
+                        $instruction['font'],
+                        $instruction['color'],
+                        $instruction['alignment'],
+                        $instruction['orientation']
+                    );
+                    break;
+                default:
+                    /**
+                     * @see Zend_Barcode_Renderer_Exception
+                     */
+                    require_once 'Zend/Barcode/Renderer/Exception.php';
+                    throw new Zend_Barcode_Renderer_Exception(
+                        'Unkown drawing command'
+                    );
+            }
+        }
+    }
+
+    /**
+     * Checking of parameters after all settings
+     * @return void
+     */
+    abstract protected function _checkParams();
+
+    /**
+     * Render the resource by sending headers and drawed resource
+     * @return mixed
+     */
+    abstract public function render();
+
+    /**
+     * Initialize the rendering resource
+     * @return void
+     */
+    abstract protected function _initRenderer();
+
+    /**
+     * Draw a polygon in the rendering resource
+     * @param array $points
+     * @param integer $color
+     * @param boolean $filled
+     */
+    abstract protected function _drawPolygon($points, $color, $filled = true);
+
+    /**
+     * Draw a polygon in the rendering resource
+     * @param string $text
+     * @param float $size
+     * @param array $position
+     * @param string $font
+     * @param integer $color
+     * @param string $alignment
+     * @param float $orientation
+     */
+    abstract protected function _drawText(
+        $text, 
+        $size, 
+        $position, 
+        $font, 
+        $color, 
+        $alignment = 'center', 
+        $orientation = 0
+    );
+}

+ 2 - 0
tests/Zend/AllTests.php

@@ -32,6 +32,7 @@ require_once 'Zend/Amf/AllTests.php';
 require_once 'Zend/Application/AllTests.php';
 require_once 'Zend/AuthTest.php';
 require_once 'Zend/Auth/AllTests.php';
+require_once 'Zend/Barcode/AllTests.php';
 require_once 'Zend/Cache/AllTests.php';
 require_once 'Zend/Captcha/AllTests.php';
 require_once 'Zend/CodeGenerator/Php/AllTests.php';
@@ -164,6 +165,7 @@ class Zend_AllTests
         $suite->addTest(Zend_Application_AllTests::suite());
         $suite->addTestSuite('Zend_AuthTest');
         $suite->addTest(Zend_Auth_AllTests::suite());
+        $suite->addTest(Zend_Barcode_AllTests::suite());
         $suite->addTest(Zend_Cache_AllTests::suite());
         $suite->addTest(Zend_Captcha_AllTests::suite());
         $suite->addTest(Zend_CodeGenerator_Php_AllTests::suite());

+ 86 - 0
tests/Zend/Barcode/AllTests.php

@@ -0,0 +1,86 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+
+if (!defined('PHPUnit_MAIN_METHOD')) {
+    define('PHPUnit_MAIN_METHOD', 'Zend_Feed_AllTests::main');
+}
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../TestHelper.php';
+
+/**
+ * Exclude from code coverage report
+ */
+PHPUnit_Util_Filter::addFileToFilter(__FILE__);
+
+
+require_once 'Zend/Barcode/FactoryTest.php';
+
+require_once 'Zend/Barcode/Object/Code39Test.php';
+require_once 'Zend/Barcode/Object/Code25Test.php';
+require_once 'Zend/Barcode/Object/Int25Test.php';
+require_once 'Zend/Barcode/Object/Itf14Test.php';
+require_once 'Zend/Barcode/Object/ErrorTest.php';
+
+require_once 'Zend/Barcode/Renderer/ImageTest.php';
+require_once 'Zend/Barcode/Renderer/PdfTest.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @group      Zend_Feed
+ */
+class Zend_Barcode_AllTests
+{
+    public static function main()
+    {
+        PHPUnit_TextUI_TestRunner::run(self::suite());
+    }
+
+    public static function suite()
+    {
+        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Barcode');
+
+        $suite->addTestSuite('Zend_Barcode_FactoryTest');
+
+        $suite->addTestSuite('Zend_Barcode_Object_Code39Test');
+        $suite->addTestSuite('Zend_Barcode_Object_Code25Test');
+        $suite->addTestSuite('Zend_Barcode_Object_Int25Test');
+        $suite->addTestSuite('Zend_Barcode_Object_Itf14Test');
+        $suite->addTestSuite('Zend_Barcode_Object_ErrorTest');
+
+        $suite->addTestSuite('Zend_Barcode_Renderer_ImageTest');
+        $suite->addTestSuite('Zend_Barcode_Renderer_PdfTest');
+
+        return $suite;
+    }
+}
+
+if (PHPUnit_MAIN_METHOD == 'Zend_Barcode_AllTests::main') {
+    Zend_Barcode_AllTests::main();
+}

+ 337 - 0
tests/Zend/Barcode/FactoryTest.php

@@ -0,0 +1,337 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../TestHelper.php';
+
+/**
+ * @see Zend_Barcode
+ */
+require_once 'Zend/Barcode.php';
+
+/**
+ * @see Zend_Config
+ */
+require_once 'Zend/Config.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_FactoryTest extends PHPUnit_Framework_TestCase
+{
+
+    public function testMinimalFactory()
+    {
+        $renderer = Zend_Barcode::factory('code39');
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertTrue($renderer->getBarcode() instanceof Zend_Barcode_Object_Code39);
+    }
+
+    public function testMinimalFactoryWithRenderer()
+    {
+        $renderer = Zend_Barcode::factory('code39', 'pdf');
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Pdf);
+        $this->assertTrue($renderer->getBarcode() instanceof Zend_Barcode_Object_Code39);
+    }
+
+    public function testFactoryWithOptions()
+    {
+        $options = array('barHeight' => 123);
+        $renderer = Zend_Barcode::factory('code39', 'image', $options);
+        $this->assertEquals(123, $renderer->getBarcode()->getBarHeight());
+    }
+
+    public function testFactoryWithAutomaticExceptionRendering()
+    {
+        $options = array('barHeight' => - 1);
+        $renderer = Zend_Barcode::factory('code39', 'image', $options);
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertTrue($renderer->getBarcode() instanceof Zend_Barcode_Object_Error);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testFactoryWithoutAutomaticObjectExceptionRendering()
+    {
+        $options = array('barHeight' => - 1);
+        $renderer = Zend_Barcode::factory('code39', 'image', $options, array(), false);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testFactoryWithoutAutomaticRendererExceptionRendering()
+    {
+        $options = array('imageType' => 'my');
+        $renderer = Zend_Barcode::factory('code39', 'image', array(), $options, false);
+        $this->markTestIncomplete('Need to throw a configuration exception in renderer');
+    }
+
+    public function testFactoryWithZendConfig()
+    {
+        $config = new Zend_Config(
+                array('barcode' => 'code39' ,
+                        'renderer' => 'image'));
+        $renderer = Zend_Barcode::factory($config);
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertTrue($renderer->getBarcode() instanceof Zend_Barcode_Object_Code39);
+
+    }
+
+    public function testFactoryWithZendConfigAndObjectOptions()
+    {
+        $config = new Zend_Config(
+                array('barcode' => 'code25' ,
+                        'barcodeParams' => array(
+                                'barHeight' => 123)));
+        $renderer = Zend_Barcode::factory($config);
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertTrue($renderer->getBarcode() instanceof Zend_Barcode_Object_Code25);
+        $this->assertEquals(123, $renderer->getBarcode()->getBarHeight());
+    }
+
+    public function testFactoryWithZendConfigAndRendererOptions()
+    {
+        $config = new Zend_Config(
+                array('barcode' => 'code25' ,
+                        'rendererParams' => array(
+                                'imageType' => 'gif')));
+        $renderer = Zend_Barcode::factory($config);
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertTrue($renderer->getBarcode() instanceof Zend_Barcode_Object_Code25);
+        $this->assertSame('gif', $renderer->getImageType());
+    }
+
+    public function testFactoryWithoutBarcodeWithAutomaticExceptionRender()
+    {
+        $renderer = Zend_Barcode::factory(null);
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertTrue($renderer->getBarcode() instanceof Zend_Barcode_Object_Error);
+    }
+
+    public function testFactoryWithoutBarcodeWithAutomaticExceptionRenderWithZendConfig()
+    {
+        $config = new Zend_Config(array('barcode' => null));
+        $renderer = Zend_Barcode::factory($config);
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertTrue($renderer->getBarcode() instanceof Zend_Barcode_Object_Error);
+    }
+
+    public function testFactoryWithExistingBarcodeObject()
+    {
+        $barcode = new Zend_Barcode_Object_Code25();
+        $renderer = Zend_Barcode::factory($barcode);
+        $this->assertSame($barcode, $renderer->getBarcode());
+    }
+
+    public function testBarcodeObjectFactoryWithExistingBarcodeObject()
+    {
+        $barcode = new Zend_Barcode_Object_Code25();
+        $generatedBarcode = Zend_Barcode::makeBarcode($barcode);
+        $this->assertSame($barcode, $generatedBarcode);
+    }
+
+    public function testBarcodeObjectFactoryWithBarcodeAsString()
+    {
+        $barcode = Zend_Barcode::makeBarcode('code25');
+        $this->assertTrue($barcode instanceof Zend_Barcode_Object_Code25);
+    }
+
+    public function testBarcodeObjectFactoryWithBarcodeAsStringAndConfigAsArray()
+    {
+        $barcode = Zend_Barcode::makeBarcode('code25', array('barHeight' => 123));
+        $this->assertTrue($barcode instanceof Zend_Barcode_Object_Code25);
+        $this->assertSame(123, $barcode->getBarHeight());
+    }
+
+    public function testBarcodeObjectFactoryWithBarcodeAsStringAndConfigAsZendConfig()
+    {
+        $config = new Zend_Config(array('barHeight' => 123));
+        $barcode = Zend_Barcode::makeBarcode('code25', $config);
+        $this->assertTrue($barcode instanceof Zend_Barcode_Object_Code25);
+        $this->assertSame(123, $barcode->getBarHeight());
+    }
+
+    public function testBarcodeObjectFactoryWithBarcodeAsZendConfig()
+    {
+        $config = new Zend_Config(
+                array('barcode' => 'code25' ,
+                        'barcodeParams' => array(
+                                'barHeight' => 123)));
+        $barcode = Zend_Barcode::makeBarcode($config);
+        $this->assertTrue($barcode instanceof Zend_Barcode_Object_Code25);
+        $this->assertSame(123, $barcode->getBarHeight());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Exception
+     */
+    public function testBarcodeObjectFactoryWithBarcodeAsZendConfigButNoBarcodeParameter()
+    {
+        $config = new Zend_Config(
+                array(
+                        'barcodeParams' => array(
+                                'barHeight' => 123)));
+        $barcode = Zend_Barcode::makeBarcode($config);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Exception
+     */
+    public function testBarcodeObjectFactoryWithBarcodeAsZendConfigAndBadBarcodeParameters()
+    {
+        $barcode = Zend_Barcode::makeBarcode('code25', null);
+    }
+
+    public function testBarcodeObjectFactoryWithNamespace()
+    {
+        require_once dirname(__FILE__) . '/Object/_files/BarcodeNamespace.php';
+        $barcode = Zend_Barcode::makeBarcode('error',
+                array(
+                        'barcodeNamespace' => 'My_Namespace'));
+        $this->assertTrue($barcode instanceof My_Namespace_Error);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Exception
+     */
+    public function testBarcodeObjectFactoryWithNamespaceButWithoutExtendingObjectAbstract()
+    {
+        require_once dirname(__FILE__) . '/Object/_files/BarcodeNamespaceWithoutExtendingObjectAbstract.php';
+        $barcode = Zend_Barcode::makeBarcode('error',
+                array(
+                        'barcodeNamespace' => 'My_Namespace_Other'));
+    }
+
+    public function testBarcodeRendererFactoryWithExistingBarcodeRenderer()
+    {
+        $renderer = new Zend_Barcode_Renderer_Image();
+        $generatedBarcode = Zend_Barcode::makeRenderer($renderer);
+        $this->assertSame($renderer, $generatedBarcode);
+    }
+
+    public function testBarcodeRendererFactoryWithBarcodeAsString()
+    {
+        $renderer = Zend_Barcode::makeRenderer('image');
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+    }
+
+    public function testBarcodeRendererFactoryWithBarcodeAsStringAndConfigAsArray()
+    {
+        $renderer = Zend_Barcode::makeRenderer('image', array('imageType' => 'gif'));
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertSame('gif', $renderer->getImageType());
+    }
+
+    public function testBarcodeRendererFactoryWithBarcodeAsStringAndConfigAsZendConfig()
+    {
+        $config = new Zend_Config(array('imageType' => 'gif'));
+        $renderer = Zend_Barcode::makeRenderer('image', $config);
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertSame('gif', $renderer->getimageType());
+    }
+
+    public function testBarcodeRendererFactoryWithBarcodeAsZendConfig()
+    {
+        $config = new Zend_Config(
+                array('renderer' => 'image' ,
+                        'rendererParams' => array(
+                                'imageType' => 'gif')));
+        $renderer = Zend_Barcode::makeRenderer($config);
+        $this->assertTrue($renderer instanceof Zend_Barcode_Renderer_Image);
+        $this->assertSame('gif', $renderer->getimageType());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Exception
+     */
+    public function testBarcodeRendererFactoryWithBarcodeAsZendConfigButNoBarcodeParameter()
+    {
+        $config = new Zend_Config(
+                array(
+                        'rendererParams' => array(
+                                'imageType' => 'gif')));
+        $renderer = Zend_Barcode::makeRenderer($config);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Exception
+     */
+    public function testBarcodeRendererFactoryWithBarcodeAsZendConfigAndBadBarcodeParameters()
+    {
+        $renderer = Zend_Barcode::makeRenderer('image', null);
+    }
+
+    public function testBarcodeRendererFactoryWithNamespace()
+    {
+        require_once dirname(__FILE__) . '/Renderer/_files/RendererNamespace.php';
+        $renderer = Zend_Barcode::makeRenderer('image',
+                array(
+                        'rendererNamespace' => 'My_Namespace'));
+        $this->assertTrue($renderer instanceof My_Namespace_Image);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Exception
+     */
+    public function testBarcodeFactoryWithNamespaceButWithoutExtendingRendererAbstract()
+    {
+        require_once dirname(__FILE__) . '/Renderer/_files/RendererNamespaceWithoutExtendingRendererAbstract.php';
+        $renderer = Zend_Barcode::makeRenderer('image',
+                array(
+                        'rendererNamespace' => 'My_Namespace_Other'));
+    }
+
+    public function testProxyBarcodeRendererDrawAsImage()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $resource = Zend_Barcode::draw('code25', 'image');
+        $this->assertTrue(gettype($resource) == 'resource', 'Image must be a resource');
+        $this->assertTrue(get_resource_type($resource) == 'gd', 'Image must be a GD resource');
+    }
+
+    public function testProxyBarcodeRendererDrawAsPdf()
+    {
+        Zend_Barcode::setBarcodeFont(dirname(__FILE__) . '/Object/_fonts/Vera.ttf');
+        $resource = Zend_Barcode::draw('code25', 'pdf');
+        $this->assertTrue($resource instanceof Zend_Pdf);
+        Zend_Barcode::setBarcodeFont('');
+    }
+
+    public function testProxyBarcodeObjectFont()
+    {
+        Zend_Barcode::setBarcodeFont('my_font.ttf');
+        $barcode = new Zend_Barcode_Object_Code25();
+        $this->assertSame('my_font.ttf', $barcode->getFont());
+        Zend_Barcode::setBarcodeFont('');
+    }
+}

+ 201 - 0
tests/Zend/Barcode/Object/Code25Test.php

@@ -0,0 +1,201 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+require_once dirname(__FILE__) . '/TestCommon.php';
+
+require_once 'Zend/Barcode/Object/Code25.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Code25Test extends Zend_Barcode_Object_TestCommon
+{
+
+    protected function _getBarcodeObject($options = null)
+    {
+        return new Zend_Barcode_Object_Code25($options);
+    }
+
+    public function testType()
+    {
+        $this->assertSame('code25', $this->_object->getType());
+    }
+
+    public function testChecksum()
+    {
+        $this->assertSame(5, $this->_object->getChecksum('0123456789'));
+    }
+
+    public function testSetText()
+    {
+        $this->_object->setText('0123456789');
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('0123456789', $this->_object->getText());
+        $this->assertSame('0123456789', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithSpaces()
+    {
+        $this->_object->setText(' 0123456789 ');
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('0123456789', $this->_object->getText());
+        $this->assertSame('0123456789', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithChecksum()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setWithChecksum(true);
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('01234567895', $this->_object->getText());
+        $this->assertSame('0123456789', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithChecksumDisplayed()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setWithChecksum(true);
+        $this->_object->setWithChecksumInText(true);
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('01234567895', $this->_object->getText());
+        $this->assertSame('01234567895', $this->_object->getTextToDisplay());
+    }
+
+    public function testBadTextAlwaysAllowed()
+    {
+        $this->_object->setText('a');
+        $this->assertSame('a', $this->_object->getText());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testBadTextDetectedIfChecksumWished()
+    {
+        $this->_object->setText('a');
+        $this->_object->setWithChecksum(true);
+        $this->_object->getText();
+    }
+
+    public function testCheckGoodParams()
+    {
+        $this->_object->setText('0123456789');
+        $this->assertTrue($this->_object->checkParams());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testCheckParamsWithLowRatio()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setBarThinWidth(21);
+        $this->_object->setBarThickWidth(40);
+        $this->_object->checkParams();
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testCheckParamsWithHighRatio()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setBarThinWidth(20);
+        $this->_object->setBarThickWidth(61);
+        $this->_object->checkParams();
+    }
+
+    public function testGetKnownWidthWithoutOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->assertEquals(180, $this->_object->getWidth());
+    }
+
+    public function testCompleteGeneration()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile('Code25_0123456789_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithStretchText()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setStretchText(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code25_0123456789_stretchtext_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBorder()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setWithBorder(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code25_0123456789_border_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code25_0123456789_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithStretchTextWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setStretchText(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code25_0123456789_stretchtext_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBorderWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setWithBorder(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code25_0123456789_border_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+}

+ 203 - 0
tests/Zend/Barcode/Object/Code39Test.php

@@ -0,0 +1,203 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+require_once dirname(__FILE__) . '/TestCommon.php';
+
+require_once 'Zend/Barcode/Object/Code39.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Code39Test extends Zend_Barcode_Object_TestCommon
+{
+
+    protected function _getBarcodeObject($options = null)
+    {
+        return new Zend_Barcode_Object_Code39($options);
+    }
+
+    public function testType()
+    {
+        $this->assertSame('code39', $this->_object->getType());
+    }
+
+    public function testChecksum()
+    {
+        $this->assertSame(2, $this->_object->getChecksum('0123456789'));
+        $this->assertSame('W', $this->_object->getChecksum('CODE39'));
+        $this->assertSame('J', $this->_object->getChecksum('FRAMEWORK-ZEND-COM'));
+    }
+
+    public function testSetText()
+    {
+        $this->_object->setText('0123456789');
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('*0123456789*', $this->_object->getText());
+        $this->assertSame('*0123456789*', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithSpaces()
+    {
+        $this->_object->setText(' 0123456789 ');
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('*0123456789*', $this->_object->getText());
+        $this->assertSame('*0123456789*', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithChecksum()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setWithChecksum(true);
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('*01234567892*', $this->_object->getText());
+        $this->assertSame('*0123456789*', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithChecksumDisplayed()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setWithChecksum(true);
+        $this->_object->setWithChecksumInText(true);
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('*01234567892*', $this->_object->getText());
+        $this->assertSame('*01234567892*', $this->_object->getTextToDisplay());
+    }
+
+    public function testBadTextAlwaysAllowed()
+    {
+        $this->_object->setText('&');
+        $this->assertSame('&', $this->_object->getRawText());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testBadTextDetectedIfChecksumWished()
+    {
+        $this->_object->setText('&');
+        $this->_object->setWithChecksum(true);
+        $this->_object->getText();
+    }
+
+    public function testCheckGoodParams()
+    {
+        $this->_object->setText('0123456789');
+        $this->assertTrue($this->_object->checkParams());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testCheckParamsWithLowRatio()
+    {
+        $this->_object->setText('TEST');
+        $this->_object->setBarThinWidth(21);
+        $this->_object->setBarThickWidth(40);
+        $this->_object->checkParams();
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testCheckParamsWithHighRatio()
+    {
+        $this->_object->setText('TEST');
+        $this->_object->setBarThinWidth(20);
+        $this->_object->setBarThickWidth(61);
+        $this->_object->checkParams();
+    }
+
+    public function testGetKnownWidthWithoutOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->assertEquals(211, $this->_object->getWidth());
+    }
+
+    public function testCompleteGeneration()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile('Code39_0123456789_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithStretchText()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setStretchText(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code39_0123456789_stretchtext_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBorder()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setWithBorder(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code39_0123456789_border_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code39_0123456789_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithStretchTextWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setStretchText(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code39_0123456789_stretchtext_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBorderWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setWithBorder(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Code39_0123456789_border_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+}

+ 83 - 0
tests/Zend/Barcode/Object/ErrorTest.php

@@ -0,0 +1,83 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+require_once dirname(__FILE__) . '/TestCommon.php';
+
+require_once 'Zend/Barcode/Object/Error.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_ErrorTest extends Zend_Barcode_Object_TestCommon
+{
+
+    protected function _getBarcodeObject($options = null)
+    {
+        return new Zend_Barcode_Object_Error($options);
+    }
+
+    public function testType()
+    {
+        $this->assertSame('error', $this->_object->getType());
+    }
+
+    public function testSetText()
+    {
+        $this->_object->setText('This is an error text');
+        $this->assertSame('This is an error text', $this->_object->getRawText());
+        $this->assertSame('This is an error text', $this->_object->getText());
+        $this->assertSame('This is an error text', $this->_object->getTextToDisplay());
+    }
+
+    public function testCheckGoodParams()
+    {
+        $this->_object->setText('This is an error text');
+        $this->assertTrue($this->_object->checkParams());
+    }
+
+    public function testGetDefaultHeight()
+    {
+        $this->assertEquals(40, $this->_object->getHeight());
+    }
+
+    public function testGetDefaultWidth()
+    {
+        $this->assertEquals(400, $this->_object->getWidth());
+    }
+
+    public function testCompleteGeneration()
+    {
+        $this->_object->setText('This is an error text');
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile('Error_errortext_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+}

+ 257 - 0
tests/Zend/Barcode/Object/Int25Test.php

@@ -0,0 +1,257 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+require_once dirname(__FILE__) . '/TestCommon.php';
+
+require_once 'Zend/Barcode/Object/Int25.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Int25Test extends Zend_Barcode_Object_TestCommon
+{
+
+    protected function _getBarcodeObject($options = null)
+    {
+        return new Zend_Barcode_Object_Int25($options);
+    }
+
+    public function testType()
+    {
+        $this->assertSame('int25', $this->_object->getType());
+    }
+
+    public function testWithBearerBars()
+    {
+        $this->_object->setWithBearerBars(1);
+        $this->assertSame(true, $this->_object->getWithBearerBars());
+        $this->_object->setWithBearerBars(true);
+        $this->assertSame(true, $this->_object->getWithBearerBars());
+    }
+
+    public function testChecksum()
+    {
+        $this->assertSame(5, $this->_object->getChecksum('0123456789'));
+    }
+
+    public function testSetText()
+    {
+        $this->_object->setText('0123456789');
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('0123456789', $this->_object->getText());
+        $this->assertSame('0123456789', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithSpaces()
+    {
+        $this->_object->setText(' 0123456789 ');
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('0123456789', $this->_object->getText());
+        $this->assertSame('0123456789', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithoutEvenNumberOfCharacters()
+    {
+        $this->_object->setText('123456789');
+        $this->assertSame('123456789', $this->_object->getRawText());
+        $this->assertSame('0123456789', $this->_object->getText());
+        $this->assertSame('0123456789', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithChecksum()
+    {
+        $this->_object->setText('123456789');
+        $this->_object->setWithChecksum(true);
+        $this->assertSame('123456789', $this->_object->getRawText());
+        $this->assertSame('1234567895', $this->_object->getText());
+        $this->assertSame('123456789', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithoutEvenNumberOfCharactersWithChecksum()
+    {
+        $this->_object->setText('123456789');
+        $this->_object->setWithChecksum(true);
+        $this->assertSame('123456789', $this->_object->getRawText());
+        $this->assertSame('1234567895', $this->_object->getText());
+        $this->assertSame('123456789', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithChecksumDisplayed()
+    {
+        $this->_object->setText('123456789');
+        $this->_object->setWithChecksum(true);
+        $this->_object->setWithChecksumInText(true);
+        $this->assertSame('123456789', $this->_object->getRawText());
+        $this->assertSame('1234567895', $this->_object->getText());
+        $this->assertSame('1234567895', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithoutEvenNumberOfCharactersWithChecksumDisplayed()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setWithChecksum(true);
+        $this->_object->setWithChecksumInText(true);
+        $this->assertSame('0123456789', $this->_object->getRawText());
+        $this->assertSame('001234567895', $this->_object->getText());
+        $this->assertSame('001234567895', $this->_object->getTextToDisplay());
+    }
+
+    public function testBadTextAlwaysAllowed()
+    {
+        $this->_object->setText('a');
+        $this->assertSame('0a', $this->_object->getText());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testBadTextDetectedIfChecksumWished()
+    {
+        $this->_object->setText('a');
+        $this->_object->setWithChecksum(true);
+        $this->_object->getText();
+    }
+
+    public function testCheckGoodParams()
+    {
+        $this->_object->setText('0123456789');
+        $this->assertTrue($this->_object->checkParams());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testCheckParamsWithLowRatio()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setBarThinWidth(21);
+        $this->_object->setBarThickWidth(40);
+        $this->_object->checkParams();
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testCheckParamsWithHighRatio()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setBarThinWidth(20);
+        $this->_object->setBarThickWidth(61);
+        $this->_object->checkParams();
+    }
+
+    public function testGetKnownWidthWithoutOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->assertEquals(119, $this->_object->getWidth());
+    }
+
+    public function testCompleteGeneration()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile('Int25_0123456789_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithStretchText()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setStretchText(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Int25_0123456789_stretchtext_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBorder()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setWithBorder(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Int25_0123456789_border_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBearerBars()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setWithBearerBars(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Int25_0123456789_bearerbar_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Int25_0123456789_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithStretchTextWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setStretchText(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Int25_0123456789_stretchtext_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBorderWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setWithBorder(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Int25_0123456789_border_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBearerBarsWithOrientation()
+    {
+        $this->_object->setText('0123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setWithBearerBars(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Int25_0123456789_bearerbar_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+}

+ 230 - 0
tests/Zend/Barcode/Object/Itf14Test.php

@@ -0,0 +1,230 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+require_once dirname(__FILE__) . '/TestCommon.php';
+
+require_once 'Zend/Barcode/Object/Itf14.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Object_Itf14Test extends Zend_Barcode_Object_TestCommon
+{
+
+    protected function _getBarcodeObject($options = null)
+    {
+        return new Zend_Barcode_Object_Itf14($options);
+    }
+
+    public function testType()
+    {
+        $this->assertSame('itf14', $this->_object->getType());
+    }
+
+    public function testChecksum()
+    {
+        $this->assertSame(5, $this->_object->getChecksum('0000123456789'));
+    }
+
+    public function testSetText()
+    {
+        $this->_object->setText('0000123456789');
+        $this->assertSame('0000123456789', $this->_object->getRawText());
+        $this->assertSame('00001234567895', $this->_object->getText());
+        $this->assertSame('00001234567895', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithout14Characters()
+    {
+        $this->_object->setText('123456789');
+        $this->assertSame('123456789', $this->_object->getRawText());
+        $this->assertSame('00001234567895', $this->_object->getText());
+        $this->assertSame('00001234567895', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithoutChecksumHasNoEffect()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setWithChecksum(false);
+        $this->assertSame('0000123456789', $this->_object->getRawText());
+        $this->assertSame('00001234567895', $this->_object->getText());
+        $this->assertSame('00001234567895', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithSpaces()
+    {
+        $this->_object->setText(' 0000123456789 ');
+        $this->assertSame('0000123456789', $this->_object->getRawText());
+        $this->assertSame('00001234567895', $this->_object->getText());
+        $this->assertSame('00001234567895', $this->_object->getTextToDisplay());
+    }
+
+    public function testSetTextWithChecksumNotDisplayed()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setWithChecksumInText(false);
+        $this->assertSame('0000123456789', $this->_object->getRawText());
+        $this->assertSame('00001234567895', $this->_object->getText());
+        $this->assertSame('00001234567895', $this->_object->getTextToDisplay());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testBadTextDetectedIfChecksumWished()
+    {
+        $this->_object->setText('a');
+        $this->_object->setWithChecksum(true);
+        $this->_object->getText();
+    }
+
+    public function testCheckGoodParams()
+    {
+        $this->_object->setText('0000123456789');
+        $this->assertTrue($this->_object->checkParams());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testCheckParamsWithLowRatio()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setBarThinWidth(21);
+        $this->_object->setBarThickWidth(40);
+        $this->_object->checkParams();
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testCheckParamsWithHighRatio()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setBarThinWidth(20);
+        $this->_object->setBarThickWidth(61);
+        $this->_object->checkParams();
+    }
+
+    public function testGetKnownWidthWithoutOrientation()
+    {
+        $this->_object->setText('0000123456789');
+        $this->assertEquals(155, $this->_object->getWidth());
+    }
+
+    public function testCompleteGeneration()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile('Itf14_0000123456789_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithStretchText()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setStretchText(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Itf14_0000123456789_stretchtext_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBorder()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setWithBorder(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Itf14_0000123456789_border_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBearerBars()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setWithBearerBars(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Itf14_0000123456789_bearerbar_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithOrientation()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Itf14_0000123456789_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithStretchTextWithOrientation()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setStretchText(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Itf14_0000123456789_stretchtext_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBorderWithOrientation()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setWithBorder(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Itf14_0000123456789_border_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testCompleteGenerationWithBearerBarsWithOrientation()
+    {
+        $this->_object->setText('0000123456789');
+        $this->_object->setOrientation(60);
+        $this->_object->setWithBearerBars(true);
+        $this->_object->draw();
+        $instructions = $this->loadInstructionsFile(
+                'Itf14_0000123456789_bearerbar_oriented_instructions');
+        $this->assertEquals($instructions, $this->_object->getInstructions());
+    }
+
+    public function testGetDefaultHeight()
+    {
+        // Checksum activated => text needed
+        $this->_object->setText('0000123456789');
+        $this->assertEquals(61, $this->_object->getHeight(true));
+    }
+}

+ 484 - 0
tests/Zend/Barcode/Object/TestCommon.php

@@ -0,0 +1,484 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/_files/BarcodeTest.php';
+
+/**
+ * @see Zend_Config
+ */
+require_once 'Zend/Config.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+abstract class Zend_Barcode_Object_TestCommon extends PHPUnit_Framework_TestCase
+{
+
+    /**
+     * @var Zend_Barcode_Object
+     */
+    protected $_object = null;
+
+    abstract protected function _getBarcodeObject($options = null);
+
+    protected function loadInstructionsFile($fileName)
+    {
+        return include_once (dirname(__FILE__) . "/_files/$fileName.php");
+    }
+
+    public function setUp()
+    {
+        $this->_object = $this->_getBarcodeObject();
+    }
+
+    public function tearDown()
+    {
+        $this->_object = null;
+    }
+
+    public function testStaticFont()
+    {
+        Zend_Barcode_Object_ObjectAbstract::setBarcodeFont('my_static_font.ttf');
+        $this->assertEquals('', $this->_object->getFont());
+        $object = $this->_getBarcodeObject();
+        $this->assertEquals('my_static_font.ttf', $object->getFont());
+        Zend_Barcode_Object_ObjectAbstract::setBarcodeFont('');
+    }
+
+    public function testConstructorWithArray()
+    {
+        $object = $this->_getBarcodeObject(
+                array('barHeight' => 150 ,
+                        'unkownProperty' => 'aValue'));
+        $this->assertEquals(150, $object->getBarHeight());
+    }
+
+    public function testConstructorWithZendConfig()
+    {
+        $config = new Zend_Config(
+                array('barHeight' => 150 ,
+                        'unkownProperty' => 'aValue'));
+        $object = $this->_getBarcodeObject($config);
+        $this->assertEquals(150, $object->getBarHeight());
+    }
+
+    public function testSetOptions()
+    {
+        $this->_object->setOptions(
+                array('barHeight' => 150 ,
+                        'unkownProperty' => 'aValue'));
+        $this->assertEquals(150, $this->_object->getBarHeight());
+    }
+
+    public function testSetConfig()
+    {
+        $config = new Zend_Config(
+                array('barHeight' => 150 ,
+                        'unkownProperty' => 'aValue'));
+        $this->_object->setConfig($config);
+        $this->assertEquals(150, $this->_object->getBarHeight());
+    }
+
+    public function testBarcodeNamespace()
+    {
+        $this->_object->setBarcodeNamespace('My_Namespace');
+        $this->assertEquals('My_Namespace', $this->_object->getBarcodeNamespace());
+    }
+
+    public function testBarHeight()
+    {
+        $this->_object->setBarHeight(1);
+        $this->assertSame(1, $this->_object->getBarHeight());
+        $this->_object->setBarHeight(true);
+        $this->assertSame(1, $this->_object->getBarHeight());
+        $this->_object->setBarHeight('200a');
+        $this->assertSame(200, $this->_object->getBarHeight());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testNegativeBarHeight()
+    {
+        $this->_object->setBarHeight(- 1);
+    }
+
+    public function testBarThinWidth()
+    {
+        $this->_object->setBarThinWidth(1);
+        $this->assertSame(1, $this->_object->getBarThinWidth());
+        $this->_object->setBarThinWidth(true);
+        $this->assertSame(1, $this->_object->getBarThinWidth());
+        $this->_object->setBarThinWidth('200a');
+        $this->assertSame(200, $this->_object->getBarThinWidth());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testNegativeBarThinWidth()
+    {
+        $this->_object->setBarThinWidth(- 1);
+    }
+
+    public function testBarThickWidth()
+    {
+        $this->_object->setBarThickWidth(1);
+        $this->assertSame(1, $this->_object->getBarThickWidth());
+        $this->_object->setBarThickWidth(true);
+        $this->assertSame(1, $this->_object->getBarThickWidth());
+        $this->_object->setBarThickWidth('200a');
+        $this->assertSame(200, $this->_object->getBarThickWidth());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testNegativeBarThickWidth()
+    {
+        $this->_object->setBarThickWidth(- 1);
+    }
+
+    public function testFactor()
+    {
+        $this->_object->setFactor(1);
+        $this->assertSame(1.0, $this->_object->getFactor());
+        $this->_object->setFactor(1.25);
+        $this->assertSame(1.25, $this->_object->getFactor());
+        $this->_object->setFactor(true);
+        $this->assertSame(1.0, $this->_object->getFactor());
+        $this->_object->setFactor('200a');
+        $this->assertSame(200.0, $this->_object->getFactor());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testNegativeFactor()
+    {
+        $this->_object->setFactor(- 1);
+    }
+
+    public function testForeColor()
+    {
+        $this->_object->setForeColor('#333333');
+        $this->assertSame(3355443, $this->_object->getForeColor());
+        $this->_object->setForeColor(1000);
+        $this->assertSame(1000, $this->_object->getForeColor());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testNegativeForeColor()
+    {
+        $this->_object->setForeColor(- 1);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testTooHighForeColor()
+    {
+        $this->_object->setForeColor(16777126);
+    }
+
+    public function testBackgroundColor()
+    {
+        $this->_object->setBackgroundColor('#333333');
+        $this->assertSame(3355443, $this->_object->getBackgroundColor());
+        $this->_object->setBackgroundColor(1000);
+        $this->assertSame(1000, $this->_object->getBackgroundColor());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testNegativeBackgroundColor()
+    {
+        $this->_object->setBackgroundColor(- 1);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testTooHighBackgroundColor()
+    {
+        $this->_object->setBackgroundColor(16777126);
+    }
+
+    public function testWithBorder()
+    {
+        $this->_object->setWithBorder(1);
+        $this->assertSame(true, $this->_object->getWithBorder());
+        $this->_object->setWithBorder(true);
+        $this->assertSame(true, $this->_object->getWithBorder());
+    }
+
+    public function testReverseColor()
+    {
+        $this->_object->setForeColor(11);
+        $this->_object->setBackgroundColor(111);
+        $this->_object->setReverseColor();
+        $this->assertSame(111, $this->_object->getForeColor());
+        $this->assertSame(11, $this->_object->getBackgroundColor());
+    }
+
+    public function testOrientation()
+    {
+        $this->_object->setOrientation(1);
+        $this->assertSame(1.0, $this->_object->getOrientation());
+        $this->_object->setOrientation(1.25);
+        $this->assertSame(1.25, $this->_object->getOrientation());
+        $this->_object->setOrientation(true);
+        $this->assertSame(1.0, $this->_object->getOrientation());
+        $this->_object->setOrientation('200a');
+        $this->assertSame(200.0, $this->_object->getOrientation());
+        $this->_object->setOrientation(360);
+        $this->assertSame(0.0, $this->_object->getOrientation());
+    }
+
+    public function testDrawText()
+    {
+        $this->_object->setDrawText(1);
+        $this->assertSame(true, $this->_object->getDrawText());
+        $this->_object->setDrawText(true);
+        $this->assertSame(true, $this->_object->getDrawText());
+    }
+
+    public function testStretchText()
+    {
+        $this->_object->setStretchText(1);
+        $this->assertSame(true, $this->_object->getStretchText());
+        $this->_object->setStretchText(true);
+        $this->assertSame(true, $this->_object->getStretchText());
+    }
+
+    public function testWithChecksum()
+    {
+        $this->_object->setWithChecksum(1);
+        $this->assertSame(true, $this->_object->getWithChecksum());
+        $this->_object->setWithChecksum(true);
+        $this->assertSame(true, $this->_object->getWithChecksum());
+    }
+
+    public function testWithChecksumInText()
+    {
+        $this->_object->setWithChecksumInText(1);
+        $this->assertSame(true, $this->_object->getWithChecksumInText());
+        $this->_object->setWithChecksumInText(true);
+        $this->assertSame(true, $this->_object->getWithChecksumInText());
+    }
+
+    public function testSetFontAsNumberForGdImage()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $gdFontSize = array(8 , 13 , 13 , 16 , 15);
+        for ($i = 1; $i <= 5; $i ++) {
+            $this->_object->setFont($i);
+            $this->assertSame($i, $this->_object->getFont());
+            $this->assertSame($gdFontSize[$i - 1],
+                    $this->_object->getFontSize());
+        }
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testSetLowFontAsNumberForGdImage()
+    {
+        $this->_object->setFont(0);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testSetHighFontAsNumberForGdImage()
+    {
+        $this->_object->setFont(6);
+    }
+
+    public function testSetFontAsString()
+    {
+        $this->_object->setFont('my_font.ttf');
+        $this->assertSame('my_font.ttf', $this->_object->getFont());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testSetFontAsBoolean()
+    {
+        $this->_object->setFont(true);
+    }
+
+    public function testFontAsNumberWithoutGd()
+    {
+        if (extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension must not be loaded to run this test');
+        }
+        $this->setExpectedException('Zend_Barcode_Object_Exception');
+        $this->_object->setFont(1);
+    }
+
+    public function testFontSize()
+    {
+        $this->_object->setFontSize(22);
+        $this->assertSame(22, $this->_object->getFontSize());
+    }
+
+    public function testFontSizeWithoutEffectWithGdInternalFont()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $this->_object->setFont(1);
+        $this->_object->setFontSize(22);
+        $this->assertSame(8, $this->_object->getFontSize());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testStringFontSize()
+    {
+        $this->_object->setFontSize('22a');
+    }
+
+    public function testStandardQuietZone()
+    {
+        $this->_object->setBarThinWidth(3);
+        $this->_object->setFactor(4);
+        $this->assertSame(120.0, $this->_object->getQuietZone());
+    }
+
+    public function testAddInstruction()
+    {
+        $object = new Zend_Barcode_Object_Test();
+        $instructions = array('type' => 'text' , 'text' => 'text' , 'size' => 10 ,
+                'position' => array(5 , 5) ,
+                'font' => 'my_font.ttf' ,
+                'color' => '#123456' ,
+                'alignment' => 'center' ,
+                'orientation' => 45);
+        $object->addInstruction($instructions);
+        $this->assertSame(array($instructions), $object->getInstructions());
+    }
+
+    public function testAddPolygon()
+    {
+        $object = new Zend_Barcode_Object_Test();
+        $points = array();
+        $color = '#123456';
+        $filled = false;
+        $instructions = array('type' => 'polygon' , 'points' => $points ,
+                'color' => $color , 'filled' => $filled);
+        $object->addPolygon($points, $color, $filled);
+        $this->assertSame(array($instructions), $object->getInstructions());
+    }
+
+    public function testAddPolygonWithDefaultColor()
+    {
+        $object = new Zend_Barcode_Object_Test();
+        $points = array();
+        $color = 123456;
+        $object->setForeColor($color);
+        $filled = false;
+        $instructions = array('type' => 'polygon' , 'points' => $points ,
+                'color' => $color , 'filled' => $filled);
+        $object->addPolygon($points, null, $filled);
+        $this->assertSame(array($instructions), $object->getInstructions());
+    }
+
+    public function testAddText()
+    {
+        $object = new Zend_Barcode_Object_Test();
+        $size = 10;
+        $text = 'foobar';
+        $position = array();
+        $font = 'my_font.ttf';
+        $color = '#123456';
+        $alignment = 'right';
+        $orientation = 45;
+        $instructions = array('type' => 'text' , 'text' => $text , 'size' => $size ,
+                'position' => $position ,
+                'font' => $font , 'color' => $color ,
+                'alignment' => $alignment ,
+                'orientation' => $orientation);
+        $object->addText($text, $size, $position, $font, $color, $alignment,
+                $orientation);
+        $this->assertSame(array($instructions), $object->getInstructions());
+    }
+
+    public function testAddTextWithDefaultColor()
+    {
+        $object = new Zend_Barcode_Object_Test();
+        $size = 10;
+        $text = 'foobar';
+        $position = array();
+        $font = 'my_font.ttf';
+        $color = 123456;
+        $object->setForeColor($color);
+        $alignment = 'right';
+        $orientation = 45;
+        $instructions = array('type' => 'text' , 'text' => $text , 'size' => $size ,
+                'position' => $position ,
+                'font' => $font , 'color' => $color ,
+                'alignment' => $alignment ,
+                'orientation' => $orientation);
+        $object->addText($text, $size, $position, $font, null, $alignment, $orientation);
+        $this->assertSame(array($instructions), $object->getInstructions());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Object_Exception
+     */
+    public function testCheckParamsFontWithOrientation()
+    {
+        $this->_object->setText('0');
+        $this->_object->setFont(1);
+        $this->_object->setOrientation(45);
+        $this->_object->checkParams();
+    }
+
+    public function testGetDefaultHeight()
+    {
+        $this->assertEquals(61, $this->_object->getHeight());
+    }
+}

+ 11 - 0
tests/Zend/Barcode/Object/_files/BarcodeNamespace.php

@@ -0,0 +1,11 @@
+<?php
+require_once 'Zend/Barcode/Object/Error.php';
+
+class My_Namespace_Error extends Zend_Barcode_Object_Error
+{
+
+    public function getType()
+    {
+        return $this->_type;
+    }
+}

+ 4 - 0
tests/Zend/Barcode/Object/_files/BarcodeNamespaceWithoutExtendingObjectAbstract.php

@@ -0,0 +1,4 @@
+<?php
+
+class My_Namespace_Other_Error
+{}

+ 37 - 0
tests/Zend/Barcode/Object/_files/BarcodeTest.php

@@ -0,0 +1,37 @@
+<?php
+require_once 'Zend/Barcode/Object/ObjectAbstract.php';
+
+class Zend_Barcode_Object_Test extends Zend_Barcode_Object_ObjectAbstract
+{
+
+    protected function _calculateBarcodeWidth()
+    {
+        return 1;
+    }
+
+    public function validateText($value)
+    {}
+
+    protected function _prepareBarcode()
+    {
+        return array();
+    }
+
+    protected function _checkParams()
+    {}
+
+    public function addInstruction(array $instruction)
+    {
+        $this->_addInstruction($instruction);
+    }
+
+    public function addPolygon(array $points, $color = null, $filled = true)
+    {
+        $this->_addPolygon($points, $color, $filled);
+    }
+
+    public function addText($text, $size, $position, $font, $color, $alignment = 'center', $orientation = 0)
+    {
+        $this->_addText($text, $size, $position, $font, $color, $alignment, $orientation);
+    }
+}

+ 1706 - 0
tests/Zend/Barcode/Object/_files/Code25_0123456789_border_instructions.php

@@ -0,0 +1,1706 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 181,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 181,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 11,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 11,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 13,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 13,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 15,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 17,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 17,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 19,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 19,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 21,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 21,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 21,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 23,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 23,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 25,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 27,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 27,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 29,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 29,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 31,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 33,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 33,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 35,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 35,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 37,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 37,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 39,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 39,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 39,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 41,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 41,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 41,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 41,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 43,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 43,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 45,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 45,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 47,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 49,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 49,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 49,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 51,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 53,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 55,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 55,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 55,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 55,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 57,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 63,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 65,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 67,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 67,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 71,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 71,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 71,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 73,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 73,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 75,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 75,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 75,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 77,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 79,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 83,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 85,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 85,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 85,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 85,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 87,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 89,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 93,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 95,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 95,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 95,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 97,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 99,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 101,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 101,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 101,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 103,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 103,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 105,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 105,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 105,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 105,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 107,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 109,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 111,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 113,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 115,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 115,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 115,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 115,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 117,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 117,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 117,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 117,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 119,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 119,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 119,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 121,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 121,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 123,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 123,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 123,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 125,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 125,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 127,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 127,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 129,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 129,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 131,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 131,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 133,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 133,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 135,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 135,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 137,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 137,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 137,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 137,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 139,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 139,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 139,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 139,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 141,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 141,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 143,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 143,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 145,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 145,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 145,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 145,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 147,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 147,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 147,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 147,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 149,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 149,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 151,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 151,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 153,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 153,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 153,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 153,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 155,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 155,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 157,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 157,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 159,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 159,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 159,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 159,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 161,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 161,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 163,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 163,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 165,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 165,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 165,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 165,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 167,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 167,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 169,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 169,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 181,
+        1 => 0,
+      ),
+      2 => 
+      array (
+        0 => 181,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 0,
+        1 => 64,
+      ),
+      4 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => false,
+  ),
+  58 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 91,
+      1 => 62,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1706 - 0
tests/Zend/Barcode/Object/_files/Code25_0123456789_border_oriented_instructions.php

@@ -0,0 +1,1706 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => -2,
+        1 => 32,
+      ),
+      2 => 
+      array (
+        0 => 87,
+        1 => 188,
+      ),
+      3 => 
+      array (
+        0 => 143,
+        1 => 156,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 36,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 11,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 13,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 38,
+      ),
+      2 => 
+      array (
+        0 => 17,
+        1 => 40,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 15,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 16,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 41,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 41,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 16,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 18,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 43,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 43,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 18,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 63,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 45,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 20,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 22,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 47,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 48,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 23,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 25,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 24,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 67,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 29,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 54,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 54,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 29,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 30,
+      ),
+      1 => 
+      array (
+        0 => 26,
+        1 => 55,
+      ),
+      2 => 
+      array (
+        0 => 27,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 70,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 71,
+        1 => 34,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 59,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 59,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 34,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 29,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 29,
+        1 => 61,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 36,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 37,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 62,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 62,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 37,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 39,
+      ),
+      1 => 
+      array (
+        0 => 31,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 75,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 42,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 67,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 67,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 42,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 44,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 69,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 48,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 73,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 73,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 48,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 49,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 74,
+      ),
+      2 => 
+      array (
+        0 => 37,
+        1 => 74,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 49,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 76,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 78,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 53,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 55,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 80,
+      ),
+      2 => 
+      array (
+        0 => 41,
+        1 => 81,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 56,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 85,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 85,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 60,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 61,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 86,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 86,
+      ),
+      3 => 
+      array (
+        0 => 87,
+        1 => 61,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 88,
+        1 => 63,
+      ),
+      1 => 
+      array (
+        0 => 45,
+        1 => 88,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 88,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 63,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 65,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 90,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 67,
+      ),
+      1 => 
+      array (
+        0 => 47,
+        1 => 92,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 92,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 67,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 68,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 93,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 93,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 68,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 92,
+        1 => 70,
+      ),
+      1 => 
+      array (
+        0 => 49,
+        1 => 95,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 97,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 72,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 51,
+        1 => 99,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 74,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 75,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 100,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 79,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 104,
+      ),
+      2 => 
+      array (
+        0 => 55,
+        1 => 106,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 81,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 82,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 107,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 107,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 82,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 84,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 109,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 87,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 112,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 112,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 87,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 89,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 114,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 114,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 89,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 91,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 116,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 116,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 91,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 105,
+        1 => 93,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 118,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 119,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 94,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 96,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 121,
+      ),
+      2 => 
+      array (
+        0 => 65,
+        1 => 123,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 98,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 109,
+        1 => 100,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 125,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 125,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 100,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 101,
+      ),
+      1 => 
+      array (
+        0 => 67,
+        1 => 126,
+      ),
+      2 => 
+      array (
+        0 => 67,
+        1 => 126,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 101,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 103,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 128,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 128,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 103,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 112,
+        1 => 105,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 130,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 107,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 132,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 132,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 107,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 108,
+      ),
+      1 => 
+      array (
+        0 => 71,
+        1 => 133,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 135,
+      ),
+      3 => 
+      array (
+        0 => 115,
+        1 => 110,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 116,
+        1 => 112,
+      ),
+      1 => 
+      array (
+        0 => 73,
+        1 => 137,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 138,
+      ),
+      3 => 
+      array (
+        0 => 117,
+        1 => 113,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 115,
+      ),
+      1 => 
+      array (
+        0 => 75,
+        1 => 140,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 142,
+      ),
+      3 => 
+      array (
+        0 => 119,
+        1 => 117,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 119,
+      ),
+      1 => 
+      array (
+        0 => 77,
+        1 => 144,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 120,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 145,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 145,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 120,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 122,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 147,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 149,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 124,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 126,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 151,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 151,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 126,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 125,
+        1 => 127,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 152,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 152,
+      ),
+      3 => 
+      array (
+        0 => 125,
+        1 => 127,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 126,
+        1 => 129,
+      ),
+      1 => 
+      array (
+        0 => 83,
+        1 => 154,
+      ),
+      2 => 
+      array (
+        0 => 84,
+        1 => 156,
+      ),
+      3 => 
+      array (
+        0 => 127,
+        1 => 131,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 128,
+        1 => 133,
+      ),
+      1 => 
+      array (
+        0 => 85,
+        1 => 158,
+      ),
+      2 => 
+      array (
+        0 => 85,
+        1 => 158,
+      ),
+      3 => 
+      array (
+        0 => 128,
+        1 => 133,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 129,
+        1 => 134,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 159,
+      ),
+      2 => 
+      array (
+        0 => 87,
+        1 => 161,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 136,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 131,
+        1 => 138,
+      ),
+      1 => 
+      array (
+        0 => 88,
+        1 => 163,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 163,
+      ),
+      3 => 
+      array (
+        0 => 131,
+        1 => 138,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 132,
+        1 => 139,
+      ),
+      1 => 
+      array (
+        0 => 89,
+        1 => 164,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 166,
+      ),
+      3 => 
+      array (
+        0 => 133,
+        1 => 141,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 143,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 168,
+      ),
+      2 => 
+      array (
+        0 => 91,
+        1 => 168,
+      ),
+      3 => 
+      array (
+        0 => 134,
+        1 => 143,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 135,
+        1 => 145,
+      ),
+      1 => 
+      array (
+        0 => 92,
+        1 => 170,
+      ),
+      2 => 
+      array (
+        0 => 93,
+        1 => 171,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 146,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 143,
+        1 => 156,
+      ),
+      2 => 
+      array (
+        0 => 87,
+        1 => 188,
+      ),
+      3 => 
+      array (
+        0 => -2,
+        1 => 32,
+      ),
+      4 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => false,
+  ),
+  58 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 44,
+      1 => 109,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1672 - 0
tests/Zend/Barcode/Object/_files/Code25_0123456789_instructions.php

@@ -0,0 +1,1672 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 179,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 179,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 22,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 22,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 22,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 30,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 40,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 40,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 46,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 56,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 56,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 64,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 84,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 84,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 84,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 92,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 106,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 112,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 114,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 114,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 114,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 116,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 116,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 116,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 116,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 124,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 126,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 126,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 128,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 128,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 132,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 132,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 134,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 134,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 140,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 140,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 142,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 142,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 146,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 146,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 146,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 146,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 148,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 148,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 150,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 150,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 152,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 152,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 152,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 152,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 154,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 154,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 156,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 156,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 158,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 158,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 158,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 158,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 160,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 160,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 162,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 162,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 164,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 164,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 164,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 164,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 166,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 166,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 168,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 168,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 90,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1672 - 0
tests/Zend/Barcode/Object/_files/Code25_0123456789_oriented_instructions.php

@@ -0,0 +1,1672 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 185,
+      ),
+      3 => 
+      array (
+        0 => 142,
+        1 => 155,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 63,
+        1 => 19,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 44,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 44,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 19,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      2 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 67,
+        1 => 25,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+      1 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      2 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      3 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 34,
+      ),
+      1 => 
+      array (
+        0 => 29,
+        1 => 59,
+      ),
+      2 => 
+      array (
+        0 => 29,
+        1 => 59,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 34,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+      1 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 75,
+        1 => 39,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 70,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 45,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 48,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 73,
+      ),
+      2 => 
+      array (
+        0 => 37,
+        1 => 73,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 48,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 41,
+        1 => 80,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 55,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 85,
+        1 => 57,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 82,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      3 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+      1 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+      1 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+      1 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 72,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 97,
+      ),
+      2 => 
+      array (
+        0 => 51,
+        1 => 97,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 72,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 55,
+        1 => 104,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 79,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 109,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 84,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 105,
+        1 => 91,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 116,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      2 => 
+      array (
+        0 => 65,
+        1 => 121,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 96,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 109,
+        1 => 98,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 123,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 123,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 98,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 100,
+      ),
+      1 => 
+      array (
+        0 => 67,
+        1 => 125,
+      ),
+      2 => 
+      array (
+        0 => 67,
+        1 => 125,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 100,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 107,
+      ),
+      1 => 
+      array (
+        0 => 71,
+        1 => 132,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 134,
+      ),
+      3 => 
+      array (
+        0 => 115,
+        1 => 109,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 116,
+        1 => 110,
+      ),
+      1 => 
+      array (
+        0 => 73,
+        1 => 135,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      3 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 114,
+      ),
+      1 => 
+      array (
+        0 => 75,
+        1 => 139,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 141,
+      ),
+      3 => 
+      array (
+        0 => 119,
+        1 => 116,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+      1 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 121,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 146,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 147,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 122,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 125,
+        1 => 126,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 151,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 151,
+      ),
+      3 => 
+      array (
+        0 => 125,
+        1 => 126,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 126,
+        1 => 128,
+      ),
+      1 => 
+      array (
+        0 => 83,
+        1 => 153,
+      ),
+      2 => 
+      array (
+        0 => 84,
+        1 => 154,
+      ),
+      3 => 
+      array (
+        0 => 127,
+        1 => 129,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 128,
+        1 => 131,
+      ),
+      1 => 
+      array (
+        0 => 85,
+        1 => 156,
+      ),
+      2 => 
+      array (
+        0 => 85,
+        1 => 156,
+      ),
+      3 => 
+      array (
+        0 => 128,
+        1 => 131,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 129,
+        1 => 133,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 158,
+      ),
+      2 => 
+      array (
+        0 => 87,
+        1 => 160,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 135,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 131,
+        1 => 136,
+      ),
+      1 => 
+      array (
+        0 => 88,
+        1 => 161,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 161,
+      ),
+      3 => 
+      array (
+        0 => 131,
+        1 => 136,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 132,
+        1 => 138,
+      ),
+      1 => 
+      array (
+        0 => 89,
+        1 => 163,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 165,
+      ),
+      3 => 
+      array (
+        0 => 133,
+        1 => 140,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 142,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 167,
+      ),
+      2 => 
+      array (
+        0 => 91,
+        1 => 167,
+      ),
+      3 => 
+      array (
+        0 => 134,
+        1 => 142,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 135,
+        1 => 143,
+      ),
+      1 => 
+      array (
+        0 => 92,
+        1 => 168,
+      ),
+      2 => 
+      array (
+        0 => 93,
+        1 => 170,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 145,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 45,
+      1 => 107,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1807 - 0
tests/Zend/Barcode/Object/_files/Code25_0123456789_stretchtext_instructions.php

@@ -0,0 +1,1807 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 179,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 179,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 22,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 22,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 22,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 30,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 40,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 40,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 46,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 56,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 56,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 64,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 84,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 84,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 84,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 92,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 106,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 112,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 114,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 114,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 114,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 116,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 116,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 116,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 116,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 124,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 126,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 126,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 128,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 128,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 132,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 132,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 134,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 134,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 140,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 140,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 142,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 142,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 146,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 146,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 146,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 146,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 148,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 148,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 150,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 150,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 152,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 152,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 152,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 152,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 154,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 154,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 156,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 156,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 158,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 158,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 158,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 158,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 160,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 160,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 162,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 162,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 164,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 164,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 164,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 164,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 166,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 166,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 168,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 168,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 18,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  58 => 
+  array (
+    'type' => 'text',
+    'text' => '1',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 34,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  59 => 
+  array (
+    'type' => 'text',
+    'text' => '2',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 50,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  60 => 
+  array (
+    'type' => 'text',
+    'text' => '3',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 66,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  61 => 
+  array (
+    'type' => 'text',
+    'text' => '4',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 82,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  62 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 98,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  63 => 
+  array (
+    'type' => 'text',
+    'text' => '6',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 114,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  64 => 
+  array (
+    'type' => 'text',
+    'text' => '7',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 130,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  65 => 
+  array (
+    'type' => 'text',
+    'text' => '8',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 146,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  66 => 
+  array (
+    'type' => 'text',
+    'text' => '9',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 162,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1807 - 0
tests/Zend/Barcode/Object/_files/Code25_0123456789_stretchtext_oriented_instructions.php

@@ -0,0 +1,1807 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 185,
+      ),
+      3 => 
+      array (
+        0 => 142,
+        1 => 155,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 63,
+        1 => 19,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 44,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 44,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 19,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      2 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 67,
+        1 => 25,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+      1 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      2 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      3 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 34,
+      ),
+      1 => 
+      array (
+        0 => 29,
+        1 => 59,
+      ),
+      2 => 
+      array (
+        0 => 29,
+        1 => 59,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 34,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+      1 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 75,
+        1 => 39,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 70,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 45,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 48,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 73,
+      ),
+      2 => 
+      array (
+        0 => 37,
+        1 => 73,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 48,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 41,
+        1 => 80,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 55,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 85,
+        1 => 57,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 82,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      3 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+      1 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+      1 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+      1 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 72,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 97,
+      ),
+      2 => 
+      array (
+        0 => 51,
+        1 => 97,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 72,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 55,
+        1 => 104,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 79,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 109,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 84,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 105,
+        1 => 91,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 116,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      2 => 
+      array (
+        0 => 65,
+        1 => 121,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 96,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 109,
+        1 => 98,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 123,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 123,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 98,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 100,
+      ),
+      1 => 
+      array (
+        0 => 67,
+        1 => 125,
+      ),
+      2 => 
+      array (
+        0 => 67,
+        1 => 125,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 100,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 107,
+      ),
+      1 => 
+      array (
+        0 => 71,
+        1 => 132,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 134,
+      ),
+      3 => 
+      array (
+        0 => 115,
+        1 => 109,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 116,
+        1 => 110,
+      ),
+      1 => 
+      array (
+        0 => 73,
+        1 => 135,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      3 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 114,
+      ),
+      1 => 
+      array (
+        0 => 75,
+        1 => 139,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 141,
+      ),
+      3 => 
+      array (
+        0 => 119,
+        1 => 116,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+      1 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 121,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 146,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 147,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 122,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 125,
+        1 => 126,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 151,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 151,
+      ),
+      3 => 
+      array (
+        0 => 125,
+        1 => 126,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 126,
+        1 => 128,
+      ),
+      1 => 
+      array (
+        0 => 83,
+        1 => 153,
+      ),
+      2 => 
+      array (
+        0 => 84,
+        1 => 154,
+      ),
+      3 => 
+      array (
+        0 => 127,
+        1 => 129,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 128,
+        1 => 131,
+      ),
+      1 => 
+      array (
+        0 => 85,
+        1 => 156,
+      ),
+      2 => 
+      array (
+        0 => 85,
+        1 => 156,
+      ),
+      3 => 
+      array (
+        0 => 128,
+        1 => 131,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 129,
+        1 => 133,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 158,
+      ),
+      2 => 
+      array (
+        0 => 87,
+        1 => 160,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 135,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 131,
+        1 => 136,
+      ),
+      1 => 
+      array (
+        0 => 88,
+        1 => 161,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 161,
+      ),
+      3 => 
+      array (
+        0 => 131,
+        1 => 136,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 132,
+        1 => 138,
+      ),
+      1 => 
+      array (
+        0 => 89,
+        1 => 163,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 165,
+      ),
+      3 => 
+      array (
+        0 => 133,
+        1 => 140,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 142,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 167,
+      ),
+      2 => 
+      array (
+        0 => 91,
+        1 => 167,
+      ),
+      3 => 
+      array (
+        0 => 134,
+        1 => 142,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 135,
+        1 => 143,
+      ),
+      1 => 
+      array (
+        0 => 92,
+        1 => 168,
+      ),
+      2 => 
+      array (
+        0 => 93,
+        1 => 170,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 145,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 9,
+      1 => 45,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  58 => 
+  array (
+    'type' => 'text',
+    'text' => '1',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 17,
+      1 => 59,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  59 => 
+  array (
+    'type' => 'text',
+    'text' => '2',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 25,
+      1 => 73,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  60 => 
+  array (
+    'type' => 'text',
+    'text' => '3',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 33,
+      1 => 87,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  61 => 
+  array (
+    'type' => 'text',
+    'text' => '4',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 41,
+      1 => 101,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  62 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 49,
+      1 => 114,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  63 => 
+  array (
+    'type' => 'text',
+    'text' => '6',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 57,
+      1 => 128,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  64 => 
+  array (
+    'type' => 'text',
+    'text' => '7',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 65,
+      1 => 142,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  65 => 
+  array (
+    'type' => 'text',
+    'text' => '8',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 73,
+      1 => 156,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  66 => 
+  array (
+    'type' => 'text',
+    'text' => '9',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 81,
+      1 => 170,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1822 - 0
tests/Zend/Barcode/Object/_files/Code39_0123456789_border_instructions.php

@@ -0,0 +1,1822 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 212,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 212,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 11,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 11,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 11,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 11,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 15,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 15,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 17,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 17,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 19,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 21,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 23,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 25,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 25,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 27,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 27,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 27,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 29,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 29,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 29,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 29,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 33,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 35,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 37,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 39,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 41,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 41,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 41,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 41,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 43,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 45,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 47,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 47,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 47,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 51,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 51,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 51,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 53,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 53,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 53,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 55,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 55,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 57,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 67,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 67,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 67,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 67,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 71,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 71,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 73,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 75,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 85,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 85,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 85,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 85,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 87,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 87,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 87,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 89,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 89,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 91,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 93,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 93,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 93,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 97,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 99,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 101,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 101,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 101,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 103,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 105,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 105,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 107,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 109,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 111,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 111,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 115,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 115,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 117,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 117,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 119,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 119,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 119,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 121,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 121,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 123,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 123,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 123,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 125,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 125,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 127,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 127,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 131,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 131,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 133,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 133,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 135,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 135,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 135,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 135,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 137,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 137,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 137,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 137,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 139,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 139,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 139,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 139,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 141,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 141,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 141,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 141,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 145,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 145,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 145,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 145,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 147,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 147,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 149,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 149,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 151,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 151,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 153,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 153,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 155,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 155,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 157,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 157,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 159,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 159,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 159,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 159,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 163,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 163,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 163,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 163,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 165,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 165,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 167,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 167,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 169,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 169,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 169,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 169,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 171,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 171,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 171,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 171,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 173,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 173,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 175,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 175,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 179,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 179,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 179,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 179,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 181,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 181,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 183,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 183,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 185,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 185,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 185,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 185,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 187,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 187,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 187,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 187,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 191,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 191,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 191,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 191,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  58 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 193,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 193,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 195,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 195,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  59 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 197,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 197,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 199,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 199,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  60 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 201,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 201,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 201,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 201,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  61 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 212,
+        1 => 0,
+      ),
+      2 => 
+      array (
+        0 => 212,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 0,
+        1 => 64,
+      ),
+      4 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => false,
+  ),
+  62 => 
+  array (
+    'type' => 'text',
+    'text' => '*0123456789*',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 106,
+      1 => 62,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1822 - 0
tests/Zend/Barcode/Object/_files/Code39_0123456789_border_oriented_instructions.php

@@ -0,0 +1,1822 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => -2,
+        1 => 32,
+      ),
+      2 => 
+      array (
+        0 => 103,
+        1 => 215,
+      ),
+      3 => 
+      array (
+        0 => 158,
+        1 => 183,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 13,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 38,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 38,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 13,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 17,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 41,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 16,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 18,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 43,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 45,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 20,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 22,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 47,
+      ),
+      2 => 
+      array (
+        0 => 21,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 64,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 65,
+        1 => 23,
+      ),
+      1 => 
+      array (
+        0 => 22,
+        1 => 48,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 48,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 23,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 25,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 25,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 29,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 54,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 55,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 30,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 32,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 57,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 59,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 34,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 29,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 29,
+        1 => 61,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 36,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 37,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 62,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 39,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 41,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 66,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 75,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 44,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 69,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 69,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 44,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 35,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 48,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 73,
+      ),
+      2 => 
+      array (
+        0 => 37,
+        1 => 74,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 49,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 76,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 76,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 39,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 80,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 55,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 85,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 83,
+      ),
+      3 => 
+      array (
+        0 => 85,
+        1 => 58,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 85,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 60,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 61,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 86,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 88,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 63,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 65,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 90,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 92,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 67,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 68,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 93,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 95,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 70,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 51,
+        1 => 99,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 74,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 75,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 100,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 100,
+      ),
+      3 => 
+      array (
+        0 => 95,
+        1 => 75,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 53,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 79,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 104,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 104,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 79,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 98,
+        1 => 81,
+      ),
+      1 => 
+      array (
+        0 => 55,
+        1 => 106,
+      ),
+      2 => 
+      array (
+        0 => 55,
+        1 => 106,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 81,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 84,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 109,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 87,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 112,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 112,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 87,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 89,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 114,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 116,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 91,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 105,
+        1 => 93,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 118,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 119,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 94,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 96,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 121,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 121,
+      ),
+      3 => 
+      array (
+        0 => 107,
+        1 => 96,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 109,
+        1 => 100,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 125,
+      ),
+      2 => 
+      array (
+        0 => 67,
+        1 => 126,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 101,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 103,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 128,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 128,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 103,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 112,
+        1 => 105,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 130,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 107,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 132,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 132,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 107,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 108,
+      ),
+      1 => 
+      array (
+        0 => 71,
+        1 => 133,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 135,
+      ),
+      3 => 
+      array (
+        0 => 115,
+        1 => 110,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 117,
+        1 => 113,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 138,
+      ),
+      2 => 
+      array (
+        0 => 75,
+        1 => 140,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 115,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 117,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 142,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 142,
+      ),
+      3 => 
+      array (
+        0 => 119,
+        1 => 117,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 119,
+      ),
+      1 => 
+      array (
+        0 => 77,
+        1 => 144,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 120,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 145,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 145,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 120,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 122,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 147,
+      ),
+      2 => 
+      array (
+        0 => 79,
+        1 => 147,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 122,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 126,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 151,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 151,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 126,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 125,
+        1 => 127,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 152,
+      ),
+      2 => 
+      array (
+        0 => 83,
+        1 => 154,
+      ),
+      3 => 
+      array (
+        0 => 126,
+        1 => 129,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 127,
+        1 => 131,
+      ),
+      1 => 
+      array (
+        0 => 84,
+        1 => 156,
+      ),
+      2 => 
+      array (
+        0 => 85,
+        1 => 158,
+      ),
+      3 => 
+      array (
+        0 => 128,
+        1 => 133,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 129,
+        1 => 134,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 159,
+      ),
+      2 => 
+      array (
+        0 => 87,
+        1 => 161,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 136,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 131,
+        1 => 138,
+      ),
+      1 => 
+      array (
+        0 => 88,
+        1 => 163,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 163,
+      ),
+      3 => 
+      array (
+        0 => 131,
+        1 => 138,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 133,
+        1 => 141,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 166,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 166,
+      ),
+      3 => 
+      array (
+        0 => 133,
+        1 => 141,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 143,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 168,
+      ),
+      2 => 
+      array (
+        0 => 92,
+        1 => 170,
+      ),
+      3 => 
+      array (
+        0 => 135,
+        1 => 145,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 136,
+        1 => 146,
+      ),
+      1 => 
+      array (
+        0 => 93,
+        1 => 171,
+      ),
+      2 => 
+      array (
+        0 => 93,
+        1 => 171,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 146,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 137,
+        1 => 148,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 173,
+      ),
+      2 => 
+      array (
+        0 => 94,
+        1 => 173,
+      ),
+      3 => 
+      array (
+        0 => 137,
+        1 => 148,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 150,
+      ),
+      1 => 
+      array (
+        0 => 95,
+        1 => 175,
+      ),
+      2 => 
+      array (
+        0 => 96,
+        1 => 177,
+      ),
+      3 => 
+      array (
+        0 => 139,
+        1 => 152,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 141,
+        1 => 155,
+      ),
+      1 => 
+      array (
+        0 => 98,
+        1 => 180,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 180,
+      ),
+      3 => 
+      array (
+        0 => 141,
+        1 => 155,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 142,
+        1 => 157,
+      ),
+      1 => 
+      array (
+        0 => 99,
+        1 => 182,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 183,
+      ),
+      3 => 
+      array (
+        0 => 143,
+        1 => 158,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 160,
+      ),
+      1 => 
+      array (
+        0 => 101,
+        1 => 185,
+      ),
+      2 => 
+      array (
+        0 => 101,
+        1 => 185,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 160,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 145,
+        1 => 162,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 187,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 187,
+      ),
+      3 => 
+      array (
+        0 => 145,
+        1 => 162,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 147,
+        1 => 165,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 190,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 190,
+      ),
+      3 => 
+      array (
+        0 => 147,
+        1 => 165,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  58 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 148,
+        1 => 167,
+      ),
+      1 => 
+      array (
+        0 => 105,
+        1 => 192,
+      ),
+      2 => 
+      array (
+        0 => 106,
+        1 => 194,
+      ),
+      3 => 
+      array (
+        0 => 149,
+        1 => 169,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  59 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 150,
+        1 => 171,
+      ),
+      1 => 
+      array (
+        0 => 107,
+        1 => 196,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 197,
+      ),
+      3 => 
+      array (
+        0 => 151,
+        1 => 172,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  60 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 152,
+        1 => 174,
+      ),
+      1 => 
+      array (
+        0 => 109,
+        1 => 199,
+      ),
+      2 => 
+      array (
+        0 => 109,
+        1 => 199,
+      ),
+      3 => 
+      array (
+        0 => 152,
+        1 => 174,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  61 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 158,
+        1 => 183,
+      ),
+      2 => 
+      array (
+        0 => 103,
+        1 => 215,
+      ),
+      3 => 
+      array (
+        0 => -2,
+        1 => 32,
+      ),
+      4 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => false,
+  ),
+  62 => 
+  array (
+    'type' => 'text',
+    'text' => '*0123456789*',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 52,
+      1 => 123,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1788 - 0
tests/Zend/Barcode/Object/_files/Code39_0123456789_instructions.php

@@ -0,0 +1,1788 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 210,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 210,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 22,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 40,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 40,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 46,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 46,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 56,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 84,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 84,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 84,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 92,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 92,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 92,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 106,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 114,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 116,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 116,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 124,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 126,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 126,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 132,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 132,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 134,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 134,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 134,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 140,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 140,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 140,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 140,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 146,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 146,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 148,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 148,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 150,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 150,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 152,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 152,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 154,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 154,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 156,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 156,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 158,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 158,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 158,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 158,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 162,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 162,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 162,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 162,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 164,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 164,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 166,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 166,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 168,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 168,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 168,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 168,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 170,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 170,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 170,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 170,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 172,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 172,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 174,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 174,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 178,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 178,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 178,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 178,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 180,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 180,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 182,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 182,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 184,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 184,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 184,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 184,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 186,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 186,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 186,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 186,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 190,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 190,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 190,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 190,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  58 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 192,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 192,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 194,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 194,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  59 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 196,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 196,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 198,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 198,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  60 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 200,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 200,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 200,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 200,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  61 => 
+  array (
+    'type' => 'text',
+    'text' => '*0123456789*',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 105,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1788 - 0
tests/Zend/Barcode/Object/_files/Code39_0123456789_oriented_instructions.php

@@ -0,0 +1,1788 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 105,
+        1 => 211,
+      ),
+      3 => 
+      array (
+        0 => 157,
+        1 => 181,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+      1 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 44,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 19,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      3 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+      1 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 34,
+      ),
+      1 => 
+      array (
+        0 => 29,
+        1 => 59,
+      ),
+      2 => 
+      array (
+        0 => 29,
+        1 => 59,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 34,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 39,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 75,
+        1 => 39,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 45,
+      ),
+      1 => 
+      array (
+        0 => 35,
+        1 => 70,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 70,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 45,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 37,
+        1 => 73,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 48,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+      1 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 85,
+        1 => 57,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 82,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 82,
+      ),
+      3 => 
+      array (
+        0 => 85,
+        1 => 57,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 72,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 97,
+      ),
+      2 => 
+      array (
+        0 => 51,
+        1 => 97,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 72,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      3 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+      1 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 98,
+        1 => 79,
+      ),
+      1 => 
+      array (
+        0 => 55,
+        1 => 104,
+      ),
+      2 => 
+      array (
+        0 => 55,
+        1 => 104,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 79,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 109,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 84,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 105,
+        1 => 91,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 116,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      3 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 109,
+        1 => 98,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 123,
+      ),
+      2 => 
+      array (
+        0 => 67,
+        1 => 125,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 100,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 107,
+      ),
+      1 => 
+      array (
+        0 => 71,
+        1 => 132,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 134,
+      ),
+      3 => 
+      array (
+        0 => 115,
+        1 => 109,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      2 => 
+      array (
+        0 => 75,
+        1 => 139,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 114,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 116,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 141,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 141,
+      ),
+      3 => 
+      array (
+        0 => 119,
+        1 => 116,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+      1 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 121,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 146,
+      ),
+      2 => 
+      array (
+        0 => 79,
+        1 => 146,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 121,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 125,
+        1 => 126,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 151,
+      ),
+      2 => 
+      array (
+        0 => 83,
+        1 => 153,
+      ),
+      3 => 
+      array (
+        0 => 126,
+        1 => 128,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 127,
+        1 => 129,
+      ),
+      1 => 
+      array (
+        0 => 84,
+        1 => 154,
+      ),
+      2 => 
+      array (
+        0 => 85,
+        1 => 156,
+      ),
+      3 => 
+      array (
+        0 => 128,
+        1 => 131,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 129,
+        1 => 133,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 158,
+      ),
+      2 => 
+      array (
+        0 => 87,
+        1 => 160,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 135,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 131,
+        1 => 136,
+      ),
+      1 => 
+      array (
+        0 => 88,
+        1 => 161,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 161,
+      ),
+      3 => 
+      array (
+        0 => 131,
+        1 => 136,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 133,
+        1 => 140,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 165,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 165,
+      ),
+      3 => 
+      array (
+        0 => 133,
+        1 => 140,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 142,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 167,
+      ),
+      2 => 
+      array (
+        0 => 92,
+        1 => 168,
+      ),
+      3 => 
+      array (
+        0 => 135,
+        1 => 143,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 136,
+        1 => 145,
+      ),
+      1 => 
+      array (
+        0 => 93,
+        1 => 170,
+      ),
+      2 => 
+      array (
+        0 => 93,
+        1 => 170,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 145,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 137,
+        1 => 147,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 172,
+      ),
+      2 => 
+      array (
+        0 => 94,
+        1 => 172,
+      ),
+      3 => 
+      array (
+        0 => 137,
+        1 => 147,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 148,
+      ),
+      1 => 
+      array (
+        0 => 95,
+        1 => 173,
+      ),
+      2 => 
+      array (
+        0 => 96,
+        1 => 175,
+      ),
+      3 => 
+      array (
+        0 => 139,
+        1 => 150,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 141,
+        1 => 154,
+      ),
+      1 => 
+      array (
+        0 => 98,
+        1 => 179,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 179,
+      ),
+      3 => 
+      array (
+        0 => 141,
+        1 => 154,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 142,
+        1 => 155,
+      ),
+      1 => 
+      array (
+        0 => 99,
+        1 => 180,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 182,
+      ),
+      3 => 
+      array (
+        0 => 143,
+        1 => 157,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 159,
+      ),
+      1 => 
+      array (
+        0 => 101,
+        1 => 184,
+      ),
+      2 => 
+      array (
+        0 => 101,
+        1 => 184,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 159,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 145,
+        1 => 161,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 186,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 186,
+      ),
+      3 => 
+      array (
+        0 => 145,
+        1 => 161,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 147,
+        1 => 164,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 189,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 189,
+      ),
+      3 => 
+      array (
+        0 => 147,
+        1 => 164,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  58 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 148,
+        1 => 166,
+      ),
+      1 => 
+      array (
+        0 => 105,
+        1 => 191,
+      ),
+      2 => 
+      array (
+        0 => 106,
+        1 => 193,
+      ),
+      3 => 
+      array (
+        0 => 149,
+        1 => 168,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  59 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 150,
+        1 => 169,
+      ),
+      1 => 
+      array (
+        0 => 107,
+        1 => 194,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 196,
+      ),
+      3 => 
+      array (
+        0 => 151,
+        1 => 171,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  60 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 152,
+        1 => 173,
+      ),
+      1 => 
+      array (
+        0 => 109,
+        1 => 198,
+      ),
+      2 => 
+      array (
+        0 => 109,
+        1 => 198,
+      ),
+      3 => 
+      array (
+        0 => 152,
+        1 => 173,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  61 => 
+  array (
+    'type' => 'text',
+    'text' => '*0123456789*',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 53,
+      1 => 121,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1953 - 0
tests/Zend/Barcode/Object/_files/Code39_0123456789_stretchtext_instructions.php

@@ -0,0 +1,1953 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 210,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 210,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 22,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 40,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 40,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 46,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 46,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 56,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 84,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 84,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 84,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 92,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 92,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 92,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 106,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 114,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 116,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 116,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 124,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 126,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 126,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 132,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 132,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 134,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 134,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 134,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 140,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 140,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 140,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 140,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 146,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 146,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 148,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 148,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 150,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 150,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 152,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 152,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 154,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 154,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 156,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 156,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 158,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 158,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 158,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 158,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 162,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 162,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 162,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 162,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 164,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 164,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 166,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 166,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 168,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 168,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 168,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 168,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 170,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 170,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 170,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 170,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 172,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 172,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 174,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 174,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 178,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 178,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 178,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 178,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 180,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 180,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 182,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 182,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 184,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 184,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 184,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 184,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 186,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 186,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 186,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 186,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 190,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 190,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 190,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 190,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  58 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 192,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 192,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 194,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 194,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  59 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 196,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 196,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 198,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 198,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  60 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 200,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 200,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 200,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 200,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  61 => 
+  array (
+    'type' => 'text',
+    'text' => '*',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 17,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  62 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 33,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  63 => 
+  array (
+    'type' => 'text',
+    'text' => '1',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 49,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  64 => 
+  array (
+    'type' => 'text',
+    'text' => '2',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 65,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  65 => 
+  array (
+    'type' => 'text',
+    'text' => '3',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 81,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  66 => 
+  array (
+    'type' => 'text',
+    'text' => '4',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 97,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  67 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 113,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  68 => 
+  array (
+    'type' => 'text',
+    'text' => '6',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 129,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  69 => 
+  array (
+    'type' => 'text',
+    'text' => '7',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 145,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  70 => 
+  array (
+    'type' => 'text',
+    'text' => '8',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 161,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  71 => 
+  array (
+    'type' => 'text',
+    'text' => '9',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 177,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  72 => 
+  array (
+    'type' => 'text',
+    'text' => '*',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 193,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1953 - 0
tests/Zend/Barcode/Object/_files/Code39_0123456789_stretchtext_oriented_instructions.php

@@ -0,0 +1,1953 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 105,
+        1 => 211,
+      ),
+      3 => 
+      array (
+        0 => 157,
+        1 => 181,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+      1 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 44,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 19,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      3 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+      1 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 34,
+      ),
+      1 => 
+      array (
+        0 => 29,
+        1 => 59,
+      ),
+      2 => 
+      array (
+        0 => 29,
+        1 => 59,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 34,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 39,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 75,
+        1 => 39,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 45,
+      ),
+      1 => 
+      array (
+        0 => 35,
+        1 => 70,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 70,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 45,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 37,
+        1 => 73,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 48,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+      1 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 85,
+        1 => 57,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 82,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 82,
+      ),
+      3 => 
+      array (
+        0 => 85,
+        1 => 57,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 72,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 97,
+      ),
+      2 => 
+      array (
+        0 => 51,
+        1 => 97,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 72,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      3 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+      1 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 98,
+        1 => 79,
+      ),
+      1 => 
+      array (
+        0 => 55,
+        1 => 104,
+      ),
+      2 => 
+      array (
+        0 => 55,
+        1 => 104,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 79,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 109,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 84,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 105,
+        1 => 91,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 116,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      3 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 109,
+        1 => 98,
+      ),
+      1 => 
+      array (
+        0 => 66,
+        1 => 123,
+      ),
+      2 => 
+      array (
+        0 => 67,
+        1 => 125,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 100,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 114,
+        1 => 107,
+      ),
+      1 => 
+      array (
+        0 => 71,
+        1 => 132,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 134,
+      ),
+      3 => 
+      array (
+        0 => 115,
+        1 => 109,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      2 => 
+      array (
+        0 => 75,
+        1 => 139,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 114,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 116,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 141,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 141,
+      ),
+      3 => 
+      array (
+        0 => 119,
+        1 => 116,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+      1 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 121,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 146,
+      ),
+      2 => 
+      array (
+        0 => 79,
+        1 => 146,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 121,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  43 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  44 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 125,
+        1 => 126,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 151,
+      ),
+      2 => 
+      array (
+        0 => 83,
+        1 => 153,
+      ),
+      3 => 
+      array (
+        0 => 126,
+        1 => 128,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  45 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 127,
+        1 => 129,
+      ),
+      1 => 
+      array (
+        0 => 84,
+        1 => 154,
+      ),
+      2 => 
+      array (
+        0 => 85,
+        1 => 156,
+      ),
+      3 => 
+      array (
+        0 => 128,
+        1 => 131,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  46 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 129,
+        1 => 133,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 158,
+      ),
+      2 => 
+      array (
+        0 => 87,
+        1 => 160,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 135,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  47 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 131,
+        1 => 136,
+      ),
+      1 => 
+      array (
+        0 => 88,
+        1 => 161,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 161,
+      ),
+      3 => 
+      array (
+        0 => 131,
+        1 => 136,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  48 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 133,
+        1 => 140,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 165,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 165,
+      ),
+      3 => 
+      array (
+        0 => 133,
+        1 => 140,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  49 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 142,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 167,
+      ),
+      2 => 
+      array (
+        0 => 92,
+        1 => 168,
+      ),
+      3 => 
+      array (
+        0 => 135,
+        1 => 143,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  50 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 136,
+        1 => 145,
+      ),
+      1 => 
+      array (
+        0 => 93,
+        1 => 170,
+      ),
+      2 => 
+      array (
+        0 => 93,
+        1 => 170,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 145,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  51 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 137,
+        1 => 147,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 172,
+      ),
+      2 => 
+      array (
+        0 => 94,
+        1 => 172,
+      ),
+      3 => 
+      array (
+        0 => 137,
+        1 => 147,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  52 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 148,
+      ),
+      1 => 
+      array (
+        0 => 95,
+        1 => 173,
+      ),
+      2 => 
+      array (
+        0 => 96,
+        1 => 175,
+      ),
+      3 => 
+      array (
+        0 => 139,
+        1 => 150,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  53 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 141,
+        1 => 154,
+      ),
+      1 => 
+      array (
+        0 => 98,
+        1 => 179,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 179,
+      ),
+      3 => 
+      array (
+        0 => 141,
+        1 => 154,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  54 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 142,
+        1 => 155,
+      ),
+      1 => 
+      array (
+        0 => 99,
+        1 => 180,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 182,
+      ),
+      3 => 
+      array (
+        0 => 143,
+        1 => 157,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  55 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 159,
+      ),
+      1 => 
+      array (
+        0 => 101,
+        1 => 184,
+      ),
+      2 => 
+      array (
+        0 => 101,
+        1 => 184,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 159,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  56 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 145,
+        1 => 161,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 186,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 186,
+      ),
+      3 => 
+      array (
+        0 => 145,
+        1 => 161,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  57 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 147,
+        1 => 164,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 189,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 189,
+      ),
+      3 => 
+      array (
+        0 => 147,
+        1 => 164,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  58 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 148,
+        1 => 166,
+      ),
+      1 => 
+      array (
+        0 => 105,
+        1 => 191,
+      ),
+      2 => 
+      array (
+        0 => 106,
+        1 => 193,
+      ),
+      3 => 
+      array (
+        0 => 149,
+        1 => 168,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  59 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 150,
+        1 => 169,
+      ),
+      1 => 
+      array (
+        0 => 107,
+        1 => 194,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 196,
+      ),
+      3 => 
+      array (
+        0 => 151,
+        1 => 171,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  60 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 152,
+        1 => 173,
+      ),
+      1 => 
+      array (
+        0 => 109,
+        1 => 198,
+      ),
+      2 => 
+      array (
+        0 => 109,
+        1 => 198,
+      ),
+      3 => 
+      array (
+        0 => 152,
+        1 => 173,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  61 => 
+  array (
+    'type' => 'text',
+    'text' => '*',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 9,
+      1 => 45,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  62 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 17,
+      1 => 59,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  63 => 
+  array (
+    'type' => 'text',
+    'text' => '1',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 25,
+      1 => 73,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  64 => 
+  array (
+    'type' => 'text',
+    'text' => '2',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 33,
+      1 => 86,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  65 => 
+  array (
+    'type' => 'text',
+    'text' => '3',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 41,
+      1 => 100,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  66 => 
+  array (
+    'type' => 'text',
+    'text' => '4',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 49,
+      1 => 114,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  67 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 57,
+      1 => 128,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  68 => 
+  array (
+    'type' => 'text',
+    'text' => '6',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 65,
+      1 => 142,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  69 => 
+  array (
+    'type' => 'text',
+    'text' => '7',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 73,
+      1 => 155,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  70 => 
+  array (
+    'type' => 'text',
+    'text' => '8',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 81,
+      1 => 169,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  71 => 
+  array (
+    'type' => 'text',
+    'text' => '9',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 89,
+      1 => 183,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  72 => 
+  array (
+    'type' => 'text',
+    'text' => '*',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 97,
+      1 => 197,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 34 - 0
tests/Zend/Barcode/Object/_files/Error_errortext_instructions.php

@@ -0,0 +1,34 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'text',
+    'text' => 'ERROR:',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 5,
+      1 => 18,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'left',
+    'orientation' => 0,
+  ),
+  1 => 
+  array (
+    'type' => 'text',
+    'text' => 'This is an error text',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 5,
+      1 => 32,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'left',
+    'orientation' => 0,
+  ),
+);

+ 947 - 0
tests/Zend/Barcode/Object/_files/Int25_0123456789_bearerbar_instructions.php

@@ -0,0 +1,947 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 118,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 22,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 46,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 56,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 106,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => -1,
+        1 => -1,
+      ),
+      1 => 
+      array (
+        0 => 118,
+        1 => -1,
+      ),
+      2 => 
+      array (
+        0 => 118,
+        1 => 2,
+      ),
+      3 => 
+      array (
+        0 => -1,
+        1 => 2,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 49,
+      ),
+      1 => 
+      array (
+        0 => 118,
+        1 => 49,
+      ),
+      2 => 
+      array (
+        0 => 118,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 0,
+        1 => 47,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 59,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 947 - 0
tests/Zend/Barcode/Object/_files/Int25_0123456789_bearerbar_oriented_instructions.php

@@ -0,0 +1,947 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 132,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 44,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 19,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+      1 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 39,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 48,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 73,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 84,
+        1 => 55,
+      ),
+      1 => 
+      array (
+        0 => 41,
+        1 => 80,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 82,
+      ),
+      3 => 
+      array (
+        0 => 85,
+        1 => 57,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 109,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 84,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      2 => 
+      array (
+        0 => 62,
+        1 => 116,
+      ),
+      3 => 
+      array (
+        0 => 105,
+        1 => 91,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 53,
+        1 => -1,
+      ),
+      1 => 
+      array (
+        0 => 112,
+        1 => 101,
+      ),
+      2 => 
+      array (
+        0 => 110,
+        1 => 103,
+      ),
+      3 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 24,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 126,
+      ),
+      2 => 
+      array (
+        0 => 71,
+        1 => 125,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 23,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 30,
+      1 => 81,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 923 - 0
tests/Zend/Barcode/Object/_files/Int25_0123456789_border_instructions.php

@@ -0,0 +1,923 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 120,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 11,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 11,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 11,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 11,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 13,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 13,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 13,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 13,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 15,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 15,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 19,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 19,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 21,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 23,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 25,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 27,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 27,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 29,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 29,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 29,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 29,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 33,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 33,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 37,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 39,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 43,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 43,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 45,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 45,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 45,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 47,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 47,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 49,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 51,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 51,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 51,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 55,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 55,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 55,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 55,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 63,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 65,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 65,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 67,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 67,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 71,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 71,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 73,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 75,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 79,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 83,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 83,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 87,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 89,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 91,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 95,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 95,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 95,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 97,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 99,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 103,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 103,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 105,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 105,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 107,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 107,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 109,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 109,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 109,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+      2 => 
+      array (
+        0 => 120,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 0,
+        1 => 64,
+      ),
+      4 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => false,
+  ),
+  31 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 60,
+      1 => 62,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 923 - 0
tests/Zend/Barcode/Object/_files/Int25_0123456789_border_oriented_instructions.php

@@ -0,0 +1,923 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => -2,
+        1 => 32,
+      ),
+      2 => 
+      array (
+        0 => 57,
+        1 => 135,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 11,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 36,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 36,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 11,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 13,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 38,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 38,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 13,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 16,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 41,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 41,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 16,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 18,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 43,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 45,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 20,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 22,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 47,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 48,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 23,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 25,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 25,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 29,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 54,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 54,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 29,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 32,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 57,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 59,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 34,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 37,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 62,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 62,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 37,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 39,
+      ),
+      1 => 
+      array (
+        0 => 31,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 39,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 41,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 66,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 67,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 42,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 44,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 69,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 69,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 44,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 48,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 73,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 73,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 48,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 49,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 74,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 76,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 55,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 80,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 80,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 55,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 84,
+        1 => 56,
+      ),
+      1 => 
+      array (
+        0 => 41,
+        1 => 81,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 83,
+      ),
+      3 => 
+      array (
+        0 => 85,
+        1 => 58,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 85,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 60,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 61,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 86,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 88,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 63,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 65,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 90,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 92,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 67,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 68,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 93,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 93,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 68,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 93,
+        1 => 72,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 97,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 97,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 72,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 75,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 100,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 79,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 104,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 104,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 79,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 82,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 107,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 107,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 82,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 84,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 109,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 89,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 114,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 114,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 89,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 91,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 116,
+      ),
+      2 => 
+      array (
+        0 => 62,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 105,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 94,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 119,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 119,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 94,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+      2 => 
+      array (
+        0 => 57,
+        1 => 135,
+      ),
+      3 => 
+      array (
+        0 => -2,
+        1 => 32,
+      ),
+      4 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => false,
+  ),
+  31 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 29,
+      1 => 83,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 889 - 0
tests/Zend/Barcode/Object/_files/Int25_0123456789_instructions.php

@@ -0,0 +1,889 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 118,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 22,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 46,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 56,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 106,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 59,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 889 - 0
tests/Zend/Barcode/Object/_files/Int25_0123456789_oriented_instructions.php

@@ -0,0 +1,889 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 132,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 44,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 19,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+      1 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 39,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 48,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 73,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 84,
+        1 => 55,
+      ),
+      1 => 
+      array (
+        0 => 41,
+        1 => 80,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 82,
+      ),
+      3 => 
+      array (
+        0 => 85,
+        1 => 57,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 109,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 84,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      2 => 
+      array (
+        0 => 62,
+        1 => 116,
+      ),
+      3 => 
+      array (
+        0 => 105,
+        1 => 91,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'text',
+    'text' => '0123456789',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 30,
+      1 => 81,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1024 - 0
tests/Zend/Barcode/Object/_files/Int25_0123456789_stretchtext_instructions.php

@@ -0,0 +1,1024 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 118,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 22,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 28,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 46,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 56,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 98,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 98,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 106,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 14,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  31 => 
+  array (
+    'type' => 'text',
+    'text' => '1',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 24,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  32 => 
+  array (
+    'type' => 'text',
+    'text' => '2',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 34,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  33 => 
+  array (
+    'type' => 'text',
+    'text' => '3',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 44,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  34 => 
+  array (
+    'type' => 'text',
+    'text' => '4',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 54,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  35 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 64,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  36 => 
+  array (
+    'type' => 'text',
+    'text' => '6',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 74,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  37 => 
+  array (
+    'type' => 'text',
+    'text' => '7',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 84,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  38 => 
+  array (
+    'type' => 'text',
+    'text' => '8',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 94,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  39 => 
+  array (
+    'type' => 'text',
+    'text' => '9',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 104,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1024 - 0
tests/Zend/Barcode/Object/_files/Int25_0123456789_stretchtext_oriented_instructions.php

@@ -0,0 +1,1024 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 132,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 44,
+      ),
+      3 => 
+      array (
+        0 => 63,
+        1 => 19,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+      1 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      2 => 
+      array (
+        0 => 23,
+        1 => 49,
+      ),
+      3 => 
+      array (
+        0 => 66,
+        1 => 24,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      3 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+      1 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 75,
+        1 => 39,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 48,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 73,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 84,
+        1 => 55,
+      ),
+      1 => 
+      array (
+        0 => 41,
+        1 => 80,
+      ),
+      2 => 
+      array (
+        0 => 42,
+        1 => 82,
+      ),
+      3 => 
+      array (
+        0 => 85,
+        1 => 57,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      3 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+      1 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 92,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 67,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      2 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      3 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+      1 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 109,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 84,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      2 => 
+      array (
+        0 => 62,
+        1 => 116,
+      ),
+      3 => 
+      array (
+        0 => 105,
+        1 => 91,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 8,
+      1 => 42,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  31 => 
+  array (
+    'type' => 'text',
+    'text' => '1',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 13,
+      1 => 51,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  32 => 
+  array (
+    'type' => 'text',
+    'text' => '2',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 18,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  33 => 
+  array (
+    'type' => 'text',
+    'text' => '3',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 23,
+      1 => 68,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  34 => 
+  array (
+    'type' => 'text',
+    'text' => '4',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 28,
+      1 => 77,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  35 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 33,
+      1 => 85,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  36 => 
+  array (
+    'type' => 'text',
+    'text' => '6',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 38,
+      1 => 94,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  37 => 
+  array (
+    'type' => 'text',
+    'text' => '7',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 42,
+      1 => 102,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  38 => 
+  array (
+    'type' => 'text',
+    'text' => '8',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 47,
+      1 => 111,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  39 => 
+  array (
+    'type' => 'text',
+    'text' => '9',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 52,
+      1 => 120,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1237 - 0
tests/Zend/Barcode/Object/_files/Itf14_0000123456789_bearerbar_instructions.php

@@ -0,0 +1,1237 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 154,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 154,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 30,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 30,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 64,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 112,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 112,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 114,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 114,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 126,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 126,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 128,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 128,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 134,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 140,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 140,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 142,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 142,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => -1,
+        1 => -1,
+      ),
+      1 => 
+      array (
+        0 => 154,
+        1 => -1,
+      ),
+      2 => 
+      array (
+        0 => 154,
+        1 => 2,
+      ),
+      3 => 
+      array (
+        0 => -1,
+        1 => 2,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 49,
+      ),
+      1 => 
+      array (
+        0 => 154,
+        1 => 49,
+      ),
+      2 => 
+      array (
+        0 => 154,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 0,
+        1 => 47,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'text',
+    'text' => '00001234567895',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 77,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1237 - 0
tests/Zend/Barcode/Object/_files/Itf14_0000123456789_bearerbar_oriented_instructions.php

@@ -0,0 +1,1237 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 163,
+      ),
+      3 => 
+      array (
+        0 => 129,
+        1 => 133,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+      1 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      2 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 67,
+        1 => 25,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 67,
+        1 => 25,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+      1 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 70,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 45,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+      1 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 41,
+        1 => 80,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 55,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      3 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+      1 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+      1 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+      1 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      2 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      3 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 96,
+      ),
+      1 => 
+      array (
+        0 => 65,
+        1 => 121,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 123,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 98,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 115,
+        1 => 109,
+      ),
+      1 => 
+      array (
+        0 => 72,
+        1 => 134,
+      ),
+      2 => 
+      array (
+        0 => 73,
+        1 => 135,
+      ),
+      3 => 
+      array (
+        0 => 116,
+        1 => 110,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      3 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 116,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 141,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 121,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 146,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 147,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 122,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 53,
+        1 => -1,
+      ),
+      1 => 
+      array (
+        0 => 130,
+        1 => 132,
+      ),
+      2 => 
+      array (
+        0 => 128,
+        1 => 134,
+      ),
+      3 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  41 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 24,
+      ),
+      1 => 
+      array (
+        0 => 87,
+        1 => 157,
+      ),
+      2 => 
+      array (
+        0 => 89,
+        1 => 156,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 23,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  42 => 
+  array (
+    'type' => 'text',
+    'text' => '00001234567895',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 39,
+      1 => 97,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1213 - 0
tests/Zend/Barcode/Object/_files/Itf14_0000123456789_border_instructions.php

@@ -0,0 +1,1213 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 64,
+      ),
+      2 => 
+      array (
+        0 => 156,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 156,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 11,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 11,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 11,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 11,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 13,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 13,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 13,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 13,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 15,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 15,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 17,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 17,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 17,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 17,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 19,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 19,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 21,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 21,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 25,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 27,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 27,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 31,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 31,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 31,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 33,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 33,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 35,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 35,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 35,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 37,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 37,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 39,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 43,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 45,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 45,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 49,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 49,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 49,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 51,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 51,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 53,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 55,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 55,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 55,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 55,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 61,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 63,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 65,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 69,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 71,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 73,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 75,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 75,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 77,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 77,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 83,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 83,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 83,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 87,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 87,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 89,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 91,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 91,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 91,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 91,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 95,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 97,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 101,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 101,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 101,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 101,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 103,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 103,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 105,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 105,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 105,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 105,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 109,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 109,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 109,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 111,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 111,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 111,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 113,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 115,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 115,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 119,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 121,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 123,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 123,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 123,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 127,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 127,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 129,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 129,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 131,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 131,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 131,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 131,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 135,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 135,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 137,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 137,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 139,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 139,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 139,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 139,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 141,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 141,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 143,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 143,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 145,
+        1 => 1,
+      ),
+      1 => 
+      array (
+        0 => 145,
+        1 => 51,
+      ),
+      2 => 
+      array (
+        0 => 145,
+        1 => 51,
+      ),
+      3 => 
+      array (
+        0 => 145,
+        1 => 1,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 156,
+        1 => 0,
+      ),
+      2 => 
+      array (
+        0 => 156,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 0,
+        1 => 64,
+      ),
+      4 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => false,
+  ),
+  41 => 
+  array (
+    'type' => 'text',
+    'text' => '00001234567895',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 78,
+      1 => 62,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1213 - 0
tests/Zend/Barcode/Object/_files/Itf14_0000123456789_border_oriented_instructions.php

@@ -0,0 +1,1213 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => -2,
+        1 => 32,
+      ),
+      2 => 
+      array (
+        0 => 75,
+        1 => 167,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 135,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 11,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 36,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 36,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 11,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 13,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 38,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 38,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 13,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 17,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 17,
+        1 => 40,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 15,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 16,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 41,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 43,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 18,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 22,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 47,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 48,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 23,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 67,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 24,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 67,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 29,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 54,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 54,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 29,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 30,
+      ),
+      1 => 
+      array (
+        0 => 26,
+        1 => 55,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 55,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 30,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 32,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 57,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 59,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 34,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 37,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 62,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 64,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 39,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 42,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 67,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 67,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 42,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 44,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 69,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 48,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 73,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 73,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 48,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 76,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 76,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 51,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 39,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 78,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 53,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 55,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 80,
+      ),
+      2 => 
+      array (
+        0 => 41,
+        1 => 81,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 56,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 60,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 85,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 86,
+      ),
+      3 => 
+      array (
+        0 => 87,
+        1 => 61,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 88,
+        1 => 63,
+      ),
+      1 => 
+      array (
+        0 => 45,
+        1 => 88,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 67,
+      ),
+      1 => 
+      array (
+        0 => 47,
+        1 => 92,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 92,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 67,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 92,
+        1 => 70,
+      ),
+      1 => 
+      array (
+        0 => 49,
+        1 => 95,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 95,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 70,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 93,
+        1 => 72,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 97,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 97,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 72,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 75,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 100,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 79,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 104,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 104,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 79,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 82,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 107,
+      ),
+      2 => 
+      array (
+        0 => 57,
+        1 => 109,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 84,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 87,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 112,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 112,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 87,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 89,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 114,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 114,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 89,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 91,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 116,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 116,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 91,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 94,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 119,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 119,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 94,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 96,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 121,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 121,
+      ),
+      3 => 
+      array (
+        0 => 107,
+        1 => 96,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 98,
+      ),
+      1 => 
+      array (
+        0 => 65,
+        1 => 123,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 125,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 100,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 103,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 128,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 107,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 132,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 132,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 107,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 115,
+        1 => 110,
+      ),
+      1 => 
+      array (
+        0 => 72,
+        1 => 135,
+      ),
+      2 => 
+      array (
+        0 => 73,
+        1 => 137,
+      ),
+      3 => 
+      array (
+        0 => 116,
+        1 => 112,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 117,
+        1 => 113,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 138,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 138,
+      ),
+      3 => 
+      array (
+        0 => 117,
+        1 => 113,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 117,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 142,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 120,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 145,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 145,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 120,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 122,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 147,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 149,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 124,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 126,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 151,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 151,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 126,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 130,
+        1 => 135,
+      ),
+      2 => 
+      array (
+        0 => 75,
+        1 => 167,
+      ),
+      3 => 
+      array (
+        0 => -2,
+        1 => 32,
+      ),
+      4 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => false,
+  ),
+  41 => 
+  array (
+    'type' => 'text',
+    'text' => '00001234567895',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 38,
+      1 => 98,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1179 - 0
tests/Zend/Barcode/Object/_files/Itf14_0000123456789_instructions.php

@@ -0,0 +1,1179 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 154,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 154,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 30,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 30,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 64,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 112,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 112,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 114,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 114,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 126,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 126,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 128,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 128,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 134,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 140,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 140,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 142,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 142,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'text',
+    'text' => '00001234567895',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 77,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1179 - 0
tests/Zend/Barcode/Object/_files/Itf14_0000123456789_oriented_instructions.php

@@ -0,0 +1,1179 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 163,
+      ),
+      3 => 
+      array (
+        0 => 129,
+        1 => 133,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+      1 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      2 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 67,
+        1 => 25,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 67,
+        1 => 25,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+      1 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 70,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 45,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+      1 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 41,
+        1 => 80,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 55,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      3 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+      1 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+      1 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+      1 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      2 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      3 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 96,
+      ),
+      1 => 
+      array (
+        0 => 65,
+        1 => 121,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 123,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 98,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 115,
+        1 => 109,
+      ),
+      1 => 
+      array (
+        0 => 72,
+        1 => 134,
+      ),
+      2 => 
+      array (
+        0 => 73,
+        1 => 135,
+      ),
+      3 => 
+      array (
+        0 => 116,
+        1 => 110,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      3 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 116,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 141,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 121,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 146,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 147,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 122,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'text',
+    'text' => '00001234567895',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 39,
+      1 => 97,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 1374 - 0
tests/Zend/Barcode/Object/_files/Itf14_0000123456789_stretchtext_instructions.php

@@ -0,0 +1,1374 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 0,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 60,
+      ),
+      2 => 
+      array (
+        0 => 154,
+        1 => 60,
+      ),
+      3 => 
+      array (
+        0 => 154,
+        1 => 0,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 10,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 10,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 12,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 12,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 14,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 16,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 18,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 20,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 20,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 24,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 26,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 30,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 30,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 30,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 32,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 32,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 34,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 34,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 36,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 38,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 42,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 42,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 44,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 48,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 48,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 50,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 52,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 54,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 58,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 62,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 62,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 64,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 70,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 72,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 72,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 76,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 80,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 82,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 86,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 88,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 88,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 90,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 94,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 94,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 96,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 100,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 102,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 104,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 108,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 108,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 110,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 110,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 112,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 112,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 114,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 114,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 118,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 118,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 120,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 122,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 122,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 126,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 126,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 128,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 128,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 130,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 130,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 134,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 134,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 136,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 136,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 138,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 138,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 140,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 140,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 142,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 142,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 144,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 144,
+        1 => 0,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 14,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  41 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 24,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  42 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 34,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  43 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 43,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  44 => 
+  array (
+    'type' => 'text',
+    'text' => '1',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 53,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  45 => 
+  array (
+    'type' => 'text',
+    'text' => '2',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 63,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  46 => 
+  array (
+    'type' => 'text',
+    'text' => '3',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 72,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  47 => 
+  array (
+    'type' => 'text',
+    'text' => '4',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 82,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  48 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 91,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  49 => 
+  array (
+    'type' => 'text',
+    'text' => '6',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 101,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  50 => 
+  array (
+    'type' => 'text',
+    'text' => '7',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 111,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  51 => 
+  array (
+    'type' => 'text',
+    'text' => '8',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 120,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  52 => 
+  array (
+    'type' => 'text',
+    'text' => '9',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 130,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+  53 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 140,
+      1 => 60,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => 0,
+  ),
+);

+ 1374 - 0
tests/Zend/Barcode/Object/_files/Itf14_0000123456789_stretchtext_oriented_instructions.php

@@ -0,0 +1,1374 @@
+<?php
+return
+array (
+  0 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 52,
+        1 => 0,
+      ),
+      1 => 
+      array (
+        0 => 0,
+        1 => 30,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 163,
+      ),
+      3 => 
+      array (
+        0 => 129,
+        1 => 133,
+      ),
+    ),
+    'color' => 16777215,
+    'filled' => true,
+  ),
+  1 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+      1 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      2 => 
+      array (
+        0 => 14,
+        1 => 33,
+      ),
+      3 => 
+      array (
+        0 => 57,
+        1 => 8,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  2 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+      1 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      2 => 
+      array (
+        0 => 15,
+        1 => 35,
+      ),
+      3 => 
+      array (
+        0 => 58,
+        1 => 10,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  3 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+      1 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      2 => 
+      array (
+        0 => 16,
+        1 => 37,
+      ),
+      3 => 
+      array (
+        0 => 59,
+        1 => 12,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  4 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+      1 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      2 => 
+      array (
+        0 => 17,
+        1 => 38,
+      ),
+      3 => 
+      array (
+        0 => 60,
+        1 => 13,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  5 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 61,
+        1 => 15,
+      ),
+      1 => 
+      array (
+        0 => 18,
+        1 => 40,
+      ),
+      2 => 
+      array (
+        0 => 19,
+        1 => 42,
+      ),
+      3 => 
+      array (
+        0 => 62,
+        1 => 17,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  6 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 64,
+        1 => 20,
+      ),
+      1 => 
+      array (
+        0 => 21,
+        1 => 45,
+      ),
+      2 => 
+      array (
+        0 => 22,
+        1 => 47,
+      ),
+      3 => 
+      array (
+        0 => 65,
+        1 => 22,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  7 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 67,
+        1 => 25,
+      ),
+      1 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      2 => 
+      array (
+        0 => 24,
+        1 => 50,
+      ),
+      3 => 
+      array (
+        0 => 67,
+        1 => 25,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  8 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+      1 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      2 => 
+      array (
+        0 => 25,
+        1 => 52,
+      ),
+      3 => 
+      array (
+        0 => 68,
+        1 => 27,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  9 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+      1 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      2 => 
+      array (
+        0 => 26,
+        1 => 54,
+      ),
+      3 => 
+      array (
+        0 => 69,
+        1 => 29,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  10 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 70,
+        1 => 31,
+      ),
+      1 => 
+      array (
+        0 => 27,
+        1 => 56,
+      ),
+      2 => 
+      array (
+        0 => 28,
+        1 => 57,
+      ),
+      3 => 
+      array (
+        0 => 71,
+        1 => 32,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  11 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 73,
+        1 => 36,
+      ),
+      1 => 
+      array (
+        0 => 30,
+        1 => 61,
+      ),
+      2 => 
+      array (
+        0 => 31,
+        1 => 63,
+      ),
+      3 => 
+      array (
+        0 => 74,
+        1 => 38,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  12 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+      1 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      2 => 
+      array (
+        0 => 33,
+        1 => 66,
+      ),
+      3 => 
+      array (
+        0 => 76,
+        1 => 41,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  13 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 77,
+        1 => 43,
+      ),
+      1 => 
+      array (
+        0 => 34,
+        1 => 68,
+      ),
+      2 => 
+      array (
+        0 => 35,
+        1 => 70,
+      ),
+      3 => 
+      array (
+        0 => 78,
+        1 => 45,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  14 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+      1 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      2 => 
+      array (
+        0 => 36,
+        1 => 71,
+      ),
+      3 => 
+      array (
+        0 => 79,
+        1 => 46,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  15 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+      1 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      2 => 
+      array (
+        0 => 38,
+        1 => 75,
+      ),
+      3 => 
+      array (
+        0 => 81,
+        1 => 50,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  16 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+      1 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      2 => 
+      array (
+        0 => 39,
+        1 => 76,
+      ),
+      3 => 
+      array (
+        0 => 82,
+        1 => 51,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  17 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 83,
+        1 => 53,
+      ),
+      1 => 
+      array (
+        0 => 40,
+        1 => 78,
+      ),
+      2 => 
+      array (
+        0 => 41,
+        1 => 80,
+      ),
+      3 => 
+      array (
+        0 => 84,
+        1 => 55,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  18 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 86,
+        1 => 58,
+      ),
+      1 => 
+      array (
+        0 => 43,
+        1 => 83,
+      ),
+      2 => 
+      array (
+        0 => 44,
+        1 => 85,
+      ),
+      3 => 
+      array (
+        0 => 87,
+        1 => 60,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  19 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 88,
+        1 => 62,
+      ),
+      1 => 
+      array (
+        0 => 45,
+        1 => 87,
+      ),
+      2 => 
+      array (
+        0 => 46,
+        1 => 89,
+      ),
+      3 => 
+      array (
+        0 => 89,
+        1 => 64,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  20 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+      1 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      2 => 
+      array (
+        0 => 47,
+        1 => 90,
+      ),
+      3 => 
+      array (
+        0 => 90,
+        1 => 65,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  21 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+      1 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      2 => 
+      array (
+        0 => 49,
+        1 => 94,
+      ),
+      3 => 
+      array (
+        0 => 92,
+        1 => 69,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  22 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+      1 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      2 => 
+      array (
+        0 => 50,
+        1 => 96,
+      ),
+      3 => 
+      array (
+        0 => 93,
+        1 => 71,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  23 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 95,
+        1 => 74,
+      ),
+      1 => 
+      array (
+        0 => 52,
+        1 => 99,
+      ),
+      2 => 
+      array (
+        0 => 53,
+        1 => 101,
+      ),
+      3 => 
+      array (
+        0 => 96,
+        1 => 76,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  24 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+      1 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      2 => 
+      array (
+        0 => 54,
+        1 => 102,
+      ),
+      3 => 
+      array (
+        0 => 97,
+        1 => 77,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  25 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 99,
+        1 => 81,
+      ),
+      1 => 
+      array (
+        0 => 56,
+        1 => 106,
+      ),
+      2 => 
+      array (
+        0 => 57,
+        1 => 108,
+      ),
+      3 => 
+      array (
+        0 => 100,
+        1 => 83,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  26 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+      1 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      2 => 
+      array (
+        0 => 59,
+        1 => 111,
+      ),
+      3 => 
+      array (
+        0 => 102,
+        1 => 86,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  27 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+      1 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      2 => 
+      array (
+        0 => 60,
+        1 => 113,
+      ),
+      3 => 
+      array (
+        0 => 103,
+        1 => 88,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  28 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+      1 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      2 => 
+      array (
+        0 => 61,
+        1 => 115,
+      ),
+      3 => 
+      array (
+        0 => 104,
+        1 => 90,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  29 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+      1 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      2 => 
+      array (
+        0 => 63,
+        1 => 118,
+      ),
+      3 => 
+      array (
+        0 => 106,
+        1 => 93,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  30 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+      1 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      2 => 
+      array (
+        0 => 64,
+        1 => 120,
+      ),
+      3 => 
+      array (
+        0 => 107,
+        1 => 95,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  31 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 108,
+        1 => 96,
+      ),
+      1 => 
+      array (
+        0 => 65,
+        1 => 121,
+      ),
+      2 => 
+      array (
+        0 => 66,
+        1 => 123,
+      ),
+      3 => 
+      array (
+        0 => 109,
+        1 => 98,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  32 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 111,
+        1 => 102,
+      ),
+      1 => 
+      array (
+        0 => 68,
+        1 => 127,
+      ),
+      2 => 
+      array (
+        0 => 69,
+        1 => 128,
+      ),
+      3 => 
+      array (
+        0 => 112,
+        1 => 103,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  33 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+      1 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      2 => 
+      array (
+        0 => 70,
+        1 => 130,
+      ),
+      3 => 
+      array (
+        0 => 113,
+        1 => 105,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  34 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 115,
+        1 => 109,
+      ),
+      1 => 
+      array (
+        0 => 72,
+        1 => 134,
+      ),
+      2 => 
+      array (
+        0 => 73,
+        1 => 135,
+      ),
+      3 => 
+      array (
+        0 => 116,
+        1 => 110,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  35 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+      1 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      2 => 
+      array (
+        0 => 74,
+        1 => 137,
+      ),
+      3 => 
+      array (
+        0 => 117,
+        1 => 112,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  36 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 119,
+        1 => 116,
+      ),
+      1 => 
+      array (
+        0 => 76,
+        1 => 141,
+      ),
+      2 => 
+      array (
+        0 => 77,
+        1 => 142,
+      ),
+      3 => 
+      array (
+        0 => 120,
+        1 => 117,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  37 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+      1 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      2 => 
+      array (
+        0 => 78,
+        1 => 144,
+      ),
+      3 => 
+      array (
+        0 => 121,
+        1 => 119,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  38 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 122,
+        1 => 121,
+      ),
+      1 => 
+      array (
+        0 => 79,
+        1 => 146,
+      ),
+      2 => 
+      array (
+        0 => 80,
+        1 => 147,
+      ),
+      3 => 
+      array (
+        0 => 123,
+        1 => 122,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  39 => 
+  array (
+    'type' => 'polygon',
+    'points' => 
+    array (
+      0 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+      1 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      2 => 
+      array (
+        0 => 81,
+        1 => 149,
+      ),
+      3 => 
+      array (
+        0 => 124,
+        1 => 124,
+      ),
+    ),
+    'color' => 0,
+    'filled' => true,
+  ),
+  40 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 8,
+      1 => 42,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  41 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 13,
+      1 => 51,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  42 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 17,
+      1 => 59,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  43 => 
+  array (
+    'type' => 'text',
+    'text' => '0',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 22,
+      1 => 67,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  44 => 
+  array (
+    'type' => 'text',
+    'text' => '1',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 27,
+      1 => 76,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  45 => 
+  array (
+    'type' => 'text',
+    'text' => '2',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 32,
+      1 => 84,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  46 => 
+  array (
+    'type' => 'text',
+    'text' => '3',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 37,
+      1 => 92,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  47 => 
+  array (
+    'type' => 'text',
+    'text' => '4',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 42,
+      1 => 101,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  48 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 46,
+      1 => 109,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  49 => 
+  array (
+    'type' => 'text',
+    'text' => '6',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 51,
+      1 => 117,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  50 => 
+  array (
+    'type' => 'text',
+    'text' => '7',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 56,
+      1 => 126,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  51 => 
+  array (
+    'type' => 'text',
+    'text' => '8',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 61,
+      1 => 134,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  52 => 
+  array (
+    'type' => 'text',
+    'text' => '9',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 66,
+      1 => 143,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+  53 => 
+  array (
+    'type' => 'text',
+    'text' => '5',
+    'size' => 10,
+    'position' => 
+    array (
+      0 => 70,
+      1 => 151,
+    ),
+    'font' => '',
+    'color' => 0,
+    'alignment' => 'center',
+    'orientation' => -60,
+  ),
+);

+ 124 - 0
tests/Zend/Barcode/Object/_fonts/COPYRIGHT.TXT

@@ -0,0 +1,124 @@
+Bitstream Vera Fonts Copyright
+
+The fonts have a generous copyright, allowing derivative works (as
+long as "Bitstream" or "Vera" are not in the names), and full
+redistribution (so long as they are not *sold* by themselves). They
+can be be bundled, redistributed and sold with any software.
+
+The fonts are distributed under the following copyright:
+
+Copyright
+=========
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
+Vera is a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute
+the Font Software, including without limitation the rights to use,
+copy, merge, publish, distribute, and/or sell copies of the Font
+Software, and to permit persons to whom the Font Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Bitstream" or the word "Vera".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the
+"Bitstream Vera" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
+SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font
+Software without prior written authorization from the Gnome Foundation
+or Bitstream Inc., respectively. For further information, contact:
+fonts at gnome dot org.
+
+Copyright FAQ
+=============
+
+   1. I don't understand the resale restriction... What gives?
+
+      Bitstream is giving away these fonts, but wishes to ensure its
+      competitors can't just drop the fonts as is into a font sale system
+      and sell them as is. It seems fair that if Bitstream can't make money
+      from the Bitstream Vera fonts, their competitors should not be able to
+      do so either. You can sell the fonts as part of any software package,
+      however.
+
+   2. I want to package these fonts separately for distribution and
+      sale as part of a larger software package or system.  Can I do so?
+
+      Yes. A RPM or Debian package is a "larger software package" to begin 
+      with, and you aren't selling them independently by themselves. 
+      See 1. above.
+
+   3. Are derivative works allowed?
+      Yes!
+
+   4. Can I change or add to the font(s)?
+      Yes, but you must change the name(s) of the font(s).
+
+   5. Under what terms are derivative works allowed?
+
+      You must change the name(s) of the fonts. This is to ensure the
+      quality of the fonts, both to protect Bitstream and Gnome. We want to
+      ensure that if an application has opened a font specifically of these
+      names, it gets what it expects (though of course, using fontconfig,
+      substitutions could still could have occurred during font
+      opening). You must include the Bitstream copyright. Additional
+      copyrights can be added, as per copyright law. Happy Font Hacking!
+
+   6. If I have improvements for Bitstream Vera, is it possible they might get 
+       adopted in future versions?
+
+      Yes. The contract between the Gnome Foundation and Bitstream has
+      provisions for working with Bitstream to ensure quality additions to
+      the Bitstream Vera font family. Please contact us if you have such
+      additions. Note, that in general, we will want such additions for the
+      entire family, not just a single font, and that you'll have to keep
+      both Gnome and Jim Lyles, Vera's designer, happy! To make sense to add
+      glyphs to the font, they must be stylistically in keeping with Vera's
+      design. Vera cannot become a "ransom note" font. Jim Lyles will be
+      providing a document describing the design elements used in Vera, as a
+      guide and aid for people interested in contributing to Vera.
+
+   7. I want to sell a software package that uses these fonts: Can I do so?
+
+      Sure. Bundle the fonts with your software and sell your software
+      with the fonts. That is the intent of the copyright.
+
+   8. If applications have built the names "Bitstream Vera" into them, 
+      can I override this somehow to use fonts of my choosing?
+
+      This depends on exact details of the software. Most open source
+      systems and software (e.g., Gnome, KDE, etc.) are now converting to
+      use fontconfig (see www.fontconfig.org) to handle font configuration,
+      selection and substitution; it has provisions for overriding font
+      names and subsituting alternatives. An example is provided by the
+      supplied local.conf file, which chooses the family Bitstream Vera for
+      "sans", "serif" and "monospace".  Other software (e.g., the XFree86
+      core server) has other mechanisms for font substitution.
+

+ 11 - 0
tests/Zend/Barcode/Object/_fonts/README.TXT

@@ -0,0 +1,11 @@
+Contained herin is the Bitstream Vera font family.
+
+The Copyright information is found in the COPYRIGHT.TXT file (along
+with being incoporated into the fonts themselves).
+
+The releases notes are found in the file "RELEASENOTES.TXT".
+
+We hope you enjoy Vera!
+
+                        Bitstream, Inc.
+			The Gnome Project

+ 162 - 0
tests/Zend/Barcode/Object/_fonts/RELEASENOTES.TXT

@@ -0,0 +1,162 @@
+Bitstream Vera Fonts - April 16, 2003
+=====================================
+
+The version number of these fonts is 1.10 to distinguish them from the
+beta test fonts.
+
+Note that the Vera copyright is incorporated in the fonts themselves.
+The License field in the fonts contains the copyright license as it
+appears below. The TrueType copyright field is not large enough to
+contain the full license, so the license is incorporated (as you might
+think if you thought about it) into the license field, which
+unfortunately can be obscure to find.  (In pfaedit, see: Element->Font
+Info->TTFNames->License).
+
+Our apologies for it taking longer to complete the fonts than planned.
+Beta testers requested a tighter line spacing (less leading) and Jim
+Lyles redesigned Vera's accents to bring its line spacing to more
+typical of other fonts.  This took additional time and effort.  Our
+thanks to Jim for this effort above and beyond the call of duty.
+
+There are four monospace and sans faces (normal, oblique, bold, bold
+oblique) and two serif faces (normal and bold). Fontconfig/Xft2 (see
+www.fontconfig.org) can artificially oblique the serif faces for you:
+this loses hinting and distorts the faces slightly, but is visibly
+different than normal and bold, and reasonably pleasing.
+
+On systems with fontconfig 2.0 or 2.1 installed, making your sans,
+serif and monospace fonts default to these fonts is very easy.  Just
+drop the file local.conf into your /etc/fonts directory.  This will
+make the Bitstream fonts your default fonts for all applications using
+fontconfig (if sans, serif, or monospace names are used, as they often
+are as default values in many desktops). The XML in local.conf may
+need modification to enable subpixel decimation, if appropriate,
+however, the commented out phrase does so for XFree86 4.3, in the case
+that the server does not have sufficient information to identify the
+use of a flat panel.  Fontconfig 2.2 adds Vera to the list of font
+families and will, by default use it as the default sans, serif and
+monospace fonts.
+
+During the testing of the final Vera fonts, we learned that screen
+fonts in general are only typically hinted to work correctly at
+integer pixel sizes.  Vera is coded internally for integer sizes only.
+We need to investigate further to see if there are commonly used fonts
+that are hinted to be rounded but are not rounded to integer sizes due
+to oversights in their coding.
+
+Most fonts work best at 8 pixels and below if anti-aliased only, as
+the amount of work required to hint well at smaller and smaller sizes
+becomes astronomical.  GASP tables are typically used to control
+whether hinting is used or not, but Freetype/Xft does not currently
+support GASP tables (which are present in Vera).
+
+To mitigate this problem, both for Vera and other fonts, there will be
+(very shortly) a new fontconfig 2.2 release that will, by default not
+apply hints if the size is below 8 pixels. if you should have a font
+that in fact has been hinted more agressively, you can use fontconfig
+to note this exception. We believe this should improve many hinted
+fonts in addition to Vera, though implemeting GASP support is likely
+the right long term solution.
+
+Font rendering in Gnome or KDE is the combination of algorithms in
+Xft2 and Freetype, along with hinting in the fonts themselves. It is
+vital to have sufficient information to disentangle problems that you
+may observe.
+
+Note that having your font rendering system set up correctly is vital
+to proper judgement of problems of the fonts:
+
+    * Freetype may or may not be configured to in ways that may
+      implement execution of possibly patented (in some parts of the world)
+      TrueType hinting algorithms, particularly at small sizes.  Best
+      results are obtained while using these algorithms.
+
+    * The freetype autohinter (used when the possibly patented
+      algorithms are not used) continues to improve with each release. If
+      you are using the autohinter, please ensure you are using an up to
+      date version of freetype before reporting problems.
+
+    * Please identify what version of freetype you are using in any
+      bug reports, and how your freetype is configured.
+
+    * Make sure you are not using the freetype version included in
+      XFree86 4.3, as it has bugs that significantly degrade most fonts,
+      including Vera. if you build XFree86 4.3 from source yourself, you may
+      have installed this broken version without intending it (as I
+      did). Vera was verified with the recently released Freetype 2.1.4. On
+      many systems, 'ldd" can be used to see which freetype shared library
+      is actually being used.
+
+    * Xft/X Render does not (yet) implement gamma correction.  This
+      causes significant problems rendering white text on a black background
+      (causing partial pixels to be insufficiently shaded) if the gamma of
+      your monitor has not been compensated for, and minor problems with
+      black text on a while background.  The program "xgamma" can be used to
+      set a gamma correction value in the X server's color pallette. Most
+      monitors have a gamma near 2.
+
+    * Note that the Vera family uses minimal delta hinting. Your
+      results on other systems when not used anti-aliased may not be
+      entirely satisfying. We are primarily interested in reports of
+      problems on open source systems implementing Xft2/fontconfig/freetype
+      (which implements antialiasing and hinting adjustements, and
+      sophisticated subpixel decimation on flatpanels).  Also, the
+      algorithms used by Xft2 adjust the hints to integer widths and the
+      results are crisper on open source systems than on Windows or
+      MacIntosh.
+
+    * Your fontconfig may (probably does) predate the release of
+      fontconfig 2.2, and you may see artifacts not present when the font is
+      used at very small sizes with hinting enabled. "vc-list -V" can be
+      used to see what version you have installed.
+
+We believe and hope that these fonts will resolve the problems
+reported during beta test.  The largest change is the reduction of
+leading (interline spacing), which had annoyed a number of people, and
+reduced Vera's utility for some applcations.  The Vera monospace font
+should also now make '0' and 'O' and '1' and 'l' more clearly
+distinguishable.
+
+The version of these fonts is version 1.10.  Fontconfig should be
+choosing the new version of the fonts if both the released fonts and
+beta test fonts are installed (though please discard them: they have
+names of form tt20[1-12]gn.ttf).  Note that older versions of
+fontconfig sometimes did not rebuild their cache correctly when new
+fonts are installed: please upgrade to fontconfig 2.2. "fc-cache -f"
+can be used to force rebuilding fontconfig's cache files.
+
+If you note problems, please send them to fonts at gnome dot org, with
+exactly which face and size and unicode point you observe the problem
+at. The xfd utility from XFree86 CVS may be useful for this (e.g. "xfd
+-fa sans").  A possibly more useful program to examine fonts at a
+variety of sizes is the "waterfall" program found in Keith Packard's
+CVS.
+
+        $ cvs -d :pserver:anoncvs@keithp.com:/local/src/CVS login
+        Logging in to :pserver:anoncvs@keithp.com:2401/local/src/CVS
+        CVS password: <hit return>
+        $ cvs -d :pserver:anoncvs@keithp.com:/local/src/CVS co waterfall
+        $ cd waterfall
+        $ xmkmf -a
+        $ make
+        # make install
+        # make install.man
+
+Again, please make sure you are running an up-to-date freetype, and
+that you are only examining integer sizes.
+
+Reporting Problems
+==================
+
+Please send problem reports to fonts at gnome org, with the following
+information:
+
+   1. Version of Freetype, Xft2 and fontconfig
+   2. Whether TT hinting is being used, or the autohinter
+   3. Application being used
+   4. Character/Unicode code point that has problems (if applicable)
+   5. Version of which operating system
+   6. Please include a screenshot, when possible.
+
+Please check the fonts list archives before reporting problems to cut
+down on duplication.

BIN
tests/Zend/Barcode/Object/_fonts/Vera.ttf


+ 347 - 0
tests/Zend/Barcode/Renderer/ImageTest.php

@@ -0,0 +1,347 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+require_once dirname(__FILE__) . '/TestCommon.php';
+
+require_once 'Zend/Barcode/Renderer/Image.php';
+
+require_once 'Zend/Barcode/Object/Code39.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Renderer_ImageTest extends Zend_Barcode_Renderer_TestCommon
+{
+
+    protected function _getRendererObject($options = null)
+    {
+        return new Zend_Barcode_Renderer_Image($options);
+    }
+
+    public function testType()
+    {
+        $this->assertSame('image', $this->_renderer->getType());
+    }
+
+    public function testGoodImageResource()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $imageResource = imagecreatetruecolor(1, 1);
+        $this->_renderer->setResource($imageResource);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testObjectImageResource()
+    {
+        $imageResource = new StdClass();
+        $this->_renderer->setResource($imageResource);
+    }
+
+    public function testGoodHeight()
+    {
+        $this->assertSame(0, $this->_renderer->getHeight());
+        $this->_renderer->setHeight(123);
+        $this->assertSame(123, $this->_renderer->getHeight());
+        $this->_renderer->setHeight(0);
+        $this->assertSame(0, $this->_renderer->getHeight());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadHeight()
+    {
+        $this->_renderer->setHeight(- 1);
+    }
+
+    public function testGoodWidth()
+    {
+        $this->assertSame(0, $this->_renderer->getWidth());
+        $this->_renderer->setWidth(123);
+        $this->assertSame(123, $this->_renderer->getWidth());
+        $this->_renderer->setWidth(0);
+        $this->assertSame(0, $this->_renderer->getWidth());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadWidth()
+    {
+        $this->_renderer->setWidth(- 1);
+    }
+
+    public function testAllowedImageType()
+    {
+        $types = array('gif' => 'gif' , 'jpg' => 'jpeg' , 'jpeg' => 'jpeg' ,
+                'png' => 'png');
+        foreach ($types as $type => $expectedType) {
+            $this->_renderer->setImageType($type);
+            $this->assertSame($expectedType,
+                    $this->_renderer->getImageType());
+        }
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testNonAllowedImageType()
+    {
+        $this->_renderer->setImageType('other');
+    }
+
+    public function testDrawReturnResource()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->_renderer->setBarcode($barcode);
+        $resource = $this->_renderer->draw();
+        $this->assertTrue(gettype($resource) == 'resource', 'Image must be a resource');
+        $this->assertTrue(get_resource_type($resource) == 'gd',
+                'Image must be a GD resource');
+    }
+
+    public function testDrawWithExistantResourceReturnResource()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->_renderer->setBarcode($barcode);
+        $imageResource = imagecreatetruecolor(500, 500);
+        $this->_renderer->setResource($imageResource);
+        $resource = $this->_renderer->draw();
+        $this->assertTrue(gettype($resource) == 'resource', 'Image must be a resource');
+        $this->assertTrue(get_resource_type($resource) == 'gd',
+                'Image must be a GD resource');
+        $this->assertSame($resource, $imageResource);
+    }
+
+    public function testGoodUserHeight()
+    {
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(61, $barcode->getHeight());
+        $this->_renderer->setBarcode($barcode);
+        $this->_renderer->setHeight(61);
+        $this->assertTrue($this->_renderer->checkParams());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadUserHeightLessThanBarcodeHeight()
+    {
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(61, $barcode->getHeight());
+        $this->_renderer->setBarcode($barcode);
+        $this->_renderer->setHeight(60);
+        $this->_renderer->checkParams();
+    }
+
+    public function testGoodUserWidth()
+    {
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(211, $barcode->getWidth());
+        $this->_renderer->setBarcode($barcode);
+        $this->_renderer->setWidth(211);
+        $this->assertTrue($this->_renderer->checkParams());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadUserWidthLessThanBarcodeWidth()
+    {
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(211, $barcode->getWidth());
+        $this->_renderer->setBarcode($barcode);
+        $this->_renderer->setWidth(210);
+        $this->_renderer->checkParams();
+    }
+
+    public function testGoodHeightOfUserResource()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(61, $barcode->getHeight());
+        $imageResource = imagecreatetruecolor(500, 61);
+        $this->_renderer->setResource($imageResource);
+        $this->_renderer->setBarcode($barcode);
+        $this->assertTrue($this->_renderer->checkParams());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadHeightOfUserResource()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(61, $barcode->getHeight());
+        $this->_renderer->setBarcode($barcode);
+        $imageResource = imagecreatetruecolor(500, 60);
+        $this->_renderer->setResource($imageResource);
+        $this->_renderer->checkParams();
+    }
+
+    public function testGoodWidthOfUserResource()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(211, $barcode->getWidth());
+        $imageResource = imagecreatetruecolor(211, 500);
+        $this->_renderer->setResource($imageResource);
+        $this->_renderer->setBarcode($barcode);
+        $this->assertTrue($this->_renderer->checkParams());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadWidthOfUserResource()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(211, $barcode->getWidth());
+        $this->_renderer->setBarcode($barcode);
+        $imageResource = imagecreatetruecolor(210, 500);
+        $this->_renderer->setResource($imageResource);
+        $this->_renderer->checkParams();
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testNoFontWithOrientation()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        Zend_Barcode::setBarcodeFont('');
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $barcode->setOrientation(1);
+        $this->_renderer->setBarcode($barcode);
+        $this->_renderer->draw();
+    }
+
+    protected function _getRendererWithWidth500AndHeight300()
+    {
+        return $this->_renderer->setHeight(300)->setWidth(500);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testRendererWithUnkownInstructionProvideByObject()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        parent::testRendererWithUnkownInstructionProvideByObject();
+    }
+
+    public function testHorizontalPositionToLeft()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        parent::testHorizontalPositionToLeft();
+    }
+
+    public function testHorizontalPositionToCenter()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        parent::testHorizontalPositionToCenter();
+    }
+
+    public function testHorizontalPositionToRight()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        parent::testHorizontalPositionToRight();
+    }
+
+    public function testVerticalPositionToTop()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        parent::testVerticalPositionToTop();
+    }
+
+    public function testVerticalPositionToMiddle()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        parent::testVerticalPositionToMiddle();
+    }
+
+    public function testVerticalPositionToBottom()
+    {
+        if (! extension_loaded('gd')) {
+            $this->markTestSkipped(
+                    'GD extension is required to run this test');
+        }
+        parent::testVerticalPositionToBottom();
+    }
+}

+ 144 - 0
tests/Zend/Barcode/Renderer/PdfTest.php

@@ -0,0 +1,144 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+require_once dirname(__FILE__) . '/TestCommon.php';
+
+require_once 'Zend/Barcode/Renderer/Pdf.php';
+
+require_once 'Zend/Pdf.php';
+
+require_once 'Zend/Barcode/Object/Code39.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Barcode_Renderer_PdfTest extends Zend_Barcode_Renderer_TestCommon
+{
+
+    protected function _getRendererObject($options = null)
+    {
+        return new Zend_Barcode_Renderer_Pdf($options);
+    }
+
+    public function testType()
+    {
+        $this->assertSame('pdf', $this->_renderer->getType());
+    }
+
+    public function testGoodPdfResource()
+    {
+        $pdfResource = new Zend_Pdf();
+        $this->_renderer->setResource($pdfResource, 10);
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testObjectPdfResource()
+    {
+        $pdfResource = new StdClass();
+        $this->_renderer->setResource($pdfResource);
+    }
+
+    public function testDrawReturnResource()
+    {
+        Zend_Barcode::setBarcodeFont(dirname(__FILE__) . '/../Object/_fonts/Vera.ttf');
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->_renderer->setBarcode($barcode);
+        $resource = $this->_renderer->draw();
+        $this->assertTrue($resource instanceof Zend_Pdf);
+        Zend_Barcode::setBarcodeFont('');
+    }
+
+    public function testDrawWithExistantResourceReturnResource()
+    {
+        Zend_Barcode::setBarcodeFont(dirname(__FILE__) . '/../Object/_fonts/Vera.ttf');
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->_renderer->setBarcode($barcode);
+        $pdfResource = new Zend_Pdf();
+        $this->_renderer->setResource($pdfResource);
+        $resource = $this->_renderer->draw();
+        $this->assertTrue($resource instanceof Zend_Pdf);
+        $this->assertSame($resource, $pdfResource);
+        Zend_Barcode::setBarcodeFont('');
+    }
+
+    protected function _getRendererWithWidth500AndHeight300()
+    {
+        $pdf = new Zend_Pdf();
+        $pdf->pages[] = new Zend_Pdf_Page('500:300:');
+        return $this->_renderer->setResource($pdf);
+    }
+
+    public function testHorizontalPositionToCenter()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(211, $barcode->getWidth());
+        $renderer->setBarcode($barcode);
+        $renderer->setHorizontalPosition('center');
+        $renderer->draw();
+        $this->assertEquals(197, $renderer->getLeftOffset());
+    }
+
+    public function testHorizontalPositionToRight()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(211, $barcode->getWidth());
+        $renderer->setBarcode($barcode);
+        $renderer->setHorizontalPosition('right');
+        $renderer->draw();
+        $this->assertEquals(394.5, $renderer->getLeftOffset());
+    }
+
+    public function testVerticalPositionToMiddle()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(61, $barcode->getHeight());
+        $renderer->setBarcode($barcode);
+        $renderer->setVerticalPosition('middle');
+        $renderer->draw();
+        $this->assertEquals(134, $renderer->getTopOffset());
+    }
+
+    public function testVerticalPositionToBottom()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(61, $barcode->getHeight());
+        $renderer->setBarcode($barcode);
+        $renderer->setVerticalPosition('bottom');
+        $renderer->draw();
+        $this->assertEquals(269.5, $renderer->getTopOffset());
+    }
+}

+ 310 - 0
tests/Zend/Barcode/Renderer/TestCommon.php

@@ -0,0 +1,310 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id$
+ */
+
+/**
+ * Test helper
+ */
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Barcode
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+abstract class Zend_Barcode_Renderer_TestCommon extends PHPUnit_Framework_TestCase
+{
+
+    /**
+     * @var Zend_Barcode_Renderer
+     */
+    protected $_renderer = null;
+
+    abstract protected function _getRendererObject($options = null);
+
+    public function setUp()
+    {
+        Zend_Barcode::setBarcodeFont(dirname(__FILE__) . '/../Object/_fonts/Vera.ttf');
+        $this->_renderer = $this->_getRendererObject();
+    }
+
+    public function tearDown()
+    {
+        Zend_Barcode::setBarcodeFont('');
+    }
+
+    public function testSetBarcodeObject()
+    {
+        require_once 'Zend/Barcode/Object/Code39.php';
+        $barcode = new Zend_Barcode_Object_Code39();
+        $this->_renderer->setBarcode($barcode);
+        $this->assertSame($barcode, $this->_renderer->getBarcode());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testSetInvalidBarcodeObject()
+    {
+        $barcode = new StdClass();
+        $this->_renderer->setBarcode($barcode);
+    }
+
+    public function testGoodModuleSize()
+    {
+        $this->_renderer->setModuleSize(2.34);
+        $this->assertSame(2.34, $this->_renderer->getModuleSize());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testModuleSizeAsString()
+    {
+        $this->_renderer->setModuleSize('abc');
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testModuleSizeLessThan0()
+    {
+        $this->_renderer->setModuleSize(-0.5);
+    }
+
+    public function testAutomaticRenderError()
+    {
+        $this->_renderer->setAutomaticRenderError(true);
+        $this->assertSame(true, $this->_renderer->getAutomaticRenderError());
+        $this->_renderer->setAutomaticRenderError(1);
+        $this->assertSame(true, $this->_renderer->getAutomaticRenderError());
+    }
+
+    public function testGoodHorizontalPosition()
+    {
+        foreach (array('left' , 'center' , 'right') as $position) {
+            $this->_renderer->setHorizontalPosition($position);
+            $this->assertSame($position,
+                    $this->_renderer->getHorizontalPosition());
+        }
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadHorizontalPosition()
+    {
+        $this->_renderer->setHorizontalPosition('none');
+    }
+
+    public function testGoodVerticalPosition()
+    {
+        foreach (array('top' , 'middle' , 'bottom') as $position) {
+            $this->_renderer->setVerticalPosition($position);
+            $this->assertSame($position,
+                    $this->_renderer->getVerticalPosition());
+        }
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadVerticalPosition()
+    {
+        $this->_renderer->setVerticalPosition('none');
+    }
+
+    public function testGoodLeftOffset()
+    {
+        $this->assertSame(0, $this->_renderer->getLeftOffset());
+        $this->_renderer->setLeftOffset(123);
+        $this->assertSame(123, $this->_renderer->getLeftOffset());
+        $this->_renderer->setLeftOffset(0);
+        $this->assertSame(0, $this->_renderer->getLeftOffset());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadLeftOffset()
+    {
+        $this->_renderer->setLeftOffset(- 1);
+    }
+
+    public function testGoodTopOffset()
+    {
+        $this->assertSame(0, $this->_renderer->getTopOffset());
+        $this->_renderer->setTopOffset(123);
+        $this->assertSame(123, $this->_renderer->getTopOffset());
+        $this->_renderer->setTopOffset(0);
+        $this->assertSame(0, $this->_renderer->getTopOffset());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBadTopOffset()
+    {
+        $this->_renderer->setTopOffset(- 1);
+    }
+
+    public function testConstructorWithArray()
+    {
+        $renderer = $this->_getRendererObject(
+                array('automaticRenderError' => true ,
+                        'unkownProperty' => 'aValue'));
+        $this->assertEquals(true, $renderer->getAutomaticRenderError());
+    }
+
+    public function testConstructorWithZendConfig()
+    {
+        $config = new Zend_Config(
+                array('automaticRenderError' => true ,
+                        'unkownProperty' => 'aValue'));
+        $renderer = $this->_getRendererObject($config);
+        $this->assertEquals(true, $renderer->getAutomaticRenderError());
+    }
+
+    public function testSetOptions()
+    {
+        $this->assertEquals(false, $this->_renderer->getAutomaticRenderError());
+        $this->_renderer->setOptions(
+                array('automaticRenderError' => true ,
+                        'unkownProperty' => 'aValue'));
+        $this->assertEquals(true, $this->_renderer->getAutomaticRenderError());
+    }
+
+    public function testSetConfig()
+    {
+        $this->assertEquals(false, $this->_renderer->getAutomaticRenderError());
+        $config = new Zend_Config(
+                array('automaticRenderError' => true ,
+                        'unkownProperty' => 'aValue'));
+        $this->_renderer->setConfig($config);
+        $this->assertEquals(true, $this->_renderer->getAutomaticRenderError());
+    }
+
+    public function testRendererNamespace()
+    {
+        $this->_renderer->setRendererNamespace('My_Namespace');
+        $this->assertEquals('My_Namespace', $this->_renderer->getRendererNamespace());
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testRendererWithUnkownInstructionProvideByObject()
+    {
+        require_once dirname(__FILE__) . '/../Object/_files/BarcodeTest.php';
+        $object = new Zend_Barcode_Object_Test();
+        $object->setText('test');
+        $object->addInstruction(array('type' => 'unknown'));
+        $this->_renderer->setBarcode($object);
+        $this->_renderer->draw();
+    }
+
+    /**
+     * @expectedException Zend_Barcode_Renderer_Exception
+     */
+    public function testBarcodeObjectProvided()
+    {
+        $this->_renderer->draw();
+    }
+
+    abstract public function testDrawReturnResource();
+
+    abstract public function testDrawWithExistantResourceReturnResource();
+
+    abstract protected function _getRendererWithWidth500AndHeight300();
+
+    public function testHorizontalPositionToLeft()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $renderer->setModuleSize(1);
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(211, $barcode->getWidth());
+        $renderer->setBarcode($barcode);
+        $renderer->draw();
+        $this->assertEquals(0, $renderer->getLeftOffset());
+    }
+
+    public function testHorizontalPositionToCenter()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $renderer->setModuleSize(1);
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(211, $barcode->getWidth());
+        $renderer->setBarcode($barcode);
+        $renderer->setHorizontalPosition('center');
+        $renderer->draw();
+        $this->assertEquals(144, $renderer->getLeftOffset());
+    }
+
+    public function testHorizontalPositionToRight()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $renderer->setModuleSize(1);
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(211, $barcode->getWidth());
+        $renderer->setBarcode($barcode);
+        $renderer->setHorizontalPosition('right');
+        $renderer->draw();
+        $this->assertEquals(289, $renderer->getLeftOffset());
+    }
+
+    public function testVerticalPositionToTop()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $renderer->setModuleSize(1);
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(61, $barcode->getHeight());
+        $renderer->setBarcode($barcode);
+        $renderer->setVerticalPosition('top');
+        $renderer->draw();
+        $this->assertEquals(0, $renderer->getTopOffset());
+    }
+
+    public function testVerticalPositionToMiddle()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $renderer->setModuleSize(1);
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(61, $barcode->getHeight());
+        $renderer->setBarcode($barcode);
+        $renderer->setVerticalPosition('middle');
+        $renderer->draw();
+        $this->assertEquals(119, $renderer->getTopOffset());
+    }
+
+    public function testVerticalPositionToBottom()
+    {
+        $renderer = $this->_getRendererWithWidth500AndHeight300();
+        $renderer->setModuleSize(1);
+        $barcode = new Zend_Barcode_Object_Code39(array('text' => '0123456789'));
+        $this->assertEquals(61, $barcode->getHeight());
+        $renderer->setBarcode($barcode);
+        $renderer->setVerticalPosition('bottom');
+        $renderer->draw();
+        $this->assertEquals(239, $renderer->getTopOffset());
+    }
+}

+ 11 - 0
tests/Zend/Barcode/Renderer/_files/RendererNamespace.php

@@ -0,0 +1,11 @@
+<?php
+require_once 'Zend/Barcode/Renderer/Image.php';
+
+class My_Namespace_Image extends Zend_Barcode_Renderer_Image
+{
+
+    public function getType()
+    {
+        return $this->_type;
+    }
+}

+ 4 - 0
tests/Zend/Barcode/Renderer/_files/RendererNamespaceWithoutExtendingRendererAbstract.php

@@ -0,0 +1,4 @@
+<?php
+
+class My_Namespace_Other_Image
+{}