001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package coldfusion.image;
020
021import java.awt.Color;
022import java.awt.Graphics2D;
023import java.awt.RenderingHints.Key;
024import java.awt.image.BufferedImage;
025
026import javax.servlet.jsp.PageContext;
027
028import lucee.runtime.type.Struct;
029
030
031public interface Image  {
032
033        
034        public void addBorder(int arg0, String arg1, String arg2);
035        public void blur(int blurRadius);
036        public void brighten() ;
037        public void clearRect(int x, int y, int width, int height);
038        public Image copyArea(int srcX, int srcY, int width, int height, int destX,int destY);
039        public Image copyArea(int srcX, int srcY, int width, int height);
040        public void crop(float x, float y, float width, float height);
041        public void draw3DRect(int x, int y, int width, int height, boolean raised,boolean filled);
042        public void drawArc(int x, int y, int width, int height, int startAngle,
043                        int arcAngle, boolean filled);
044        public void drawCubicCurve(double x1, double y1, double ctrlx1,
045                        double ctrly1, double ctrlx2, double ctrly2, double x2, double y2);
046        public void drawLine(int x1, int y1, int x2, int y2);
047        public void drawLines(int[] xcoords, int[] ycoords, boolean isPolygon,
048                        boolean filled);
049        public void drawOval(int x, int y, int width, int height, boolean filled);
050        public void drawPoint(int x, int y);
051        public void drawQuadraticCurve(double x1, double y1, double ctrlx,
052                        double ctrly, double x2, double y2);
053        public void drawRect(int x, int y, int width, int height, boolean filled);
054        public void drawRoundRect(int x, int y, int width, int height,
055                        int arcWidth, int arcHeight, boolean filled);
056        public void drawString(String arg0, int arg1, int arg2, Struct arg3);
057        public void flip(String transpose);
058        public String getBase64String(String formatName);
059        public Color getColor(String strColor);
060        public Graphics2D getCurrentGraphics();
061        public BufferedImage getCurrentImage();
062        public Struct getExifMetadata(PageContext arg0);
063        public String getExifTag(String tagname, PageContext pageContext);
064        public int getHeight();
065        public byte[] getImageBytes(String arg0);
066        public Struct getIptcMetadata(PageContext arg0);
067        public String getIptcTag(String tagname, PageContext pageContext);
068        public String getSource();
069        public int getWidth();
070        public void grayscale();
071        public Struct info();
072        public void initializeMetadata(PageContext pc);
073        public void invert();
074        public void overlay(Image img);
075        public void paste(Image img2, int x, int y);
076        public void readBase64(String arg0);
077        public void resize(String arg0, String arg1, String arg2, double arg3);
078        public void resize(String width, String height, String interpolation);
079        public void rotate(float arg0, float arg1, float arg2, String arg3);
080        public void rotateAxis(double theta, double x, double y);
081        public void rotateAxis(double theta);
082        public void scaleToFit(int fitSize);
083        public void scaleToFit(String arg0, String arg1, String arg2, double arg3);
084        public void scaleToFit(String fitWidth, String fitHeight,
085                        String interpolation);
086        public void setAntiAliasing(String value);
087        public void setBackground(String color);
088        public void setColor(String color);
089        public void setDrawingStroke(float width, int cap, int joins,
090                        float miterlimit, float[] dash, float dash_phase);
091        public void setDrawingStroke(Struct arg0);
092        public void setRenderingHint(Key hintKey, Object hintValue);
093        public void setTranparency(double percent);
094        public void setXorMode(String color);
095        public void sharpen(float gain);
096        public void sharpenEdge();
097        public void shear(float arg0, String arg1, String arg2);
098        public void shearAxis(double shx, double shy);
099        public void translate(int arg0, int arg1, String arg2);
100        public void translateAxis(int x, int y);
101        public void write(String arg0, float arg1);
102        public void writeBase64(String arg0, String arg1, boolean arg2);
103
104}