com.caucho.quercus.lib.image
Class QuercusImage

java.lang.Object
  extended by com.caucho.quercus.env.Value
      extended by com.caucho.quercus.env.ResourceValue
          extended by com.caucho.quercus.lib.image.QuercusImage
All Implemented Interfaces:
EnvCleanup, java.io.Serializable

public class QuercusImage
extends ResourceValue

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.caucho.quercus.env.Value
L, NULL_ARGS, NULL_VALUE_ARRAY
 
Constructor Summary
QuercusImage(Env env, Path filename)
           
QuercusImage(java.io.InputStream inputStream)
           
QuercusImage(int width, int height)
           
 
Method Summary
 long allocateColor(int r, int g, int b)
           
 void fill(java.awt.Shape shape, int color)
           
 void flood(int x, int y, int color)
           
 void flood(int x, int y, int color, int border)
           
 java.awt.image.BufferedImage getBrush()
           
 java.awt.image.BufferedImage getBufferedImage()
           
 java.awt.Font getFont(int fontIndex)
           
 java.awt.Graphics2D getGraphics()
           
 int getHeight()
           
 int getPixel(int x, int y)
           
 java.awt.Font getTrueTypeFont(Env env, StringValue fontPath)
           
 int getWidth()
           
protected static java.awt.Color intToColor(int argb)
           
 boolean isInterlace()
           
 void setBrush(QuercusImage image)
           
 void setInterlace(boolean isInterlace)
           
 void setPixel(int x, int y, int color)
           
 void setStyle(Env env, ArrayValue colors)
           
 void setThickness(int thickness)
           
 void setToFill(boolean isToFill)
           
 void stroke(java.awt.Shape shape, int color)
           
 
Methods inherited from class com.caucho.quercus.env.ResourceValue
cleanup, close, isResource, printRImpl, serialize, toKey, toString, varDumpImpl
 
Methods inherited from class com.caucho.quercus.env.Value
abs, add, add, addOne, append, appendTo, appendTo, appendTo, appendTo, bitAnd, bitOr, bitXor, call, call, call, call, call, call, call, callCopy, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callMethodRef, callRef, callRef, callRef, callRef, callRef, callRef, callRef, charValueAt, checkPrivate, checkProtected, clone, cmp, containsKey, copy, copy, copy, copyArrayItem, copyReturn, copySaveFunArg, copyStringBuilder, copyTree, current, div, div, end, eq, eql, eqValue, findFunction, generate, geq, get, get, getArg, getArray, getArray, getBaseIterator, getCallableName, getCalledClass, getClassName, getCount, getCountRecursive, getDirty, getField, getFieldArg, getFieldArgRef, getFieldArray, getFieldObject, getFieldVar, getHashCode, getIterator, getKeyArray, getKeyIterator, getObject, getObject, getQuercusClass, getRef, getResourceType, getSize, getThisField, getThisFieldArg, getThisFieldArgRef, getThisFieldArray, getThisFieldObject, getThisFieldVar, getType, getValueArray, getValueIterator, getValueType, getVar, gt, hasCurrent, hashCode, increment, initField, isA, isA, isArray, isBinary, isBoolean, isCallable, isDefault, isDouble, isDoubleConvertible, isEmpty, isFieldExists, isFieldInit, isLong, isLongConvertible, isNull, isNumberConvertible, isNumeric, isObject, isset, isset, issetField, issetThisField, isString, isUnicode, isVar, jsonEncode, key, keyExists, length, leq, lshift, lt, mod, mul, mul, neg, next, nextIndex, pop, pos, postdecr, postincr, postincr, predecr, preincr, preincr, prev, print, print, printDepth, printJavaChar, printJavaString, printR, put, put, put, putArray, putField, putField, putField, putObject, putThisField, putThisField, putThisFieldArray, putVar, remove, reset, rshift, serialize, set, setCharValueAt, setFieldInit, setJavaObject, shuffle, sub_rev, sub, sub, subOne, toArgRef, toArray, toArrayValue, toAutoArray, toAutoObject, toBigDecimal, toBigInteger, toBinaryValue, toBinaryValue, toBinaryValue, toBinaryValueMarshalCost, toBoolean, toBooleanMarshalCost, toByteArrayMarshalCost, toByteMarshalCost, toCallable, toChar, toCharArrayMarshalCost, toCharMarshalCost, toDebugString, toDouble, toDoubleMarshalCost, toDoubleValue, toException, toFloatMarshalCost, toInputStream, toInt, toIntegerMarshalCost, toInternString, toJavaBoolean, toJavaByte, toJavaCalendar, toJavaCharacter, toJavaCollection, toJavaDate, toJavaDouble, toJavaFloat, toJavaInteger, toJavaList, toJavaLong, toJavaMap, toJavaObject, toJavaObject, toJavaObjectMarshalCost, toJavaObjectNotNull, toJavaShort, toJavaString, toJavaURL, toLocalRef, toLocalThis, toLocalValue, toLocalValueReadOnly, toLocalVar, toLocalVarDeclAsRef, toLong, toLongMarshalCost, toLongValue, toObject, toRef, toRefValue, toShortMarshalCost, toString, toStringBuilder, toStringBuilder, toStringBuilder, toStringBuilder, toStringMarshalCost, toStringValue, toStringValue, toStringValueMarshalCost, toUnicode, toUnicodeValue, toUnicodeValue, toUnicodeValueMarshalCost, toValue, toVar, unsetArray, unsetField, unsetThisArray, unsetThisField, valuesToArray, varDump, varExport, varExportImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuercusImage

public QuercusImage(int width,
                    int height)

QuercusImage

public QuercusImage(java.io.InputStream inputStream)

QuercusImage

public QuercusImage(Env env,
                    Path filename)
Method Detail

setInterlace

public void setInterlace(boolean isInterlace)

isInterlace

public boolean isInterlace()

getPixel

public int getPixel(int x,
                    int y)

setPixel

public void setPixel(int x,
                     int y,
                     int color)

getGraphics

public java.awt.Graphics2D getGraphics()

getFont

public java.awt.Font getFont(int fontIndex)

getTrueTypeFont

public java.awt.Font getTrueTypeFont(Env env,
                                     StringValue fontPath)
                              throws java.awt.FontFormatException,
                                     java.io.IOException
Throws:
java.awt.FontFormatException
java.io.IOException

getBufferedImage

public java.awt.image.BufferedImage getBufferedImage()

getWidth

public int getWidth()

getHeight

public int getHeight()

fill

public void fill(java.awt.Shape shape,
                 int color)

intToColor

protected static java.awt.Color intToColor(int argb)

stroke

public void stroke(java.awt.Shape shape,
                   int color)

setThickness

public void setThickness(int thickness)

setStyle

public void setStyle(Env env,
                     ArrayValue colors)

setBrush

public void setBrush(QuercusImage image)

getBrush

public java.awt.image.BufferedImage getBrush()

setToFill

public void setToFill(boolean isToFill)

allocateColor

public long allocateColor(int r,
                          int g,
                          int b)

flood

public void flood(int x,
                  int y,
                  int color)

flood

public void flood(int x,
                  int y,
                  int color,
                  int border)