PHPPresentation icon indicating copy to clipboard operation
PHPPresentation copied to clipboard

Using SHAPE FILL and SHADOW does not work properly

Open dookieffs opened this issue 8 years ago • 3 comments

Instead of adding shadow to richText as desired, shadow ends up on shape container with FILL value, IF I remove FILL, shadow behaves as expected.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

dookieffs avatar Mar 06 '17 14:03 dookieffs

@dookieffs Could you give us some sample code and screenshot ?

Progi1984 avatar Mar 06 '17 19:03 Progi1984

screenshot from 2017-03-07 09 17 53 screenshot from 2017-03-07 09 19 06

As you can see shadow is being applied to the fill of the shape, not the text.

sample code: 1)Part of the function that adds text, where $objTextShape is createRichTextShape instance

$objText = $objTextShape->getActiveParagraph()->createTextRun($strText);
$objFontInstance = $objText->getFont();
$objFontInstance->setSize($intSize)
	   ->setBold($boolBold)
	   ->setColor(new Color($strColor));   
if ($boolItalic) {
	$objFontInstance->setItalic(true);
}
if ($boolShadow){
        $objTextShape->getShadow()->setVisible(true)->setAlpha(75)->setBlurRadius(2)->setDirection(45);
}

2)part of the FILL shape function called before adding text:

$objFill = $objTextShape->getFill();
		
$objFill->setFillType($strFillStyle)
		->setRotation($intRotation)
		->setStartColor(new Color($strStartColor))
		->setEndColor(new Color($strEndColor));

dookieffs avatar Mar 07 '17 08:03 dookieffs

@dookieffs In LibreOffice, I can't create a shadow for the shape, and a shadow for a part of the text. Have you a sample file for me ? Thank you.

Progi1984 avatar Sep 08 '17 12:09 Progi1984