You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by ni...@apache.org on 2007/01/16 18:22:40 UTC
svn commit: r496782 -
/jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java
Author: nick
Date: Tue Jan 16 09:22:38 2007
New Revision: 496782
URL: http://svn.apache.org/viewvc?view=rev&rev=496782
Log:
Tweak comments and variable names, to make the wacky colour stuff as BGR not RGB clearer
Modified:
jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java
Modified: jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java?view=diff&rev=496782&r1=496781&r2=496782
==============================================================================
--- jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java (original)
+++ jakarta/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java Tue Jan 16 09:22:38 2007
@@ -347,18 +347,20 @@
}
/**
- * Sets color of the text, as a int rgb
+ * Sets color of the text, as a int bgr.
+ * (PowerPoint stores as BlueGreenRed, not the more
+ * usual RedGreenBlue)
* @see java.awt.Color
*/
- public void setFontColor(int rgb) {
- setCharTextPropVal("font.color", rgb);
+ public void setFontColor(int bgr) {
+ setCharTextPropVal("font.color", bgr);
}
/**
* Sets color of the text, as a java.awt.Color
*/
public void setFontColor(Color color) {
- //in PowerPont RGB bytes are swapped,
+ // In PowerPont RGB bytes are swapped, as BGR
int rgb = new Color(color.getBlue(), color.getGreen(), color.getRed(), 254).getRGB();
setFontColor(rgb);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/