[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] A developer moment on Glyphs
|
Hi Jody,
I will assume that your generation is based of the featureType as opposed to an
actual feature (as was the case yesterday).
David
Quoting Jody Garnett <jgarnett@xxxxxxxxxxxxxxx>:
> This should eventually go up on the wiki - but since I finally broke
> down and made a state machine I thought I should share.
>
> From LayerGenerateLabelDecorator.decorateImage
>
> * We are not allowed to block, test if generation is needed and
> start up the queue.
> * <p>
> * State Table of Image \ Image Descriptor:
> * <pre><code>
> * | null | icon
> * ---------+--------------+---------------------+
> * disposed | queue | image = |
> * or null | layer | icon.createImage() |
> * ---------+--------------+---------------------+
> * image | both | image |
> * +--------------+---------------------+
> * </code></pre>
> * This attempts to reduce the amount of flicker
> * experienced as the layer figures out its glyph
> * in the face of *many* events.
> * </p>
> * <p>
> * Everyone gives us events - who gives us icons?
> * <ul>
> * <li>If the user has given the layer an icon we don't need to
> generate anything.
> * <li>piccaso will wait on the queue and generate icons, and
> refresh the decorator.
> * <li>We will get the refresh and generate an Image from the Icon,
> * we can use this image when we are nexted refreshed.
> * <li>A random eclipse code will dispose our Images, and refrsh us
> * (We can still generate our images from the saved icon).
> * <li>The listener *hack* will watch for changes to layer,if any
> look interesting
> * the icon will be cleared and we will be refreshed. We still have
> * our image so their will be no downtime while waiting for piccaso
> * to make us a new Icon.
> * </ul>
> * So what happens for a layer that we cannot generate a icon for?
> We will
> * place it in the queue *every* time. Who knows maybe style or
> something will
> * change and we can do better then the default.
> * </p>
>
> Any mistakes with this plan will be obvious next time I run, but if you
> see anything
> obvious let me know.
>
> Cheers,
> Jody
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>