]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/image/impl/AWTImage.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / image / impl / AWTImage.java
index 92d33766dff4942146571f19cd486aac7b2d083e..e547a663e8e8844024f110485ee85ba81d7ee302 100644 (file)
@@ -1,66 +1,66 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.g2d.image.impl;\r
-\r
-import java.awt.Shape;\r
-import java.awt.geom.Rectangle2D;\r
-import java.awt.image.BufferedImage;\r
-import java.util.EnumSet;\r
-\r
-import org.simantics.g2d.image.Image;\r
-import org.simantics.g2d.image.ImageUtils;\r
-import org.simantics.scenegraph.Node;\r
-import org.simantics.scenegraph.g2d.G2DParentNode;\r
-import org.simantics.scenegraph.g2d.nodes.ImageNode;\r
-\r
-/**\r
- * Adapts {@link BufferedImage} to {@link Image}\r
- * \r
- * @See {@link ImageUtils}\r
- * @author Toni Kalajainen\r
- */\r
-public class AWTImage extends AbstractImage implements Image {\r
-\r
-    static EnumSet<Feature> feats = EnumSet.noneOf(Feature.class);\r
-\r
-    BufferedImage bi;\r
-    Rectangle2D rect;\r
-\r
-    public AWTImage(BufferedImage bi) {\r
-        assert(bi!=null);\r
-        this.bi = bi;\r
-        rect = new Rectangle2D.Double(bi.getMinX(),bi.getMinY(),bi.getWidth(), bi.getHeight());\r
-    }\r
-\r
-    @Override\r
-    public Rectangle2D getBounds() {\r
-        return rect;\r
-    }\r
-\r
-    @Override\r
-    public Shape getOutline() {\r
-        return rect;\r
-    }\r
-\r
-    @Override\r
-    public Node init(G2DParentNode parent) {\r
-        ImageNode node = parent.getOrCreateNode("image", ImageNode.class);\r
-        node.setImage(bi);\r
-        return node;\r
-    }\r
-\r
-    @Override\r
-    public EnumSet<Feature> getFeatures() {\r
-        return feats;\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.g2d.image.impl;
+
+import java.awt.Shape;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.util.EnumSet;
+
+import org.simantics.g2d.image.Image;
+import org.simantics.g2d.image.ImageUtils;
+import org.simantics.scenegraph.Node;
+import org.simantics.scenegraph.g2d.G2DParentNode;
+import org.simantics.scenegraph.g2d.nodes.ImageNode;
+
+/**
+ * Adapts {@link BufferedImage} to {@link Image}
+ * 
+ * @See {@link ImageUtils}
+ * @author Toni Kalajainen
+ */
+public class AWTImage extends AbstractImage implements Image {
+
+    static EnumSet<Feature> feats = EnumSet.noneOf(Feature.class);
+
+    BufferedImage bi;
+    Rectangle2D rect;
+
+    public AWTImage(BufferedImage bi) {
+        assert(bi!=null);
+        this.bi = bi;
+        rect = new Rectangle2D.Double(bi.getMinX(),bi.getMinY(),bi.getWidth(), bi.getHeight());
+    }
+
+    @Override
+    public Rectangle2D getBounds() {
+        return rect;
+    }
+
+    @Override
+    public Shape getOutline() {
+        return rect;
+    }
+
+    @Override
+    public Node init(G2DParentNode parent) {
+        ImageNode node = parent.getOrCreateNode("image", ImageNode.class);
+        node.setImage(bi);
+        return node;
+    }
+
+    @Override
+    public EnumSet<Feature> getFeatures() {
+        return feats;
+    }
+
+}