diff options
author | Michael Bien <[email protected]> | 2010-08-31 01:25:59 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-08-31 01:25:59 +0200 |
commit | 4455385dd411375345688685dd561652708a7024 (patch) | |
tree | 1ddd2240d94e8c0571b29562bde411fb72fb2c82 /src/com/jogamp/opencl/demos/fft/ImageView.java | |
parent | 38641e01d3540e279ee91c9c6cfbc28414a6ed8d (diff) |
initial import of Michael Zucchi's port of Apples FFT example (RFE 408).
small modifications:
- pick CLPlatform with a GPU
- replaced tabs with spaces :)
Diffstat (limited to 'src/com/jogamp/opencl/demos/fft/ImageView.java')
-rw-r--r-- | src/com/jogamp/opencl/demos/fft/ImageView.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/com/jogamp/opencl/demos/fft/ImageView.java b/src/com/jogamp/opencl/demos/fft/ImageView.java new file mode 100644 index 0000000..c5d07a1 --- /dev/null +++ b/src/com/jogamp/opencl/demos/fft/ImageView.java @@ -0,0 +1,25 @@ +package com.jogamp.opencl.demos.fft; + +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.image.BufferedImage; +import javax.swing.JComponent; + +/** + * Just draws an image. + * @author notzed + */ +class ImageView extends JComponent { + + BufferedImage img; + + public ImageView(BufferedImage img) { + this.img = img; + this.setPreferredSize(new Dimension(img.getWidth(), img.getHeight())); + } + + @Override + protected void paintComponent(Graphics g) { + g.drawImage(img, 0, 0, null); + } +} |