本文整理汇总了Java中sun.awt.image.SunVolatileImage.getDestSurface方法的典型用法代码示例。如果您正苦于以下问题:Java SunVolatileImage.getDestSurface方法的具体用法?Java SunVolatileImage.getDestSurface怎么用?Java SunVolatileImage.getDestSurface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.awt.image.SunVolatileImage
的用法示例。
在下文中一共展示了SunVolatileImage.getDestSurface方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCompatibleVolatileImage
import sun.awt.image.SunVolatileImage; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*
* @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
*/
@Override
public VolatileImage
createCompatibleVolatileImage(int width, int height,
int transparency, int type)
{
if ((type != FBOBJECT && type != TEXTURE)
|| transparency == Transparency.BITMASK
|| type == FBOBJECT && !isCapPresent(CAPS_EXT_FBOBJECT)) {
return null;
}
SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
transparency, type);
Surface sd = vi.getDestSurface();
if (!(sd instanceof AccelSurface) ||
((AccelSurface)sd).getType() != type)
{
vi.flush();
vi = null;
}
return vi;
}
示例2: createCompatibleVolatileImage
import sun.awt.image.SunVolatileImage; //导入方法依赖的package包/类
@Override
public VolatileImage createCompatibleVolatileImage(int width, int height,
int transparency,
int type) {
if ((type != FBOBJECT && type != TEXTURE)
|| transparency == Transparency.BITMASK
|| type == FBOBJECT && !isCapPresent(CAPS_EXT_FBOBJECT)) {
return null;
}
SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
transparency, type);
Surface sd = vi.getDestSurface();
if (!(sd instanceof AccelSurface) ||
((AccelSurface)sd).getType() != type)
{
vi.flush();
vi = null;
}
return vi;
}
示例3: createCompatibleVolatileImage
import sun.awt.image.SunVolatileImage; //导入方法依赖的package包/类
@Override
public VolatileImage createCompatibleVolatileImage(int width, int height,
int transparency,
int type) {
if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
transparency == Transparency.BITMASK)
{
return null;
}
if (type == FBOBJECT) {
if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
return null;
}
} else if (type == PBUFFER) {
boolean isOpaque = transparency == Transparency.OPAQUE;
if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
return null;
}
}
SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
transparency, type);
Surface sd = vi.getDestSurface();
if (!(sd instanceof AccelSurface) ||
((AccelSurface)sd).getType() != type)
{
vi.flush();
vi = null;
}
return vi;
}
示例4: createCompatibleVolatileImage
import sun.awt.image.SunVolatileImage; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*
* @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
*/
@Override
public VolatileImage
createCompatibleVolatileImage(int width, int height,
int transparency, int type)
{
if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
transparency == Transparency.BITMASK)
{
return null;
}
boolean isOpaque = transparency == Transparency.OPAQUE;
if (type == RT_TEXTURE) {
int cap = isOpaque ? CAPS_RT_TEXTURE_OPAQUE : CAPS_RT_TEXTURE_ALPHA;
if (!device.isCapPresent(cap)) {
return null;
}
} else if (type == RT_PLAIN) {
if (!isOpaque && !device.isCapPresent(CAPS_RT_PLAIN_ALPHA)) {
return null;
}
}
SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
transparency, type);
Surface sd = vi.getDestSurface();
if (!(sd instanceof AccelSurface) ||
((AccelSurface)sd).getType() != type)
{
vi.flush();
vi = null;
}
return vi;
}
示例5: createCompatibleVolatileImage
import sun.awt.image.SunVolatileImage; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*
* @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
*/
@Override
public VolatileImage
createCompatibleVolatileImage(int width, int height,
int transparency, int type)
{
if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
transparency == Transparency.BITMASK)
{
return null;
}
if (type == FBOBJECT) {
if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
return null;
}
} else if (type == PBUFFER) {
boolean isOpaque = transparency == Transparency.OPAQUE;
if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
return null;
}
}
SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
transparency, type);
Surface sd = vi.getDestSurface();
if (!(sd instanceof AccelSurface) ||
((AccelSurface)sd).getType() != type)
{
vi.flush();
vi = null;
}
return vi;
}
示例6: createCompatibleVolatileImage
import sun.awt.image.SunVolatileImage; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*
* @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
*/
public VolatileImage
createCompatibleVolatileImage(int width, int height,
int transparency, int type)
{
if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
transparency == Transparency.BITMASK)
{
return null;
}
if (type == FBOBJECT) {
if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
return null;
}
} else if (type == PBUFFER) {
boolean isOpaque = transparency == Transparency.OPAQUE;
if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
return null;
}
}
SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
transparency, type);
Surface sd = vi.getDestSurface();
if (!(sd instanceof AccelSurface) ||
((AccelSurface)sd).getType() != type)
{
vi.flush();
vi = null;
}
return vi;
}