[JPP-Devel] Open (File) Plugin

2007-07-13 Thread Paul Austin
I'd like to propose some additional changes to the current way we load 
file based datasets and images.

Currently we have the following

- Load Dataset plugin which works for single layer file based formats 
(e.g. shp, gml)
- Add Image Layer (geotiff, jpg, mrsid, ecw)
- Add MrSid layer (mrsid)

I think that we need a single plugin in the File menu called Open File

This plugin would allow you to select one or more files to load in and 
then invoke the specific plugin to handle that kind of file. This would 
separate the file selection UI from the code to load that type of image.

The OpenFilePlugins would be registered in the registry and would have a 
description and list of supported file types that could be used by the 
main Open file plugin to generate the list of formats in the drop down.

If a file type has additional options that need to be selected these 
would be asked in a dialog for that plugin before it opens the files. 
There maybe a nice way to bundle all these options into a single dialog 
to simplify the user experience.

The open file plugin would take responsibility for unzipping any zip 
files and passing off the contents to the other plugins to load the 
appropriate files.

I'm going to have do an investigation and create a plugin to demonstrate 
this.

Paul

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] GeoJP2

2007-07-13 Thread Paul Austin
Has anyone done any work with GeoJP2 in Java or JUMP?

Paul

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] GeoJP2

2007-07-13 Thread Michaël Michaud
Paul Austin a écrit :

>Has anyone done any work with GeoJP2 in Java or JUMP?
>  
>
Not that I know, I think it would be a great replacement for ecw and 
mrsid which are proprietary formats

Michaël

>Paul
>
>-
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>___
>Jump-pilot-devel mailing list
>Jump-pilot-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>  
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] Image reprojection

2007-07-13 Thread Paul Austin
Has anyone done any work with the raster plugins to support reprojecting 
the images when loading/viewing in JUMP?

Thanks,
Paul

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] Image reprojection

2007-07-13 Thread Larry Becker
Hi Paul,

  All of the image reprojection I've seen is slow, and in proprietary code.

Larry

On 7/13/07, Paul Austin <[EMAIL PROTECTED]> wrote:
> Has anyone done any work with the raster plugins to support reprojecting
> the images when loading/viewing in JUMP?
>
> Thanks,
> Paul
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>


-- 
http://amusingprogrammer.blogspot.com/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] GeoJP2

2007-07-13 Thread Larry Becker
See the Wikipedia article on JPEG 2000 for comments on legal issues re: JP2000:

http://en.wikipedia.org/wiki/JPEG_2000#Legal_issues

It seems OK, but it pays to be informed.

Larry


On 7/13/07, Michaël Michaud <[EMAIL PROTECTED]> wrote:
> Paul Austin a écrit :
>
> >Has anyone done any work with GeoJP2 in Java or JUMP?
> >
> >
> Not that I know, I think it would be a great replacement for ecw and
> mrsid which are proprietary formats
>
> Michaël
>
> >Paul
> >
> >-
> >This SF.net email is sponsored by DB2 Express
> >Download DB2 Express C - the FREE version of DB2 express and take
> >control of your XML. No limits. Just data. Click to get it now.
> >http://sourceforge.net/powerbar/db2/
> >___
> >Jump-pilot-devel mailing list
> >Jump-pilot-devel@lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
> >
> >
> >
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>


-- 
http://amusingprogrammer.blogspot.com/

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] How are we using Bouy?

2007-07-13 Thread Nacho Uve

Hello all,

I've used Buoy and I think it is a great library... Easy to use and very
powerful.
I always wonder why Java community doesn't use it more often.

In my opinion, Bouy would have to remain in OJ... even favor its use.

Nacho.




2007/7/12, Stefan Steiniger <[EMAIL PROTECTED]>:


my opinion:


>Now, I still consider buoy as a very cool library, but I can see that
>adoption by java community is very slow, and you are right, adding such
>a library for only one plugin is not worthwhile.
>Some scenarios for the future of buoy in OJ are :
>- let buoy and simple query as it is (+200 ko does not hurt much)
>
>
yep - I agree

