[Pixelle-commit] SF.net SVN: pixelle:[289] trunk/pixelle/src/com/mebigfatguy/pixelle/ SelectionOutl
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-07-20 07:37:12
|
Revision: 289
http://pixelle.svn.sourceforge.net/pixelle/?rev=289&view=rev
Author: dbrosius
Date: 2009-07-20 07:36:47 +0000 (Mon, 20 Jul 2009)
Log Message:
-----------
first start at outlining the selection bits
Added Paths:
-----------
trunk/pixelle/src/com/mebigfatguy/pixelle/SelectionOutliner.java
Added: trunk/pixelle/src/com/mebigfatguy/pixelle/SelectionOutliner.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/SelectionOutliner.java (rev 0)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/SelectionOutliner.java 2009-07-20 07:36:47 UTC (rev 289)
@@ -0,0 +1,37 @@
+/*
+ * pixelle - Graphics algorithmic editor
+ * Copyright (C) 2008-2009 Dave Brosius
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package com.mebigfatguy.pixelle;
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.awt.image.IndexColorModel;
+
+public class SelectionOutliner {
+
+ public BufferedImage createOutline(BufferedImage selectionImage) {
+ BufferedImage outlineSelection = new BufferedImage(selectionImage.getWidth(), selectionImage.getHeight(), BufferedImage.TYPE_BYTE_BINARY, (IndexColorModel)selectionImage.getColorModel());
+ Graphics g = selectionImage.getGraphics();
+ g.setColor(Color.WHITE);
+ g.fillRect(0, 0, selectionImage.getWidth(), selectionImage.getHeight());
+
+
+ return outlineSelection;
+ }
+}
Property changes on: trunk/pixelle/src/com/mebigfatguy/pixelle/SelectionOutliner.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|