iSpy Configuring iSpy look (.iss files)

rounded border

iSpy Style Sheets (ISS)

By far the most requested feature for iSpy has been to be able to configure cuts and the way pictures look.

This is now possible using the so-called ISS files (mimicking HTML CSS files) that define the style and (graphics) cuts for any given collection displayed.

While a default ISS file is compiled in the executable, the user can specify his/her own file at startup time by simply passing its path on the command line.

The syntax of ISS is as similar as possible to the one of the usual CSS file encountered in web pages:
      rule {
        property-name: property-value;
        ...
      }
      
Where rule is used to identify the collection name for the associated properties found in the curly brackets.

Notice that for the moment, due to limitations of the implementation, the rule is not really cascading and you have to fully specify all the properties related to a given collection. This will change in future.

To define the default style you can use the * rule and define values for all the supported properties. At the moment the default "*" rule is:
      // Default style.
      * {
        diffuse-color: rgb(0.7, 0.7, 0.7);
        transparency: 0.0;
        line-width: 1.0;
        line-pattern: 0xffff;
        font-size: 12;
        font-family: Arial;
        draw-style: solid;
        marker-shape: square;
        marker-size: normal;
        marker-style: filled;
        text-align: left;
        min-energy: 0.2;
        max-energy: 5.0;
        energy-scale: 1.0;
        left: 0.;
        top: 0.;
      }
      
For a detailed description of all the properties see the list below.

Besides all the collections to be found in the ig file, there are two special collections you can configure as well: Background and Internal_Limits_V1. The former obviously controls the background color (via the diffuse-color attribute), while the latter corresponds to the overlay which displays the graphics cuts.

The full default ISS can be found here.

Properties reference

  • diffuse-color: the main color to be used to display the collection. It can be specified either in the HTML form #RRGGBB or in the CSS form rgb(r, g, b), where RR, GG, BB are between 0 and 255, while r, g, b are between 0 and 1.
  • transparency: the transparency level, between 0 and 1 of the object displayed to represent the collection.
  • line-width: the width of all the lines displayed for a given collection.
  • line-pattern: an hex number defining the bitmask for the line pattern. E.g. Use 0xf0f0 for a dashed line with four pixel per dash.
  • font-size: the font size of the main text in the annotation associated to the collection. All other text strings (e.g. titles) will be scaled relative to this size.
  • font-family: the font family of the main text in the annotation.
  • draw-style: the style to use to draw all the shapes associated to the collection. Can be either solid, lines, points.
  • marker-shape: the shape of markers used for the collection. It can be either square, cross, circle, plus.
  • marker-size: the size of markers used for the collection. It can be either normal, big, huge.
  • marker-style: the style of markers used for the collection. It can be either filled or outline. The filled value only applies to circle and square markers.
  • text-align: the alignment of the annotation text. Can be either left, right, center
  • min-energy: if applicable, the minimal energy required for an element in the collection to be displayed. In GeV.
  • max-energy: if applicable, the maximum energy required for an element in the collection to be displayed. In GeV.
  • energy-scale: if applicable, the scale to use to display objects in the collection that vary in size / color according to their energy. In m / GeV.
  • top, left: when left aligned, the position of the top-left corner of an annotation. The position of the top-right corner in the case of right alignement. Varies from (0,0) to (1,1), which are the coordinates for the top-left and bottom-right corners.