You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Yegor Kozlov <ye...@dinom.ru> on 2007/01/17 10:26:24 UTC
Re[2]: Slide BackgroundColor.......
>>Hi......I would to know if there is a way to extract a background color of a
>>slide?
Use the Fill object to get slide background:
Fill fill = slide.getBackground().getFill();
Color rgb = fill.getBackgroundColor();
>>But the color line is wrong...the only colors that matching are: red,blue...
>>the others are only black.......the RGB's jakarta is the same of the RGB's
>>Java?I need of a transformation????
Line.getLineColor should return the correct RGB value. Print RGB
components to stdout and see what's wrong.
If indeed only a few colors match, then create an issue in bugzilla and attach a
sample ppt.
Yegor
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: Re[2]: Slide BackgroundColor.......
Posted by qwerty_giggi <qw...@libero.it>.
I Have some problem with the Background color......I have a presentation with
three slides.....
Background Color:
- 1^ Slide: Blue;
- 2^ Slide: Automatic (White);
- 3^ Slide: White;
for (int i =1; i <= slide.length; i++)
Fill fill = slide[i].getBackground().getFill();
Color rgb = fill.getBackgroundColor();
System.out.println("BackgroundColorSlide"+i+" "+rgb); (**)
(**) BackgroundColorSlide1 null
BackgroundColorSlide2 java.awt.Color[r=51,g=51,b=153]
BackgroundColorSlide3 null
Why is color null?
--
View this message in context: http://www.nabble.com/Slide-BackgroundColor.......-tf3022194.html#a8506063
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: Re[2]: Slide BackgroundColor.......
Posted by qwerty_giggi <qw...@libero.it>.
Hi.....i have founded this file :
"poi-src-3.0-alpha3-20061212" I have used Ant for build it.......
the Fill class is recognize...but the bug is this:
Exception in thread "main" java.lang.ClassCastException:
org.apache.poi.hslf.record.Slide
at
org.apache.poi.hslf.usermodel.SlideShow.buildSlidesAndNotes(SlideShow.java:320)
at org.apache.poi.hslf.usermodel.SlideShow.<init>(SlideShow.java:121)
at Convert.main(Convert.java:37) [*]
With this file "poi-src-3.0-alpha2-20060616" the bug there isn't......
[*] SlideShow ppt = new SlideShow(new HSLFSlideShow("slideshow.ppt"));
qwerty_giggi wrote:
>
> The class Fill isn't recognize.......the release of Jakarta that I used
> is:
>
> "poi-src-3.0-alpha2-20060616"
>
> is there a new-release?
>
>
> Yegor Kozlov wrote:
>>
>>>>Hi......I would to know if there is a way to extract a background color
of a
>>>>slide?
>>
>> Use the Fill object to get slide background:
>>
>> Fill fill = slide.getBackground().getFill();
>> Color rgb = fill.getBackgroundColor();
>>
>>>>But the color line is wrong...the only colors that matching are:
red,blue...
>>>>the others are only black.......the RGB's jakarta is the same of the
RGB's
>>>>Java?I need of a transformation????
>>
>> Line.getLineColor should return the correct RGB value. Print RGB
>> components to stdout and see what's wrong.
>>
>> If indeed only a few colors match, then create an issue in bugzilla and
>> attach a
>> sample ppt.
>>
>> Yegor
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
>> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Slide-BackgroundColor.......-tf3022194.html#a8441373
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: Re[2]: Slide BackgroundColor.......
Posted by qwerty_giggi <qw...@libero.it>.
The class Fill isn't recognize.......the release of Jakarta that I used is:
"poi-src-3.0-alpha2-20060616"
is there a new-release?
Yegor Kozlov wrote:
>
>>>Hi......I would to know if there is a way to extract a background color
of a
>>>slide?
>
> Use the Fill object to get slide background:
>
> Fill fill = slide.getBackground().getFill();
> Color rgb = fill.getBackgroundColor();
>
>>>But the color line is wrong...the only colors that matching are:
red,blue...
>>>the others are only black.......the RGB's jakarta is the same of the
RGB's
>>>Java?I need of a transformation????
>
> Line.getLineColor should return the correct RGB value. Print RGB
> components to stdout and see what's wrong.
>
> If indeed only a few colors match, then create an issue in bugzilla and
> attach a
> sample ppt.
>
> Yegor
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
>
>
>
--
View this message in context: http://www.nabble.com/Slide-BackgroundColor.......-tf3022194.html#a8434264
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: Re[2]: Slide BackgroundColor.......
Posted by qwerty_giggi <qw...@libero.it>.
For the lines.....the stdout is....
ColorLine 0 java.awt.Color[r=1,g=0,b=0] (Black) [Match]
ColorLine 1 java.awt.Color[r=2,g=0,b=0] (Red) [Match]
ColorLine 2 java.awt.Color[r=7,g=0,b=0] (Grey) [No-Match]
ColorLine 3 java.awt.Color[r=6,g=0,b=0] (Sky-Blue) [No-Match]
ColorLine 4 java.awt.Color[r=5,g=0,b=0] (Blue)
[No-Match]
ColorLine 5 java.awt.Color[r=4,g=0,b=0] (Green)
[No-Match]
And the code is the same.....
for(int z=0;z<VectorLine.size();z++){ //Linee
java.awt.Rectangle anchor = VectorLine.elementAt(z).getAnchor();
Color color = VectorLine.elementAt(z).getLineColor();
System.out.println("ColorLine "+z+"
"+VectorLine.elementAt(z).getLineColor());
if (color != null){
g2.setColor(color);
float width = (float)VectorLine.elementAt(z).getLineWidth();
Stroke stroke = new BasicStroke(width);
g2.setStroke(stroke);
EscherSpRecord spRecord =
VectorLine.elementAt(z).getSpContainer().getChildById(EscherSpRecord.RECORD_ID);
boolean flipped = (spRecord.getFlags() &
EscherSpRecord.FLAG_FLIPVERT) != 0;
if (flipped)
g2.drawLine(anchor.x, anchor.y+anchor.height,
anchor.x+anchor.width, anchor.y);
else
g2.drawLine(anchor.x, anchor.y, anchor.x+anchor.width,
anchor.y+anchor.height);
}
}
Yegor Kozlov wrote:
>
>>>Hi......I would to know if there is a way to extract a background color
of a
>>>slide?
>
> Use the Fill object to get slide background:
>
> Fill fill = slide.getBackground().getFill();
> Color rgb = fill.getBackgroundColor();
>
>>>But the color line is wrong...the only colors that matching are:
red,blue...
>>>the others are only black.......the RGB's jakarta is the same of the
RGB's
>>>Java?I need of a transformation????
>
> Line.getLineColor should return the correct RGB value. Print RGB
> components to stdout and see what's wrong.
>
> If indeed only a few colors match, then create an issue in bugzilla and
> attach a
> sample ppt.
>
> Yegor
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
>
>
>
--
View this message in context: http://www.nabble.com/Slide-BackgroundColor.......-tf3022194.html#a8434759
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/