odsPhpGenerator

SVN

r24 | lapinator | 2010-05-22 00:38:13
ADD: AUTHORS // me for the moment

For create rectangle in ods
ADD: odsDrawRect($x, $y, $width, $height, $odsStyleGraphic = null, $odsStyleParagraph = null)

ex:
$row = new odsTableRow();
$row->addCell( new odsTableCellDraw( new odsDrawRect("0cm","0cm","5cm","5cm") ) ) ;


// for create Gradien in Filled Draw
ADD: odsStyleGradient
ADD: |-> odsStyleGradientGradient1();
ADD: |-> odsStyleGradientGradient2();
ADD: |-> odsStyleGradientGradient3();
ADD: |-> odsStyleGradientGradient4();
ADD: |-> odsStyleGradientGradient5();
ADD: |-> odsStyleGradientGradient6();

ex:
$style = new odsStyleGraphic();
$style->setFillGradient( new odsStyleGradientGradient1() );
$table->addDraw($titi = new odsDrawRect("2cm","2cm","8cm","4cm", $style) );


// for create Hatching in filled Draw
ADD: odsStyleHatch
ADD: |-> odsStyleHatchBlack0Degrees();
ADD: |-> odsStyleHatchBlack45Degrees();
ADD: |-> odsStyleHatchBlackLess45Degrees();
ADD: |-> odsStyleHatchBlack90Degrees();
ADD: |-> odsStyleHatchRedCrossed45Degrees();
ADD: |-> odsStyleHatchRedCrossed0Degrees();
ADD: |-> odsStyleHatchBlueCrossed45Degrees();
ADD: |-> odsStyleHatchBlueCrossed0Degrees();
ADD: |-> odsStyleHatchBlueTriple90Degrees();

ex:
$style = new odsStyleGraphic();
$style->setFillHash( new odsStyleHatchBlueTriple90Degrees() );
$table->addDraw($titi = new odsDrawRect("2cm","2cm","8cm","4cm", $style) );


// for insert image into filled draw
// but this function is currently broken ods (only displays an error loading)
ADD: odsStyleFillImage($name, $file);

ex:
$style = new odsStyleGraphic();
$style->setFillImage( new odsStylefillImage("Sky","Sky.png") );
$table->addDraw($titi = new odsDrawRect("2cm","2cm","8cm","4cm", $style) );


UPD: many bug fix and thank Iribarren for find a little bug

r23 | lapinator | 2010-01-30 14:44:37
ADD: markers for Draw line
ADD: odsStyleGraphic->setMarkerEnd(odsStyleStrokeMarker)
ADD: odsStyleGraphic->setMarkerStart(odsStyleStrokeMarker)
ADD: odsStyleStrokeMarker($name, $displayName, $viewBox, $d)
ADD: |-> odsStyleStrokeMarkerArrow()
ADD: |-> odsStyleStrokeMarkerSquare()
ADD: |-> odsStyleStrokeMarkerNarrowArrow()
ADD: |-> odsStyleStrokeMarkerTipRating()
ADD: |-> odsStyleStrokeMarkerDoubleArrow()
ADD: |-> odsStyleStrokeMarkerSimetraArrow()
ADD: |-> odsStyleStrokeMarkerLineArrow()
ADD: |-> odsStyleStrokeMarkerRondNarrowArrow()
ADD: |-> odsStyleStrokeMarkerCircleArrow()
ADD: |-> odsStyleStrokeMarkerSquare45()
ADD: |-> odsStyleStrokeMarkerConcaveArrow()

Ex:
...
$maker1 = new odsStyleStrokeMarker('a','a','0 0 20 30','m10 0-10 30h20z');
$maker2 = new odsStyleStrokeMarkerConcaveArrow();

$style = new odsStyleGraphic();
$style->setMarkerStart($maker2);
$style->setMarkerEnd($maker1);
...
r22 | lapinator | 2010-01-30 12:47:30
UPD: odsDrawLine
UPD: odsDrawLine->setStroke($odsStyleStrokeDash)
ADD: odsStyleStrokeDash(...) // warning: subclass of this class can be renomed or deleted, it's fixed for 0.0.3
ADD: |-> odsStyleStrokeDashUltrafine();
ADD: |-> odsStyleStrokeDashUltrafineVar()
ADD: |-> odsStyleStrokeDashFine()
ADD: |-> odsStyleStrokeDashUltrafineAndDots()
ADD: |-> odsStyleStrokeDashFineDotted()
ADD: |-> odsStyleStrokeDashLineAndDot()
ADD: |-> odsStyleStrokeDash2Dots1Dash()
ADD: odsStyleGraphic->setStrokeWidth($strokeWidth)
ADD: odsStyleGraphic->setStrokeColor($strokeColor)
ADD: odsStyleParagraph()

Ex:
$style = new OdsStyleGraphic();
$style->setStroke(new odsStyleStrokeDash2Dots1Dash() );
$style->setStrokeColor('#0000FF');
$style->setStrokeWidth("0.1cm");
$table->addDraw(new odsDrawLine("0cm","0cm","10cm","10cm", $style) );
$row->addCell( new odsTableCellDraw( new odsDrawLine("0cm","0cm","5cm","5cm", $style) ));

r21 | lapinator | 2010-01-28 23:25:52
This is the first include of drawing in odsPhpGenerator

ADD: odsDraw for drowing line, box...
Actualy, only line is supported

The odsTableCellImage is broken in this commit

ex of drawing:

// add draw in table
$ods->addStyles(new odsStyleGraphicGeneric);
$table->addDraw(new odsDrawLine("0cm","0cm","10cm","10cm") );
$table->addDraw(new odsDrawLine("0cm","0cm","5cm","10cm") );

// add draw in cell
$row = new odsTableRow();
$row->addCell( new odsTableCellFloat(rand(0,50)));
// ...
$row->addCell( new odsTableCellDraw( new odsDrawLine("0cm","0cm","5cm","5cm") ));
$table->addRow($row);

r20 | lapinator | 2010-01-26 21:24:43
UPD: bugs in the generated ods fixed, The OOo 3.2 no error now