You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by Helder Magalhães <he...@gmail.com> on 2010/02/21 15:06:19 UTC

Re: Patch to reduce the size of generated ps

Hi Calixte,


> I wrote the attached patch to reduce the size of ps or eps file. I added basic shortcuts to postscript commands and gave an
> access to the property clippingDisabled. With these modifications (and in using the added method disableClipping) I can divide
> by 3 the size of eps files (generated from svg).

Thanks for your contribution. I'm not a EPS expert so I'm only leaving
a couple comments, mostly cosmetic.

1. Indentation issues.
A quick review of the patch shows that, in a couple files, tabs
instead of (4) spaces were used:
 * src/java/org/apache/xmlgraphics/ps/PSProcSets.java
 * src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java

2. Potential coherency improvement.
In:
> +	    gen.writeln("/f/fill ld");
> +	    gen.writeln("/S/stroke ld");
If "S" stands for "stroke", why is "f" being used for "fill"? Is it a
reserved keyword? If not, using the capitalized "F" would make things
more coherent IMO. There are also more places were this could also
apply, but I haven't reviewed the whole file... ;-)


> I'll be happy if you can push them for the next release.

As said, I'm no PostScript expert but, overall, the patch looks good
and safe to apply. :-)

It would be great if you could update your patch. ;-)


> Best regards,

Thanks,
 Helder

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: Patch to reduce the size of generated ps

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi Calixte,

Please can you open a Bugzilla issue and post your patch there? That
will allow us to better keep track of it.
https://issues.apache.org/bugzilla/enter_bug.cgi?product=XMLGraphicsCommons

Thanks,
Vincent


Calixte Denizet wrote:
> Dear Helder,
> 
> I suppressed the tabulations... and I cannot change /f for /F because the macro /F is already used.
> 
> Best regards,
> 
> Calixte
> 
> ----- Message d'origine -----
> De: Helder Magalhães <he...@gmail.com>
> Date: Dimanche, Février 21, 2010 3:07 pm
> Objet: Re: Patch to reduce the size of generated ps
> À: general@xmlgraphics.apache.org
> Cc: Calixte.Denizet@ac-rennes.fr
> 
> 
>> Hi Calixte,
>>
>>
>>> I wrote the attached patch to reduce the size of ps or eps file. I 
>> added basic shortcuts to postscript commands and gave an
>>> access to the property clippingDisabled. With these modifications 
>> (and in using the added method disableClipping) I can divide
>>> by 3 the size of eps files (generated from svg).
>> Thanks for your contribution. I'm not a EPS expert so I'm only leaving
>> a couple comments, mostly cosmetic.
>>
>> 1. Indentation issues.
>> A quick review of the patch shows that, in a couple files, tabs
>> instead of (4) spaces were used:
>>  * src/java/org/apache/xmlgraphics/ps/PSProcSets.java
>>  * src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
>>
>> 2. Potential coherency improvement.
>> In:
>>> +            gen.writeln("/f/fill ld");
>>> +            gen.writeln("/S/stroke ld");
>> If "S" stands for "stroke", why is "f" being used for "fill"? Is it a
>> reserved keyword? If not, using the capitalized "F" would make things
>> more coherent IMO. There are also more places were this could also
>> apply, but I haven't reviewed the whole file... ;-)
>>
>>
>>> I'll be happy if you can push them for the next release.
>> As said, I'm no PostScript expert but, overall, the patch looks good
>> and safe to apply. :-)
>>
>> It would be great if you could update your patch. ;-)
>>
>>
>>> Best regards,
>> Thanks,
>>  Helder

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re : Re: Patch to reduce the size of generated ps

Posted by Ca...@ac-rennes.fr.
Dear Helder,

I suppressed the tabulations... and I cannot change /f for /F because the macro /F is already used.

Best regards,

Calixte

----- Message d'origine -----
De: Helder Magalhães <he...@gmail.com>
Date: Dimanche, Février 21, 2010 3:07 pm
Objet: Re: Patch to reduce the size of generated ps
À: general@xmlgraphics.apache.org
Cc: Calixte.Denizet@ac-rennes.fr


> Hi Calixte,
> 
> 
> > I wrote the attached patch to reduce the size of ps or eps file. I 
> added basic shortcuts to postscript commands and gave an
> > access to the property clippingDisabled. With these modifications 
> (and in using the added method disableClipping) I can divide
> > by 3 the size of eps files (generated from svg).
> 
> Thanks for your contribution. I'm not a EPS expert so I'm only leaving
> a couple comments, mostly cosmetic.
> 
> 1. Indentation issues.
> A quick review of the patch shows that, in a couple files, tabs
> instead of (4) spaces were used:
>  * src/java/org/apache/xmlgraphics/ps/PSProcSets.java
>  * src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
> 
> 2. Potential coherency improvement.
> In:
> > +            gen.writeln("/f/fill ld");
> > +            gen.writeln("/S/stroke ld");
> If "S" stands for "stroke", why is "f" being used for "fill"? Is it a
> reserved keyword? If not, using the capitalized "F" would make things
> more coherent IMO. There are also more places were this could also
> apply, but I haven't reviewed the whole file... ;-)
> 
> 
> > I'll be happy if you can push them for the next release.
> 
> As said, I'm no PostScript expert but, overall, the patch looks good
> and safe to apply. :-)
> 
> It would be great if you could update your patch. ;-)
> 
> 
> > Best regards,
> 
> Thanks,
>  Helder
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: general-help@xmlgraphics.apache.org
>