gnu.java.awt.peer.gtk
Class CairoSurface
CairoSurface - wraps a Cairo surface.
dataBuffer , height , minX , minY , numBands , numDataElements , parent , sampleModel , sampleModelTranslateX , sampleModelTranslateY , width |
void | copyAreaNative(int x, int y, int width, int height, int dx, int dy, int stride) - Copy a portion of this surface to another area on the surface.
|
protected static SampleModel | createCairoSampleModel(int w, int h) - Creates a SampleModel that matches Cairo's native format
|
Raster | createChild(int parentX, int parentY, int width, int height, int childMinX, int childMinY, int[] bandList)
|
WritableRaster | createCompatibleWritableRaster()
|
WritableRaster | createCompatibleWritableRaster(int x, int y, int w, int h)
|
Raster | createTranslatedChild(int childMinX, int childMinY)
|
WritableRaster | createWritableChild(int parentX, int parentY, int w, int h, int childMinX, int childMinY, int[] bandList)
|
WritableRaster | createWritableTranslatedChild(int x, int y)
|
void | dispose() - Dispose of the native data.
|
protected void | finalize() - Call dispose() to clean up any native resources allocated.
|
static BufferedImage | getBufferedImage(CairoSurface surface) - Returns a BufferedImage backed by a Cairo surface.
|
static BufferedImage | getBufferedImage(GtkImage image) - Returns a BufferedImage backed by a Cairo surface,
created from a GtkImage.
|
static BufferedImage | getBufferedImage(int width, int height) - Returns a BufferedImage backed by a Cairo surface.
|
int[] | getData() - Convenience method to quickly grab the data array backing this Raster.
|
Graphics2D | getGraphics() - Return a Graphics2D drawing to the CairoSurface.
|
GtkImage | getGtkImage() - Return a GtkImage from this Cairo surface.
|
static boolean | isCompatibleColorModel(ColorModel cm) - Returns whether this ColorModel is compatible with Cairo's native types.
|
static boolean | isCompatibleSampleModel(SampleModel sm) - Returns whether this SampleModel is compatible with Cairo's native types.
|
void | nativeDrawSurface(long surfacePointer, long contextPointer, double[] i2u, double alpha, int interpolation) - Draws this image to a given CairoGraphics context,
with an affine transform given by i2u.
|
long | newCairoContext()
|
createChild , createWritableChild , createWritableTranslatedChild , getWritableParent , setDataElements , setDataElements , setDataElements , setPixel , setPixel , setPixel , setPixels , setPixels , setPixels , setRect , setRect , setSample , setSample , setSample , setSamples , setSamples , setSamples |
createBandedRaster , createBandedRaster , createBandedRaster , createChild , createCompatibleWritableRaster , createCompatibleWritableRaster , createCompatibleWritableRaster , createCompatibleWritableRaster , createInterleavedRaster , createInterleavedRaster , createInterleavedRaster , createPackedRaster , createPackedRaster , createPackedRaster , createPackedRaster , createRaster , createTranslatedChild , createWritableRaster , createWritableRaster , getBounds , getDataBuffer , getDataElements , getDataElements , getHeight , getMinX , getMinY , getNumBands , getNumDataElements , getParent , getPixel , getPixel , getPixel , getPixels , getPixels , getPixels , getSample , getSampleDouble , getSampleFloat , getSampleModel , getSampleModelTranslateX , getSampleModelTranslateY , getSamples , getSamples , getSamples , getTransferType , getWidth , toString |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
CairoSurface
public CairoSurface(int width,
int height)
Create a cairo_surface_t with specified width and height.
The format will be ARGB32 with premultiplied alpha and native bit
and word ordering.
CairoSurface
public CairoSurface(int x,
int y,
int width,
int height)
copyAreaNative
public void copyAreaNative(int x,
int y,
int width,
int height,
int dx,
int dy,
int stride)
Copy a portion of this surface to another area on the surface. The given
parameters must be within bounds - count on a segfault otherwise.
x
- The x coordinate of the area to be copied from.y
- The y coordinate of the area to be copied from.width
- The width of the area to be copied.height
- The height of the area to be copied.dx
- The destination x coordinate.dy
- The destination y coordinate.stride
- The scanline stride.
dispose
public void dispose()
Dispose of the native data.
finalize
protected void finalize()
Call dispose() to clean up any native resources allocated.
- finalize in interface Object
getData
public int[] getData()
Convenience method to quickly grab the data array backing this Raster.
- The array behind the databuffer.
isCompatibleColorModel
public static boolean isCompatibleColorModel(ColorModel cm)
Returns whether this ColorModel is compatible with Cairo's native types.
cm
- The color model to check.
- Whether it is compatible.
isCompatibleSampleModel
public static boolean isCompatibleSampleModel(SampleModel sm)
Returns whether this SampleModel is compatible with Cairo's native types.
sm
- The sample model to check.
- Whether it is compatible.
nativeDrawSurface
public void nativeDrawSurface(long surfacePointer,
long contextPointer,
double[] i2u,
double alpha,
int interpolation)
Draws this image to a given CairoGraphics context,
with an affine transform given by i2u.
CairoSurface.java
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.