Tweak comments and variable names, to make the wacky colour stuff as BGR not RGB clearer

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@496782 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2007-01-16 17:22:38 +00:00
parent 31d7d9d7b4
commit b5e7f6e030
1 changed files with 6 additions and 4 deletions

View File

@ -347,18 +347,20 @@ public class RichTextRun
}
/**
* 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);
}