GraphStream Users

Archives de la liste Aide

Re: GraphStream sprites

Chronologique Discussions 
  • From: Antoine Dutot <antoine.dutot AT>
  • To: Michele Freschi <mfreschi AT>
  • Cc: graphstream-users AT
  • Subject: Re: GraphStream sprites
  • Date: Mon, 11 Jul 2011 16:14:56 +0200


2011/7/11 Michele Freschi
<mfreschi AT>:
> Hi,
> first of all great project! thanks for sharing it :)
> and then a question, I didn't use the mailing list because it looks
> like it's only french.

The mailing list is not french only, we had the bad habit to answer in
french at some french people but we are now trying to avoid this :-) I
am sorry for this.

> let's suppose I have a sprite (an image) and I want to attach it to
> all nodes, can i add
> the sprite to the SpriteManager and then attach to multiple nodes ? or
> a sprite can be associated with
> a single element ? (if that's the case I hope the sprite is stored
> only once in the manager)

In fact, each sprite is an individual object that cannot be attached
to multiple elements. However the icon picture (or any resource, like
fonts for the text) is loaded only once and then shared. Therefore it
consumes only the memory needed by the sprite object, not its picture
(all sprites will share the same CSS style). This is the very purpose
of the CSS in the viewer : you define the style once, and you apply it
to multiple objects.

I hope I answered your question, if not do not hesitate to repost on
the mailling list or directly to me.



Archives gérées par MHonArc 2.6.16.

Top of page