[Pixelle-commit] SF.net SVN: pixelle: [35] trunk/pixelle/src/com/mebigfatguy/pixelle/eval/ PixelleE
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-06-20 04:46:15
|
Revision: 35
http://pixelle.svn.sourceforge.net/pixelle/?rev=35&view=rev
Author: dbrosius
Date: 2008-06-19 21:46:24 -0700 (Thu, 19 Jun 2008)
Log Message:
-----------
a pixel evaluator for grayscale images
Added Paths:
-----------
trunk/pixelle/src/com/mebigfatguy/pixelle/eval/PixelleEvalByteGray.java
Added: trunk/pixelle/src/com/mebigfatguy/pixelle/eval/PixelleEvalByteGray.java
===================================================================
--- trunk/pixelle/src/com/mebigfatguy/pixelle/eval/PixelleEvalByteGray.java (rev 0)
+++ trunk/pixelle/src/com/mebigfatguy/pixelle/eval/PixelleEvalByteGray.java 2008-06-20 04:46:24 UTC (rev 35)
@@ -0,0 +1,54 @@
+/*
+ * pixelle - Graphics algorithmic editor
+ * Copyright (C) 2008 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.eval;
+
+import com.mebigfatguy.pixelle.PixelleEval;
+import com.mebigfatguy.pixelle.PixelleImage;
+
+public class PixelleEvalByteGray extends PixelleEval {
+
+ public PixelleEvalByteGray(PixelleImage srcImage) {
+ super(srcImage);
+ }
+
+ @Override
+ public double getRedValue(int x, int y) {
+ return getValue(x, y);
+ }
+
+ @Override
+ public double getGreenValue(int x, int y) {
+ return getValue(x, y);
+ }
+
+ @Override
+ public double getBlueValue(int x, int y) {
+ return getValue(x, y);
+ }
+
+ @Override
+ public double getTransparencyValue(int x, int y) {
+ return 0.0;
+ }
+
+ private double getValue(int x, int y) {
+ return (double)buffer.getElem(y * width + x);
+ }
+
+}
Property changes on: trunk/pixelle/src/com/mebigfatguy/pixelle/eval/PixelleEvalByteGray.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|