Пример #1
0
  public void updateDataVO() {
    dataVO.x = getX() / this.mulX;
    dataVO.y = getY() / this.mulY;
    dataVO.scaleX = getScaleX();
    dataVO.scaleY = getScaleY();
    dataVO.rotation = getRotation();

    if (getZIndex() >= 0) {
      dataVO.zIndex = getZIndex();
    }

    if (dataVO.layerName == null || dataVO.layerName.equals("")) {
      dataVO.layerName = "Default";
    }
    dataVO.customVars = customVariables.saveAsString();
  }
Пример #2
0
 private void init(SimpleImageVO vo, IResource rm) {
   dataVO = vo;
   this.rm = rm;
   setX(dataVO.x);
   setY(dataVO.y);
   setScaleX(dataVO.scaleX);
   setScaleY(dataVO.scaleY);
   customVariables.loadFromString(dataVO.customVars);
   this.setRotation(dataVO.rotation);
   if (dataVO.zIndex < 0) dataVO.zIndex = 0;
   if (dataVO.tint == null) {
     setTint(new Color(1, 1, 1, 1));
   } else {
     setTint(new Color(dataVO.tint[0], dataVO.tint[1], dataVO.tint[2], dataVO.tint[3]));
   }
 }