mirror of https://github.com/apache/poi.git
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:
parent
31d7d9d7b4
commit
b5e7f6e030
|
@ -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
|
* @see java.awt.Color
|
||||||
*/
|
*/
|
||||||
public void setFontColor(int rgb) {
|
public void setFontColor(int bgr) {
|
||||||
setCharTextPropVal("font.color", rgb);
|
setCharTextPropVal("font.color", bgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets color of the text, as a java.awt.Color
|
* Sets color of the text, as a java.awt.Color
|
||||||
*/
|
*/
|
||||||
public void setFontColor(Color 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();
|
int rgb = new Color(color.getBlue(), color.getGreen(), color.getRed(), 254).getRGB();
|
||||||
setFontColor(rgb);
|
setFontColor(rgb);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue