Geoff,

Thank you for the clarifications!

SS

On 7/16/07, Geoffrey G Roy <[EMAIL PROTECTED]> wrote:
Dear SS

Welcome back! - see my comments below

Geoff

Sunburned Surveyor wrote:
> Geoff wrote: "I used the existing WKTFillPattern class for the WKT
> petterns, all I had to do was to load the WKT spec from the designated
> folder."
>
> I didn't know that OpenJUMP had a WKTFillPattern class. Thanks for
> pointing that out.
It is amazing what one finds at times!
>
> Geoff wrote: "For the image patterns, I found I had to implement a new
> renderer as the built-in class ImageFillPattern seems to require the
> IconLoader class to
> load the images (and I haven't figured out how to change the path for
> the image files away from the package location to the plugins folder so
> it is accessible to the user).   If there was an option in IconLoader to
> specify and absolute path for the images then I could have avoided this."
>
> How are you adding the new renderer you implemented? Did you do this
> entirely through your plug-in, or did you need to modify the core?
No changes to the core - I try to stay away from that.
>
> Geoff wrote: "When the new patterns appear in the Fill Patterns combo
> of the
> ChangeStyles dialog, they get a 0 index number.  As far as I can
> tell these index numbers are hard coded by the built-in list of
> patterns.  This does not appear to case further problems."
>
> I'm not sure what index number you are refering to. I think I need to
> take your plug-in for a spin first.
In the Change Styles dialog, in the Fill Pattern combo, each style as a
unique index number.
>
> Geoff wrote: "In my PrinterPlugin, the "Quality" rendering option
> sometimes
> fails as shown below.  This option uses the
> RenderingManager.copyTo() to copy the image to the current
> graphics context (to be use for printing).  This rendering option
> also produces getBounds() (No yet implemented) errors from
> PolygonShape().  The "Accurate" option uses the LayerPrinter2()
> class that creates a new LayerViewPanel does not have this
> problem, also the external renderer is fine."
>
> You might be a little over my head here. :] It sounds like the copyTo
> method of the RenderingManager class is throwing an error because of a
> getBounds method. I'm not familiar with this method or why it is being
> called, but it looks like Larry knows what you are talking about.
It appears to be something like that.
>
> Are the external renderer and LayerPrinter2 classes your creations?
LayerPrinter 2 has been contributed by Larry Becker,    the external
printer is mine.
>
> The Sunburned Surveyor
>
>
>
>
>
> On 7/11/07, Geoffrey G Roy <[EMAIL PROTECTED]> wrote:
>> Dear SS and Developers
>>
>> I used the existing WKTFillPattern class for the WKT petterns, all I had
>> to do was to load the WKT spec from the designated folder.  For the
>> image patterns, I found I had to implement a new renderer as the
>> built-in class ImageFillPattern seems to require the IconLoader class to
>> load the images (and I haven't figured out how to change the path for
>> the image files away from the package location to the plugins folder so
>> it is accessible to the user).   If there was an option in IconLoader to
>> specify and absolute path for the images then I could have avoided this.
>>
>> There are still a couple of problems, however:
>>
>>   1. When the new patterns appear in the Fill Patterns combo of the
>>      ChangeStyles dialog, they get a 0 index number.  As far as I can
>>      tell these index numbers are hard coded by the built-in list of
>>      patterns.  This does not appear to case further problems.
>>   2. In my PrinterPlugin, the "Quality" rendering option sometimes
>>      fails as shown below.  This option uses the
>>      RenderingManager.copyTo() to copy the image to the current
>>      graphics context (to be use for printing).  This rendering option
>>      also produces getBounds() (No yet implemented) errors from
>>      PolygonShape().  The "Accurate" option uses the LayerPrinter2()
>>      class that creates a new LayerViewPanel does not have this
>>      problem, also the external renderer is fine.
>>
>> Geoff
>> =========================================
>> java.lang.IllegalArgumentException: Expected a Color instance
>>    at sun.print.PathGraphics.fill(Unknown Source)
>>    at
>> 
com.vividsolutions.jump.workbench.ui.renderer.style.StyleUtil.paint(StyleUtil.java:69)
>>
>>    at
>> 
com.vividsolutions.jump.workbench.ui.renderer.style.BasicStyle.paint(BasicStyle.java:134)
>>
>>    at
>> 
com.vividsolutions.jump.workbench.ui.renderer.SimpleFeatureCollectionRenderer.paint(SimpleFeatureCollectionRenderer.java:44)
>>
>>    at
>> 
com.vividsolutions.jump.workbench.ui.renderer.SimpleFeatureCollectionRenderer.paint(SimpleFeatureCollectionRenderer.java:62)
>>
>>    at
>> 
com.vividsolutions.jump.workbench.ui.renderer.SimpleRenderer.copyTo(SimpleRenderer.java:72)
>>
>>    at
>> 
com.vividsolutions.jump.workbench.ui.renderer.FeatureCollectionRenderer.copyTo(FeatureCollectionRenderer.java:51)
>>
>>    at
>> 
com.vividsolutions.jump.workbench.ui.renderer.LayerRenderer.copyTo(LayerRenderer.java:94)
>>
>>    at
>> 
com.vividsolutions.jump.workbench.ui.renderer.RenderingManager.copyTo(RenderingManager.java:288)
>>
>>    at com.cadplan.jump.PrinterPanel.paint(PrinterPanel.java:251)
>>    at com.cadplan.jump.PrinterPanel.print(PrinterPanel.java:441)
>>    at sun.print.RasterPrinterJob.printPage(Unknown Source)
>>    at sun.print.RasterPrinterJob.print(Unknown Source)
>>    at sun.print.RasterPrinterJob.print(Unknown Source)
>>    at com.cadplan.jump.PrinterPlugIn.run(PrinterPlugIn.java:219)
>>    at
>> 
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:149)
>>
>>    at java.lang.Thread.run(Unknown Source)
>> ==========================================
>>
>>
>> Sunburned Surveyor wrote:
>> > Very cool Geoff! I like the idea of being able to specify custom
>> > vector fill patterns using WKT. I bet the designers of the spec never
>> > imagined it being used in that way.
>> >
>> > Perhaps I will have time to check your plug-in out this weekend.
>> >
>> > The Sunburned Surveyor
>> >
>> > P.S. - Did you have to implement custom rendering behavior to create
>> > this plug-in?
>> >
>> >
>> > On 7/6/07, Geoffrey G Roy <[EMAIL PROTECTED]> wrote:
>> >> To Open Jump Users (and Federico)
>> >>
>> >> I have just posted a new plugin for OpenJUMP that allows users to to
>> >> create their own fill patterns.  Fill patterns can be vector based
>> using
>> >> a WKT specification, or image based using GIF, JPG, PNG or SVG image
>> >> files.  Image files are loaded by the plugin from the FillPatterns
>> >> folder within the plugins folder.
>> >>
>> >> The new fill patterns appear in the Fill Pattern combo (added to the
>> >> bottom) of the Change Styles dialog.
>> >>
>> >> Details can be found at my web site: http://www.cadplan.com.au
>> >>
>> >> This is still a preliminary version, so comments and feedback are
>> >> welcome.
>> >>
>> >> Geoff
>> >>
>> >>
>> >>
>> >> --
>> >> Dr Geoffrey G Roy
>> >> Cadplan
>> >> 129 Gloster Street, Subiaco WA 6008
>> >> Tel: (08) 9381 4870  Fax: (08) 9382 4459
>> >> Email: [EMAIL PROTECTED]
>> >> http://www.cadplan.com.au
>> >>
>> >>
>> >> _______________________________________________
>> >> jump-users mailing list
>> >> [email protected]
>> >> http://lists.refractions.net/mailman/listinfo/jump-users
>> >>
>> > _______________________________________________
>> > jump-users mailing list
>> > [email protected]
>> > http://lists.refractions.net/mailman/listinfo/jump-users
>> >
>>
>> --
>> Dr Geoffrey G Roy
>> Cadplan
>> 129 Gloster Street, Subiaco WA 6008
>> Tel: (08) 9381 4870  Fax: (08) 9382 4459
>> Email: [EMAIL PROTECTED]
>> http://www.cadplan.com.au
>>
>>
>> _______________________________________________
>> jump-users mailing list
>> [email protected]
>> http://lists.refractions.net/mailman/listinfo/jump-users
>>
> _______________________________________________
> jump-users mailing list
> [email protected]
> http://lists.refractions.net/mailman/listinfo/jump-users
>
>

--
Dr Geoffrey G Roy
Cadplan
129 Gloster Street, Subiaco WA 6008
Tel: (08) 9381 4870  Fax: (08) 9382 4459
Email: [EMAIL PROTECTED]
http://www.cadplan.com.au


_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users

_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users

Reply via email to