Esempio n. 1
0
 public boolean hasChanges() {
   if (layerColour.getRed() != model.getRed()
       || layerColour.getGreen() != model.getGreen()
       || layerColour.getBlue() != model.getBlue()
       || ((float) layerColour.getAlpha() / 255f) != model.getOpacity()) return true;
   else return false;
 }
Esempio n. 2
0
  public HILayer(HiLayer model, int scaleX, int scaleY) {
    this.model = model;
    this.scaleX = scaleX;
    this.scaleY = scaleY;
    this.layerColour =
        new Color(
            model.getRed(), model.getGreen(), model.getBlue(), (int) (model.getOpacity() * 255));

    // split model polygon string into separate polygons
    if (model.getPolygons().length() > 0) {
      for (String polygon : model.getPolygons().split("\\|"))
        polygons.addElement(new RelativePolygon(polygon, scaleX, scaleY));
    }
  }
Esempio n. 3
0
 public void resetChanges() {
   this.layerColour =
       new Color(
           model.getRed(), model.getGreen(), model.getBlue(), (int) (model.getOpacity() * 255));
 }