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
adb7397d71
commit
b892245d39
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user