ComponentGraphics - context for drawing directly to a component,
as this is an X drawable, it requires that we use GTK locks.
This context draws directly to the drawable and requires xrender.
draw
public void draw(Shape s)
Overloaded methods that do actual drawing need to enter the gdk threads
and also do certain things before and after.
- draw in interface CairoGraphics2D
hasXRender
public static boolean hasXRender()
Query if the system has the XRender extension.
initFromVolatile
protected long initFromVolatile(long pixmapPtr)
Creates a cairo_t for a volatile image
long init
protected @Override long init(long pointer)
void cairoArc
protected @Override void cairoArc(long pointer,
double x,
double y,
double radius,
double angle1,
double angle2)
void cairoCurveTo
protected @Override void cairoCurveTo(long pointer,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
void cairoFill
protected @Override void cairoFill(long pointer,
double alpha)
void cairoLineTo
protected @Override void cairoLineTo(long pointer,
double x,
double y)
void cairoMoveTo
protected @Override void cairoMoveTo(long pointer,
double x,
double y)
void cairoRectangle
protected @Override void cairoRectangle(long pointer,
double x,
double y,
double width,
double height)
void cairoScale
protected @Override void cairoScale(long pointer,
double x,
double y)
void cairoSetDash
protected @Override void cairoSetDash(long pointer,
double[] dashes,
int ndash,
double offset)
void cairoSetLine
protected @Override void cairoSetLine(long pointer,
double width,
int cap,
int join,
double miterLimit)
void cairoSetRGBAColor
protected @Override void cairoSetRGBAColor(long pointer,
double red,
double green,
double blue,
double alpha)
void drawPixels
protected @Override void drawPixels(long pointer,
int[] pixels,
int w,
int h,
int stride,
double[] i2u,
double alpha,
int interpolation)
void setGradient
protected @Override void setGradient(long pointer,
double x1,
double y1,
double x2,
double y2,
int r1,
int g1,
int b1,
int a1,
int r2,
int g2,
int b2,
int a2,
boolean cyclic)
void setPaintPixels
protected @Override void setPaintPixels(long pointer,
int[] pixels,
int w,
int h,
int stride,
boolean repeat,
int x,
int y)
ComponentGraphics.java --
Copyright (C) 2006 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.