From: Frank T. B. <fbe...@ca...> - 2016-12-21 20:15:10
|
Hello Andreas, there is no inconsistency here. If a style is bound to an element via id, that style will always be applied to that object. The second level of binding styles is the role attribute, where you can apply styles to all elements that have a certain objectRole attribute set on them. Consider the case where you would like to highlight a certain portion of your layout (that has no styles bound to them via ids) by a certain style (say all red / thickish lines). Another use case where I often use this is to apply consistent arrow heads to reaction arcs. If no style is defined by id or objectRole, then the last way to assign styles is by the type of object (render all compartments a certain way, or all species ... ). Using objectRoles or types makes it possible to define style sheets ahead of time and then simply apply them to the same layout. I hope this makes it clearer, all the best Frank On Wed, Dec 21, 2016 at 5:32 PM, Andreas Dräger <dr...@in...> wrote: > Dear all, > > If I want to draw a species glyph in a certain color, one option to do so is this: > > … > <render:listOfColorDefinitions> > <render:colorDefinition render:id="color_1" render:value="#00FF33FF" /> > </render:listOfColorDefinitions> > <render:listOfStyles> > <render:listOfStyles> > <render:style id="fill_1" render:roleList="style_fill_1"> > <render:g render:fill="color_1" /> > </render:style> > </render:listOfStyles> > </render:listOfStyles> > … > > And then my species glyph would be > > <layout:speciesGlyph layout:id="SpeciesGlyph_sa7126" layout:species="s6285" render:objectRole="style_fill_1"> > > I'd like to know what the rationale is behind the definition of role lists on styles? Why is it not sufficient to simply link to the id of a style instead? > > The role list can be a blank-separated enumeration of many roles, making the interpretation of these files a bit cumbersome. Just now, I don't see the advantage of doing so. > > Interestingly, there is another alternative, in which I would have an idList in the style that would enumerate all the ids of graphical objects with that style. Why are there two ways of doing it? Can't this open the door for inconsistencies? In fact, the idList is even more difficult to handle because when deleting a graphical object, all idLists must be queried for invalid references to that graphical object. For very large models, these idLists also tend to become very long. A bit explanation why this was designed as such and where the advantages/use cases are would be appreciated. > > With best regards and thanks > > Dr. Andreas Draeger > Principal Investigator > --- > University of Tuebingen > Center for Bioinformatics Tuebingen (ZBIT) > Applied Bioinformatics Group > Sand 14 · Office #A313 · 72076 Tübingen · Germany > Phone: +49-7071-29-78982 · Fax: +49-7071-29-5152 > Web: http://draeger-lab.org · Twitter: @dr_drae > YouTube: https://www.youtube.com/channel/UCp7fWtXGFOIjV35u7ONiVbg > > > > > > > > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today.http://sdm.link/intel > _______________________________________________ > sbml-render mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbml-render |