You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Randall Parker <ra...@nls.net> on 2004/03/30 05:07:01 UTC

Why does PDFGraphics2D constructor have protected access?

I have some simple piece of code (it will eventually become more complicated) that generates an unexpected error in JBuilder X:

class PrintManager
{

   public void toPDF()
   {
      org.apache.fop.svg.PDFGraphics2D PdfGr2d = new
         org.apache.fop.svg.PDFGraphics2D(false); // false is for textAsShapes
   }
}

The error: PDFGraphics2D(boolean) has protected access in org.apache.fop.svg.PDFGraphics2D

I'd check the javadocs if I could only find them to download (see my previous post). But why isn't this version of the constructor not publically accessible? Is it supposed to be?




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Why does PDFGraphics2D constructor have protected access?

Posted by Chris Bowditch <bo...@hotmail.com>.
Andreas L. Delmelle wrote:

>>What makes you think PDFGraphics2D should have a constructor with just a
>>boolean argument? What is it you are trying to achieve?
>>
> 
> 
> After a quick look..
> In 0.20.5 the stated constructor *is* still in the API, and declared public,
> for that matter.

Well, the svg package that contains the PDFGraphics2D class is one of the odd 
ones that doesnt have different versions for branch and trunk. Since 0.20.5 
was released, the Batik interface has changed and so the code in CVS now 
differs from the 0.20.5 distribution.

If you want to use the contructor with just a boolean argument then you need 
to use the 0.20.5 distribution along with the Batik jar thats supplied. Any 
other version of the Batik jar is likely to break your code.

Chris




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Code for c accent

Posted by Lucian Opris <lu...@bluematrix.com>.
Hi,
Does anybody know the unicode code for c accent ( c )?
Thanks


Lucian Opris


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Why does PDFGraphics2D constructor have protected access?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Randall Parker [mailto:randall2@nls.net]
>
> I'm using 0.20.5. But I'm just switching to that version having last
> worked on this program with a version of FOP from over 2 years ago.
> Previously I was using JBuilder v5 and the older FOP and now with
> JBuilder X (JDK 1.4.x) and the latest FOP I'm getting a compiler error
> where I previously didn't.
>
> I can switch to using the other constructor which has more arguments.

Well.. don't know if this would really make a difference, as basically the
same thing (a bit more) happens in there. Puzzles me a bit why you would get
an error like that.. I peeked around a bit and noticed the class in question
subclasses Batik's batik.ext.awt.g2d.AbstractGraphics2D.
The constructor you wanted to use does no more than call super() passing it
the supplied boolean. The superclass constructor is also defined as public
(in Batik 1.5 that is; maybe not in the version shipped with your FOP(?)),
and all *that* constructor does is set the value of the protected member
variable textAsShapes...

> Getting the source: Well, that is the next stop. I just started with the
binary version.

Yeah, that's what Open-Source is all about, not? Nose around, tweak it
yourself, and share the experience if it's any good..

Have fun!

Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Why does PDFGraphics2D constructor have protected access?

Posted by Randall Parker <ra...@nls.net>.
I'm using 0.20.5. But I'm just switching to that version having last worked on this program with a version of FOP from over 2 years ago. Previously I was using JBuilder v5 and the older FOP and 
now with JBuilder X (JDK 1.4.x) and the latest FOP I'm getting a compiler error where I previously didn't. 

I can switch to using the other constructor which has more arguments. 

Getting the source: Well, that is the next stop. I just started with the binary version.

On Tue, 30 Mar 2004 19:49:50 +0200, Andreas L. Delmelle wrote:

>> -----Original Message-----
>> From: Chris Bowditch [mailto:bowditch_chris@hotmail.com]
>>
>> Randall Parker wrote:
>>
>> <snip/>
>>
>> > I'd check the javadocs if I could only find them to download
>> (see my previous post). But why isn't this version of the
>> constructor not publically accessible? Is it supposed to be?
>>
>
>Hmm. Can't you just check the source? I don't think it is supposed to be
>like that, and AFAICT it also isn't.. What version are you using?
>
>> [Chris: ]
>> The constructors defined in Graphics2D are:
>>
><snip />
>> public PDFGraphics2D(boolean textAsShapes, Document fi, PDFDocument doc,
>>         PDFResourceContext page, String pref, String font, float size) {
>>
>>
>> What makes you think PDFGraphics2D should have a constructor with just a
>> boolean argument? What is it you are trying to achieve?
>>
>
>After a quick look..
>In 0.20.5 the stated constructor *is* still in the API, and declared public,
>for that matter.
>
>
>
>Cheers,
>
>Andreas
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: fop-user-help@xml.apache.org
>



RE: Why does PDFGraphics2D constructor have protected access?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Chris Bowditch [mailto:bowditch_chris@hotmail.com]
>
> Randall Parker wrote:
>
> <snip/>
>
> > I'd check the javadocs if I could only find them to download
> (see my previous post). But why isn't this version of the
> constructor not publically accessible? Is it supposed to be?
>

Hmm. Can't you just check the source? I don't think it is supposed to be
like that, and AFAICT it also isn't.. What version are you using?

> [Chris: ]
> The constructors defined in Graphics2D are:
>
<snip />
> public PDFGraphics2D(boolean textAsShapes, Document fi, PDFDocument doc,
>         PDFResourceContext page, String pref, String font, float size) {
>
>
> What makes you think PDFGraphics2D should have a constructor with just a
> boolean argument? What is it you are trying to achieve?
>

After a quick look..
In 0.20.5 the stated constructor *is* still in the API, and declared public,
for that matter.



Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Why does PDFGraphics2D constructor have protected access?

Posted by Chris Bowditch <bo...@hotmail.com>.
Randall Parker wrote:

<snip/>

> I'd check the javadocs if I could only find them to download (see my previous post). But why isn't this version of the constructor not publically accessible? Is it supposed to be?

The constructors defined in Graphics2D are:

public PDFGraphics2D(PDFGraphics2D g) {

/**
  * Create a new PDFGraphics2D with the given pdf document info.
  * This is used to create a Graphics object for use inside an already
  * existing document.
  *
  * @param textAsShapes if true then draw text as shapes
  * @param fi the current font information
  * @param doc the pdf document for creating pdf objects
  * @param page the current resource context or page
  * @param pref the PDF reference of the current page
  * @param font the current font name
  * @param size the current font size
  */
public PDFGraphics2D(boolean textAsShapes, Document fi, PDFDocument doc,
        PDFResourceContext page, String pref, String font, float size) {


What makes you think PDFGraphics2D should have a constructor with just a 
boolean argument? What is it you are trying to achieve?

Chris



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org