Skip to content

Commit

Permalink
Improved the documentation about Table Shapes and cell width - GH-104
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Jun 24, 2015
1 parent e05c3a0 commit cf96dc8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
6 changes: 3 additions & 3 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ Frequently asked questions
==========================

Is this the same with PHPPowerPoint that I found in CodePlex?
-------------------------------------------------------
-------------------------------------------------------------

No. This one is much better with tons of new features that you can’t
find in PHPPowerPoint 0.1. The development in CodePlex is halted and
switched to GitHub to allow more participation from the crowd. The more
the merrier, right?

I’ve been running PHPPowerPoint from CodePlex flawlessly, but I can’t use the latest PHPPowerPoint from GitHub. Why?
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------

PHPPowerPoint requires PHP 5.3+ since 0.2, while PHPPowerPoint 0.1 from CodePlex
can run with PHP 5.2. There’s a lot of new features that we can get from
PHP 5.3 and it’s been around since 2009! You should upgrade your PHP
version to use PHPPowerPoint 0.2+.

Why am I getting a class not found error?
-------------------------------------------------------
-----------------------------------------

If you have followed the instructions for either adding this package to your
``composer.json`` or registering the autoloader, then perhaps you forgot to
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
contain the root `toctree` directive.
Welcome to PHPPowerPoint's documentation
==================================
========================================

|PHPPowerPoint|

Expand Down
1 change: 1 addition & 0 deletions docs/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ISO :
<http://standards.iso.org/ittf/PubliclyAvailableStandards/c061797_ISO_IEC_29500-3_2012.zip>`__
- `Part 4: Transitional Migration Features
<http://standards.iso.org/ittf/PubliclyAvailableStandards/c061798_ISO_IEC_29500-4_2012.zip>`__

MSDN :

- `PowerPoint Viewer <http://www.microsoft.com/en-US/download/details.aspx?id=13>`__
Expand Down
6 changes: 4 additions & 2 deletions docs/shapes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ Every shapes have common properties that you can set by using fluent interface.
- ``fill`` see *[Fill](#fill)*
- ``border`` see *[Border](#border)*
- ``shadow`` see *[Shadow](#shadow)*
- ``hyperlink`
- ``hyperlink``

Example:

.. code-block:: php
$richtext = $slide->createRichTextShape()
->setHeight(300)
->setWidth(600)
Expand Down Expand Up @@ -71,6 +72,7 @@ Drawing
To create a drawing, use `createDrawingShape` method of slide.

.. code-block:: php
$drawing = $slide->createDrawingShape();
$drawing->setName('Unique name')
->setDescription('Description of the drawing')
Expand All @@ -79,4 +81,4 @@ To create a drawing, use `createDrawingShape` method of slide.
Table
-------

The Table has now :shapes_table:`its own page`.
The Table has now :ref:`its own page <shapes_table>`.
2 changes: 1 addition & 1 deletion docs/shapes_table.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _shapes:
.. _shapes_table:

Tables
======
Expand Down
18 changes: 11 additions & 7 deletions docs/styles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ Styles
======

Fill
-------
----

Use this style to define fill of a shape as example below.

.. code-block:: php
$shape->getFill()
->setFillType(Fill::FILL_GRADIENT_LINEAR)
->setRotation(270)
Expand All @@ -23,11 +24,12 @@ Properties:
- ``endColor``

Border
-------
------

Use this style to define border of a shape as example below.

.. code-block:: php
$shape->getBorder()
->setLineStyle(Border::LINE_SINGLE)
->setLineWidth(4)
Expand All @@ -41,11 +43,12 @@ Properties:
- ``color``

Shadow
-------
------

Use this style to define shadow of a shape as example below.

.. code-block:: php
$shape->getShadow()
->setVisible(true)
->setDirection(45)
Expand All @@ -62,7 +65,7 @@ Properties:
- ``alpha``

Alignment
-------
---------

- ``horizontal``
- ``vertical``
Expand All @@ -72,7 +75,7 @@ Alignment
- ``marginRight``

Font
-------
----

- ``name``
- ``bold``
Expand All @@ -84,7 +87,7 @@ Font
- ``color``

Bullet
-------
------

- ``bulletType``
- ``bulletFont``
Expand All @@ -93,10 +96,11 @@ Bullet
- ``bulletNumericStartAt``

Color
-------
-----

Colors can be applied to different objects, e.g. font or border.

.. code-block:: php
$textRun = $shape->createTextRun('Text');
$textRun->getFont()->setColor(new Color('C00000'));

0 comments on commit cf96dc8

Please sign in to comment.