>- remove buoy + simple query from the core (I would not have any problem
>with that, there are now some good stuff from vivid for querying, even
>if some queries are easier to do with simplequery, it can always be
>delivered as an extension)
>
>
nope.. s.q. has some advantages over the built-in queries

>- rewrite simple query to remove all buoy dependencies (probably not too
>hard, but also not too high in my priority list)
>
>
possible, but i think as well that it has low priority

btw.: Jons GUI functions are nice, but the simple query gui is to
complex from my point of view

but if Paul think that is a simple thing for him to change to an on lib,
i won't object

stefan


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] New Help Page on OpenJUMP wiki

2007-07-13 Thread Giuseppe Aruta
Hi everybody

I invite you to see the new help page (OpenJUMP List
of Function) which I put on OpenJUMP Documentation
Page
http://openjump.org/wiki/show/OpenJUMP+List+of+Functions
I put on this page some paragraphers (the ones I wrote
by now) and I program to upgrade  by the time I write
new one.
The aim is to have a complete  list of functions of
OpenJUMP software


Peppe


  ___ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
http://it.docs.yahoo.com/nowyoucan.html

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] New Help Page on OpenJUMP wiki

2007-07-13 Thread Stefan Steiniger
looks good and simple :)

stefan

Giuseppe Aruta wrote:

>Hi everybody
>
>I invite you to see the new help page (OpenJUMP List
>of Function) which I put on OpenJUMP Documentation
>Page
>http://openjump.org/wiki/show/OpenJUMP+List+of+Functions
>I put on this page some paragraphers (the ones I wrote
>by now) and I program to upgrade  by the time I write
>new one.
>The aim is to have a complete  list of functions of
>OpenJUMP software
>
>
>Peppe
>
>
>  ___ 
>L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
>http://it.docs.yahoo.com/nowyoucan.html
>
>-
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>___
>Jump-pilot-devel mailing list
>Jump-pilot-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>  
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] More Java2DConverter issues

2007-07-13 Thread Michaël Michaud
Hi,

I tested this one, but it did not change the result for me.
The JOIN_BEVEL appears and desappears depending on scale in both cases, 
with old code and with your patch.

I read that PathIterator.SEG_CLOSE add a segment back to the point 
corresponding to the most recent SEG_MOVETO.
In our case, this segment already exists because the linestring is 
closed. Will we have to trace one more segment (over the first one) ?
How your code is supposed to change the join type?

Michaël


Larry Becker a écrit :

>We recently implemented some modifications to Java2DConverter and
>PolygonShape to use PathIterator.  The implementation was slightly
>flawed and resulted in paths that didn't use a SEG_CLOSE which causes
>closed paths to fail to connect start and end with a JOIN_BEVEL.  You
>can see the problem very easily if you start OJ, drag out a rectangle,
>and then increase the line width to 10.
>
>The fix is:
>
>   private int getSegType(){
>   if (closed && (iterate == numPoints-1))
>   return PathIterator.SEG_CLOSE;
>   return (iterate==0) ? PathIterator.SEG_MOVETO : 
> PathIterator.SEG_LINETO;
>   }
>
>I would also like to increase the accuracy of the rendering system
>from float to double by replacing all references to GeneralPath with
>Path2D.Double.  There is no speed or memory penalty for this change.
>
>regards,
>Larry Becker
>
>  
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] More Java2DConverter issues

2007-07-13 Thread Larry Becker
Sorry Michaël, I didn't mean to mislead you, but I didn't include all
of the code as I was still doing testing.  There were a number of side
effects to adding the SEG_CLOSE and changing from GeneralPath to
Path2D.Double.  I had to change PolygonShape, Java2DCovnerter, and
StyleUtil.  The difference between the Linestring and Polygon code is
the explicit test for closed in Linestring.

The full method in Java2DConverter is:

