Example #1
0
 public void init() {
   super.init();
   // parse out interior colour, specific to link annotations.
   fillColor = Color.WHITE; // we default to black but probably should be null
   java.util.List C = (java.util.List) getObject(IC_KEY);
   // parse thought rgb colour.
   if (C != null && C.size() >= 3) {
     float red = ((Number) C.get(0)).floatValue();
     float green = ((Number) C.get(1)).floatValue();
     float blue = ((Number) C.get(2)).floatValue();
     red = Math.max(0.0f, Math.min(1.0f, red));
     green = Math.max(0.0f, Math.min(1.0f, green));
     blue = Math.max(0.0f, Math.min(1.0f, blue));
     fillColor = new Color(red, green, blue);
     isFillColor = true;
   }
 }