Hello, sent this two days ago but only to Andrea and not to the list..

-------- Original Message --------

Hello Andrea

 > It's there:
 > 
http://svn.osgeo.org/geotools/trunk/modules/library/render/src/main/java/org/geotools/renderer/style/ShapeMarkFactory.java
 


Hmm, right, it's there. It just isn't in the javadoc for some reason,
and I think I only checked over there, sorry for that (I keep doing
these stupid mistakes!)

> You're trying to control spacing and angle. To control spacing you
> don't need to add a new parameter, just change the size of your marker
> and you'll get more space between the lines.

Well, we want both space and angle, so I guess we'll have to move deeper.

> Another way is to break the assumption a shape is to be contained
> in a 1x1 square, and allow for rectangular ones. I believe I looked
> into that path as well but it had some other ugly repercussions
> that I could not deal with in a short amount of time.

This was actually the path we were thinking about. Actually, before we
realized there was a ShapeMarkFactory around, we thought about
generating an appropriate rectangular SVG tile that would render nicely
(and maybe implement support for internal graphics to have the SVG
inline within the Style)

I hadn't realized before that there was this 1x1 size assumpion. And,
yes, I guess you can't have square tiles that fit together for arbitrary
angles. Is it ugly then to break the 1x1 assumption? I thought it could
work rather like the stipple that we see for SVG external graphics..


> I could not figure it out, it seems to me to solve this problem
> the dynamic symbolizers should be modified so that they can generate
> a custom Paint object. A Paint object is asked for a raster to fill
> a certain rectangular image (see the TexturePaint source), and there
> it should be possible to handle the generation of a filler that works
> with whatever angle you want.

Hmm, I am lacking some background knowledge here about these AWT
interfaces. What would this rectangular image stand for? (I imagine
you're talking about the PaintContext.getRaster() method?) If it stands
for the entire visualization area, then we could do it. If it stands for
the bounding box of a feature, then it's ok too. But if it is really
arbitrary and may be part of tiling within a feature, then I guess we
would be in trouble.

> To sum up I believe we'd have to add this method:
> MarkFactory.getPaint(graphics2d, name, feature)
> to the mark factories and then roll out a custom Paint object that
> knows how to deal with this kind of not regular-enough fills
> (and would open the door for completely non regular ones, such
>  as random point distributions with a certain density).

Hmm, yeah, interesting. But that makes me think, would it be less
efficient to generate this custom Paint object in this way, rather than
a fixed shape?

Cheers
Milton

-- 

Milton Jonathan
Grupo GIS e Meio Ambiente
Tecgraf/PUC-Rio
Tel: +55-21-3527-2502

------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to