class LineStringPath extends LineString implements PathIterator {

private int iterate;
private int numPoints;
private Coordinate[] points;
private Java2DConverter j2D;
private boolean closed;

public LineStringPath(LineString linestring, Java2DConverter 
j2D){
super(null, new GeometryFactory());
//this.linestring = linestring;
this.j2D = j2D;
try {
  points = 
j2D.toViewCoordinates(linestring.getCoordinates());
}
catch (NoninvertibleTransformException ex){ }
this.numPoints = points.length; 
//linestring.getNumPoints();
iterate = 0;
closed = (numPoints>1) && 
(points[0].equals2D(points[numPoints-1]));
}
private int getSegType(){
if (closed && (iterate == numPoints-1))
return PathIterator.SEG_CLOSE;
return (iterate==0) ? PathIterator.SEG_MOVETO : 
PathIterator.SEG_LINETO;
}
public int currentSegment(double[] coords) {
coords[0] = points[iterate].x;
coords[1] = points[iterate].y;
return getSegType();
}
public int currentSegment(float[] coords) {
coords[0] = (float) points[iterate].x;
coords[1] = (float) points[iterate].y;
return getSegType();
}
public int getWindingRule() {
return GeneralPath.WIND_NON_ZERO;
}
public boolean isDone() {
return !(iterate < numPoints);
}
public void next() {
iterate++;
}

}

The full method in PolygonShape is:

class PolygonPath implements PathIterator {
private int iterate;
private int numPoints;
private Coordinate[] points;

public PolygonPath(Coordinate[] coordinates){
points = coordinates;
this.numPoints = points.length;
iterate = 0;
}
private int getSegType(){
if (iterate == numPoints-1)
return PathIterator.SEG_CLOSE;
return (iterate==0) ? PathIterator.SEG_MOVETO : 
PathIterator.SEG_LINETO;
}
public int currentSegment(double[] coords) {
coords[0] = points[iterate].x;
coords[1] = points[iterate].y;
return getSegType();
}
public int currentSegment(float[] coords) {
coords[0] = (float) points[iterate].x;
coords[1] = (float) points[iterate].y;
return getSegType();
}
public int getWindingRule() {
return GeneralPath.WIND_EVEN_ODD;
}
public boolean isDone() {
return !(iterate < numPoints);
}
public void next() {
iterate++;
}   
}

That should work as advertised. Then to complete the mod for double,
just change all of the GeneralPath references (except for constants)
to Path2D.Double in PolygonShape, Java2DCovnerter, and StyleUtil.

In StyleUtil:

if (!(shape instanceof Path2D.Double) && renderingFill) {

regards,
Larry


On 7/13/07, Michaël Michaud <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I tested this one, but it did not change the result for me.
> The JOIN_BEVEL appears and desappears depending on scale in both cases,
> with old code and with your patch.
>
> I read that PathIterator.SEG_CLOSE add a segment back to the point
> corresponding to the most recent SEG_MOVETO.
> In our case, this segment already exists because the linestring is
> closed. Will we have to trace one more segment (over the first one) ?
> How your code is supposed to change the join type?
>
> Michaël
>
>
> Larry Becker a écrit :
>

Re: [JPP-Devel] More Java2DConverter issues

2007-07-13 Thread Larry Becker

I read that PathIterator.SEG_CLOSE add a segment back to the point
corresponding to the most recent SEG_MOVETO.
In our case, this segment already exists because the linestring is
closed.


The linestring is closed, but Java2D won't build a bevel without the
SEG_CLOSE on the last segment. If it is closed, then it just won't
need to explicitly close it for us.

By the way, JUMP didn't originally close linestrings, just polygons.
See the attached Thicklines.png.  I think it looks much better now
(see After.png).

regards,
Larry


On 7/13/07, Michaël Michaud <[EMAIL PROTECTED]> wrote:

Hi,

I tested this one, but it did not change the result for me.
The JOIN_BEVEL appears and desappears depending on scale in both cases,
with old code and with your patch.

I read that PathIterator.SEG_CLOSE add a segment back to the point
corresponding to the most recent SEG_MOVETO.
In our case, this segment already exists because the linestring is
closed. Will we have to trace one more segment (over the first one) ?
How your code is supposed to change the join type?

Michaël


Larry Becker a écrit :

>We recently implemented some modifications to Java2DConverter and
>PolygonShape to use PathIterator.  The implementation was slightly
>flawed and resulted in paths that didn't use a SEG_CLOSE which causes
>closed paths to fail to connect start and end with a JOIN_BEVEL.  You
>can see the problem very easily if you start OJ, drag out a rectangle,
>and then increase the line width to 10.
>
>The fix is:
>
>   private int getSegType(){
>   if (closed && (iterate == numPoints-1))
>   return PathIterator.SEG_CLOSE;
>   return (iterate==0) ? PathIterator.SEG_MOVETO : 
PathIterator.SEG_LINETO;
>   }
>
>I would also like to increase the accuracy of the rendering system
>from float to double by replacing all references to GeneralPath with
>Path2D.Double.  There is no speed or memory penalty for this change.
>
>regards,
>Larry Becker
>
>
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel




--
http://amusingprogrammer.blogspot.com/
<><>-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] More Java2DConverter issues

2007-07-13 Thread Michaël Michaud
Hello,

Yes, the patch on the linestring has no effect on a polygon, but the 
patch on the polygon has :-)
It is now commited for both cases.
I did not patch classes to use double instead of float yet (but I have 
no objection if someone who understand and/or need it commit)

Michaël


Larry Becker a écrit :

>> I read that PathIterator.SEG_CLOSE add a segment back to the point
>> corresponding to the most recent SEG_MOVETO.
>> In our case, this segment already exists because the linestring is
>> closed.
>
>
> The linestring is closed, but Java2D won't build a bevel without the
> SEG_CLOSE on the last segment. If it is closed, then it just won't
> need to explicitly close it for us.
>
> By the way, JUMP didn't originally close linestrings, just polygons.
> See the attached Thicklines.png.  I think it looks much better now
> (see After.png).
>
> regards,
> Larry
>
>
> On 7/13/07, Michaël Michaud <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> I tested this one, but it did not change the result for me.
>> The JOIN_BEVEL appears and desappears depending on scale in both cases,
>> with old code and with your patch.
>>
>> I read that PathIterator.SEG_CLOSE add a segment back to the point
>> corresponding to the most recent SEG_MOVETO.
>> In our case, this segment already exists because the linestring is
>> closed. Will we have to trace one more segment (over the first one) ?
>> How your code is supposed to change the join type?
>>
>> Michaël
>>
>>
>> Larry Becker a écrit :
>>
>> >We recently implemented some modifications to Java2DConverter and
>> >PolygonShape to use PathIterator.  The implementation was slightly
>> >flawed and resulted in paths that didn't use a SEG_CLOSE which causes
>> >closed paths to fail to connect start and end with a JOIN_BEVEL.  You
>> >can see the problem very easily if you start OJ, drag out a rectangle,
>> >and then increase the line width to 10.
>> >
>> >The fix is:
>> >
>> >   private int getSegType(){
>> >   if (closed && (iterate == numPoints-1))
>> >   return PathIterator.SEG_CLOSE;
>> >   return (iterate==0) ? PathIterator.SEG_MOVETO 
>> : PathIterator.SEG_LINETO;
>> >   }
>> >
>> >I would also like to increase the accuracy of the rendering system
>> >from float to double by replacing all references to GeneralPath with
>> >Path2D.Double.  There is no speed or memory penalty for this change.
>> >
>> >regards,
>> >Larry Becker
>> >
>> >
>> >
>>
>>
>> - 
>>
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>
>
>
> 
>
>
> 
>
>
>
>-
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>
>
>
>___
>Jump-pilot-devel mailing list
>Jump-pilot-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>  
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


Re: [JPP-Devel] More Java2DConverter issues

2007-07-13 Thread Larry Becker
Great!  When I was looking at it to answer your post, I realized that
I had some useless code in the Linestring PathIterator.  It is much
simpler now and much more light weight.

