GraphStream Users

Archives de la liste Aide

size: fit and padding

Chronologique Discussions 
  • From: Dave Murray-Rust <d.murray-rust AT>
  • To: "graphstream-users AT" <graphstream-users AT>
  • Subject: size: fit and padding
  • Date: Thu, 11 Jun 2015 14:26:01 +0100

I've got some nodes with the following style (plus some more):
node {
  text-alignment: center;
  text-size: 12;
  size-mode: fit;
  text-background-mode: rounded-box;
  text-background-color: #0001;
  text-padding: 15;
  fill-color: #0000;
  stroke-mode: plain;
  stroke-color: #999;

I would expect the size of the shape to include the text padding, but it doesn't. In the screenshot - the light grey is the padded text area (label), while the black lines are the drawn shapes. I would expect the diamond to extend to the sides of the light grey rectangle if the Shape if fit to the size of the label.

This is with 1.3, but I've just pulled the latest 2.0-SNAPSHOT of gs-ui with similar results.

I've had a quick look through the code, but can't find anything immediate to tweak.

I quite often run into this, as I use graphstream to make graphs where the  nodes are labelled inside the node, and an easy way to make it look sensible would really help.


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

  • size: fit and padding, Dave Murray-Rust, 11/06/2015

Archives gérées par MHonArc 2.6.16.

Top of page