From b5e7f6e030e292b57f7867a2b61565c7d324dc2f Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Tue, 16 Jan 2007 17:22:38 +0000 Subject: [PATCH] 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 --- .../src/org/apache/poi/hslf/usermodel/RichTextRun.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java index 4954b7e7b2..3fd9c95259 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/RichTextRun.java @@ -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); } -- 2.39.5