class LineStringPath implements PathIterator {

private int iterate;
private int numPoints;
private Coordinate[] points;
private boolean closed;

public LineStringPath(LineString linestring, Java2DConverter 
j2D){
try {
  points = 
j2D.toViewCoordinates(linestring.getCoordinates());
}
catch (NoninvertibleTransformException ex){ }
this.numPoints = points.length;
iterate = 0;
closed = (numPoints>1) && 
(points[0].equals2D(points[numPoints-1]));
}
private int getSegType(){
if (closed && (iterate == numPoints-1))
return PathIterator.SEG_CLOSE;
return (iterate==0) ? PathIterator.SEG_MOVETO : 
PathIterator.SEG_LINETO;
}
public int currentSegment(double[] coords) {
coords[0] = points[iterate].x;
coords[1] = points[iterate].y;
return getSegType();
}
public int currentSegment(float[] coords) {
coords[0] = (float) points[iterate].x;
coords[1] = (float) points[iterate].y;
return getSegType();
}
public int getWindingRule() {
return GeneralPath.WIND_NON_ZERO;
}
public boolean isDone() {
return !(iterate < numPoints);
}
public void next() {
iterate++;
}

}

regards,
Larry

On 7/13/07, Michaël Michaud <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Yes, the patch on the linestring has no effect on a polygon, but the
> patch on the polygon has :-)
> It is now commited for both cases.
> I did not patch classes to use double instead of float yet (but I have
> no objection if someone who understand and/or need it commit)
>
> Michaël
>
>
> Larry Becker a écrit :
>
> >> I read that PathIterator.SEG_CLOSE add a segment back to the point
> >> corresponding to the most recent SEG_MOVETO.
> >> In our case, this segment already exists because the linestring is
> >> closed.
> >
> >
> > The linestring is closed, but Java2D won't build a bevel without the
> > SEG_CLOSE on the last segment. If it is closed, then it just won't
> > need to explicitly close it for us.
> >
> > By the way, JUMP didn't originally close linestrings, just polygons.
> > See the attached Thicklines.png.  I think it looks much better now
> > (see After.png).
> >
> > regards,
> > Larry
> >
> >
> > On 7/13/07, Michaël Michaud <[EMAIL PROTECTED]> wrote:
> >
> >> Hi,
> >>
> >> I tested this one, but it did not change the result for me.
> >> The JOIN_BEVEL appears and desappears depending on scale in both cases,
> >> with old code and with your patch.
> >>
> >> I read that PathIterator.SEG_CLOSE add a segment back to the point
> >> corresponding to the most recent SEG_MOVETO.
> >> In our case, this segment already exists because the linestring is
> >> closed. Will we have to trace one more segment (over the first one) ?
> >> How your code is supposed to change the join type?
> >>
> >> Michaël
> >>
> >>
> >> Larry Becker a écrit :
> >>
> >> >We recently implemented some modifications to Java2DConverter and
> >> >PolygonShape to use PathIterator.  The implementation was slightly
> >> >flawed and resulted in paths that didn't use a SEG_CLOSE which causes
> >> >closed paths to fail to connect start and end with a JOIN_BEVEL.  You
> >> >can see the problem very easily if you start OJ, drag out a rectangle,
> >> >and then increase the line width to 10.
> >> >
> >> >The fix is:
> >> >
> >> >   private int getSegType(){
> >> >   if (closed && (iterate == numPoints-1))
> >> >   return PathIterator.SEG_CLOSE;
> >> >   return (iterate==0) ? PathIterator.SEG_MOVETO
> >> : PathIterator.SEG_LINETO;
> >> >   }
> >> >
> >> >I would also like to increase the accuracy of the rendering system
> >> >from float to double by replacing all references to GeneralPath with
> >> >Path2D.Double.  There is no speed or memory penalty for this change.
> >> >
> >> >regards,
> >> >Larry Becker
> >> >
> >> >
> >> >
> >>
> >>
> >> -
> >>
> >> This SF.net email is sponsored by DB2 Express
> >> Download DB2 Express C - the FREE version of DB2 express and take
> >> control