Permalink
Browse files

Extra chart styling options added

git-svn-id: https://phppowerpoint.svn.codeplex.com/svn/trunk@62833 ffd33b8c-2492-42e0-bdc5-587b920b7d6d
  • Loading branch information...
1 parent b0bd8da commit 112700a45c018392dce4c8510e0426732da5293f @maartenba maartenba committed Jun 3, 2011
@@ -84,11 +84,43 @@ class PHPPowerPoint_Shape_Chart_Legend implements PHPPowerPoint_IComparable
*/
private $_height = 0;
+ /**
+ * Font
+ *
+ * @var PHPPowerPoint_Style_Font
+ */
+ private $_font;
+
+ /**
+ * Border
+ *
+ * @var PHPPowerPoint_Style_Border
+ */
+ private $_border;
+
+ /**
+ * Fill
+ *
+ * @var PHPPowerPoint_Style_Fill
+ */
+ private $_fill;
+
+ /**
+ * Alignment
+ *
+ * @var PHPPowerPoint_Style_Alignment
+ */
+ private $_alignment;
+
/**
* Create a new PHPPowerPoint_Shape_Chart_Legend instance
*/
public function __construct()
{
+ $this->_font = new PHPPowerPoint_Style_Font();
+ $this->_border = new PHPPowerPoint_Style_Border();
+ $this->_fill = new PHPPowerPoint_Style_Fill();
+ $this->_alignment = new PHPPowerPoint_Style_Alignment();
}
/**
@@ -212,6 +244,67 @@ public function setHeight($value = 0) {
}
/**
+ * Get font
+ *
+ * @return PHPPowerPoint_Style_Font
+ */
+ public function getFont() {
+ return $this->_font;
+ }
+
+ /**
+ * Set font
+ *
+ * @param PHPPowerPoint_Style_Font $pFont Font
+ * @throws Exception
+ * @return PHPPowerPoint_Shape_RichText_Paragraph
+ */
+ public function setFont(PHPPowerPoint_Style_Font $pFont = null) {
+ $this->_font = $pFont;
+ return $this;
+ }
+
+ /**
+ * Get Border
+ *
+ * @return PHPPowerPoint_Style_Border
+ */
+ public function getBorder() {
+ return $this->_border;
+ }
+
+ /**
+ * Get Fill
+ *
+ * @return PHPPowerPoint_Style_Fill
+ */
+ public function getFill() {
+ return $this->_fill;
+ }
+
+ /**
+ * Get alignment
+ *
+ * @return PHPPowerPoint_Style_Alignment
+ */
+ public function getAlignment()
+ {
+ return $this->_alignment;
+ }
+
+ /**
+ * Set alignment
+ *
+ * @param PHPPowerPoint_Style_Alignment $alignment
+ * @return PHPPowerPoint_Shape_RichText_Paragraph
+ */
+ public function setAlignment(PHPPowerPoint_Style_Alignment $alignment)
+ {
+ $this->_alignment = $alignment;
+ return $this;
+ }
+
+ /**
* Get hash code
*
* @return string Hash code
@@ -223,6 +316,10 @@ public function getHashCode() {
. $this->_offsetY
. $this->_width
. $this->_height
+ . $this->_font->getHashCode()
+ . $this->_border->getHashCode()
+ . $this->_fill->getHashCode()
+ . $this->_alignment->getHashCode()
. ($this->_visible ? 't' : 'f')
. __CLASS__
);
Oops, something went wrong.

0 comments on commit 112700a

Please sign in to comment.