1 package mhr.appcore.image.layers;
3 import java.sql.Wrapper;
5 import org.w3c.dom.Document;
6 import org.w3c.dom.Element;
8 import mhr.appcore.bitmap.BitmapInfo;
9 import mhr.appcore.bitmap.ChannelCount;
10 import mhr.appcore.bitmap.ColorMode;
11 import mhr.appcore.bitmap.Depth;
12 import mhr.appcore.bitmap.NBitmap;
13 import mhr.appcore.bitmap.exceptions.BitmapAllocationException;
14 import mhr.appcore.bitmap.exceptions.UnsupportedBitmapException;
15 import mhr.appcore.image.Image;
16 import mhr.appcore.image.exceptions.ImageStateException;
17 import mhr.appcore.image.exceptions.LayerCreationException;
18 import mhr.appcore.interfaces.ImageFile;
19 import mhr.appcore.interfaces.PDBitmap;
20 import mhr.appcore.interfaces.PDImageDataPresentation;
21 import mhr.appcore.interpolators.Interpolator;
22 import mhr.appcore.interpolators.InterpolatorType;
23 import mhr.appcore.utils.Rect;
36 public static final String
ID_NODE =
"LayerId";
114 boolean hasMask =
false;
116 id = Integer.parseInt(i.getElementsByTagName(c.
ID_NODE).item(0).getTextContent());
117 width = Integer.parseInt(i.getElementsByTagName(c.
WIDTH_NODE).item(0).getTextContent());
118 height = Integer.parseInt(i.getElementsByTagName(c.
HEIGHT_NODE).item(0).getTextContent());
119 opacity = Double.parseDouble(i.getElementsByTagName(c.
OPACITY_NODE).item(0).getTextContent());
121 hasMask = Boolean.parseBoolean(i.getElementsByTagName(c.
HAS_MASK_NODE).item(0).getTextContent());
122 }
catch (NullPointerException e) {
142 }
catch (Exception e) {
147 if (tmpMask != null) {
182 Element e = d.createElement(eName);
183 e.setTextContent(eContetnt);
184 parent.appendChild(e);
218 onResize(nWidth, nHeight, iType, force);
365 throw new IllegalStateException(
"Mask on but doesn't exist.");