From cf96dc8156eb836a3affff5137b223e634c69b3d Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Wed, 24 Jun 2015 17:09:41 +0200 Subject: [PATCH] Improved the documentation about Table Shapes and cell width - GH-104 --- docs/faq.rst | 6 +++--- docs/index.rst | 2 +- docs/references.rst | 1 + docs/shapes.rst | 6 ++++-- docs/shapes_table.rst | 2 +- docs/styles.rst | 18 +++++++++++------- 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 36eeec6fc..0445d9da8 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -4,7 +4,7 @@ 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 @@ -12,7 +12,7 @@ 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 @@ -20,7 +20,7 @@ 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 diff --git a/docs/index.rst b/docs/index.rst index 76fdd53a0..43e5c9bbd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,7 +4,7 @@ contain the root `toctree` directive. Welcome to PHPPowerPoint's documentation -================================== +======================================== |PHPPowerPoint| diff --git a/docs/references.rst b/docs/references.rst index 081954b39..bea9c0cc4 100644 --- a/docs/references.rst +++ b/docs/references.rst @@ -18,6 +18,7 @@ ISO : `__ - `Part 4: Transitional Migration Features `__ + MSDN : - `PowerPoint Viewer `__ diff --git a/docs/shapes.rst b/docs/shapes.rst index 68a0e907b..8e31e0b75 100644 --- a/docs/shapes.rst +++ b/docs/shapes.rst @@ -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) @@ -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') @@ -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 `. diff --git a/docs/shapes_table.rst b/docs/shapes_table.rst index 519d57142..09dc88f82 100644 --- a/docs/shapes_table.rst +++ b/docs/shapes_table.rst @@ -1,4 +1,4 @@ -.. _shapes: +.. _shapes_table: Tables ====== diff --git a/docs/styles.rst b/docs/styles.rst index 30b5c2e63..727840162 100644 --- a/docs/styles.rst +++ b/docs/styles.rst @@ -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) @@ -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) @@ -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) @@ -62,7 +65,7 @@ Properties: - ``alpha`` Alignment -------- +--------- - ``horizontal`` - ``vertical`` @@ -72,7 +75,7 @@ Alignment - ``marginRight`` Font -------- +---- - ``name`` - ``bold`` @@ -84,7 +87,7 @@ Font - ``color`` Bullet -------- +------ - ``bulletType`` - ``bulletFont`` @@ -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'));