1 package com.insanityengine.ghia.pixels; 2 3 /*** 4 * 5 * <P> 6 * This interface is meant to represent an MemoryImageSource kinda 7 * guy with some pretty accessors. The reads live over in the 8 * PixelBufferReadInterface.... 9 * </P> 10 * 11 * <P> 12 * It is good fun and you should see PixelImage for an example. 13 * </P> 14 * 15 * @author BrianHammond 16 * 17 * $Header: /usr/local/cvsroot/ghia/src/java/com/insanityengine/ghia/pixels/PixelBufferInterface.java,v 1.3 2005/03/19 17:50:02 brian Exp $ 18 * 19 */ 20 21 public interface PixelBufferInterface extends PixelBufferReadInterface { 22 23 /*** 24 * 25 * Set the pixel at idx to color 26 * 27 * @param idx pixel to set 28 * @param color use 29 * 30 */ 31 public void setColor( int idx, int color ); 32 33 /*** 34 * 35 * Set the pixel at (x,y) to color 36 * 37 * @param x coordinate 38 * @param y coordinate 39 * @param color use 40 * 41 */ 42 public void setColor( int x, int y, int color ); 43 44 /*** 45 * 46 * Set the pixel at (x,y) to color 47 * 48 * @param x coordinate 49 * @param y coordinate 50 * @param alpha component of the color 51 * @param red component of the color 52 * @param green component of the color 53 * @param blue component of the color 54 * 55 */ 56 public void setColor( int x, int y, int alpha, int red, int green, int blue ); 57 58 /*** 59 * 60 * Set the clear color 61 * 62 * @return color to clear with 63 * 64 */ 65 public void setClearColor( int color ); 66 67 /*** 68 * 69 * Clear the buffer 70 * 71 */ 72 public void clear(); 73 74 /*** 75 * 76 * Copy the contents of the pixel to the graphic g 77 * 78 * @param graphic to copy to 79 * 80 */ 81 public void copyTo( java.awt.Graphics graphic ); 82 83 /*** 84 * 85 * Set the image observer 86 * 87 * @param observer to use 88 * 89 */ 90 public void setObserver( java.awt.image.ImageObserver observer ); 91 92 }; 93 94 /*** 95 * 96 * $Log: PixelBufferInterface.java,v $ 97 * Revision 1.3 2005/03/19 17:50:02 brian 98 * repackaging 99 * 100 * Revision 1.2 2004/09/02 15:43:46 brian 101 * redefine PixelBufferReadInterface so BufferFx can use it as an interface rather than the RenderInterface 102 * 103 * Revision 1.1 2004/09/02 13:17:16 brian 104 * the big reorg 105 * 106 * Revision 1.5 2004/09/01 02:18:56 brian 107 * javadoc 108 * 109 * Revision 1.4 2004/09/01 01:10:42 brian 110 * fix class level javadoc placement 111 * 112 * Revision 1.3 2004/09/01 00:11:06 brian 113 * author, log and header stuff 114 * 115 * 116 */