本文整理汇总了Java中sun.java2d.loops.GraphicsPrimitive类的典型用法代码示例。如果您正苦于以下问题:Java GraphicsPrimitive类的具体用法?Java GraphicsPrimitive怎么用?Java GraphicsPrimitive使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GraphicsPrimitive类属于sun.java2d.loops包,在下文中一共展示了GraphicsPrimitive类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makePrimitive
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
CompositeType comptype,
SurfaceType dsttype)
{
/*
new Throwable().printStackTrace();
System.out.println("Constructing general maskblit for:");
System.out.println("src: "+srctype);
System.out.println("comp: "+comptype);
System.out.println("dst: "+dsttype);
*/
if (CompositeType.Xor.equals(comptype)) {
throw new InternalError("Cannot construct MaskBlit for " +
"XOR mode");
}
General ob = new General(srctype, comptype, dsttype);
setupGeneralBinaryOp(ob);
return ob;
}
示例2: makePrimitive
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
CompositeType comptype,
SurfaceType dsttype)
{
if (SurfaceType.OpaqueColor.equals(srctype) ||
SurfaceType.AnyColor.equals(srctype))
{
if (CompositeType.Xor.equals(comptype)) {
throw new InternalError("Cannot construct MaskFill for " +
"XOR mode");
} else {
return new General(srctype, comptype, dsttype);
}
} else {
throw new InternalError("MaskFill can only fill with colors");
}
}
示例3: makePrimitive
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
CompositeType comptype,
SurfaceType dsttype)
{
/*
System.out.println("Constructing general blit for:");
System.out.println("src: "+srctype);
System.out.println("comp: "+comptype);
System.out.println("dst: "+dsttype);
*/
if (comptype.isDerivedFrom(CompositeType.Xor)) {
GeneralXorBlit gxb = new GeneralXorBlit(srctype,
comptype,
dsttype);
setupGeneralBinaryOp(gxb);
return gxb;
} else if (comptype.isDerivedFrom(CompositeType.AnyAlpha)) {
return new GeneralMaskBlit(srctype, comptype, dsttype);
} else {
return AnyBlit.instance;
}
}
示例4: register
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
/**
* Note that we do not register loops to 8-byte destinations. This
* is due to faster processing of dithering through our software
* loops than through GDI StretchBlt processing.
*/
public static void register()
{
GraphicsPrimitive[] primitives = {
new GDIBlitLoops(SurfaceType.IntRgb,
GDIWindowSurfaceData.AnyGdi),
new GDIBlitLoops(SurfaceType.Ushort555Rgb,
GDIWindowSurfaceData.AnyGdi,
0x7C00, 0x03E0, 0x001F),
new GDIBlitLoops(SurfaceType.Ushort565Rgb,
GDIWindowSurfaceData.AnyGdi,
0xF800, 0x07E0, 0x001F),
new GDIBlitLoops(SurfaceType.ThreeByteBgr,
GDIWindowSurfaceData.AnyGdi),
new GDIBlitLoops(SurfaceType.ByteIndexedOpaque,
GDIWindowSurfaceData.AnyGdi,
true),
new GDIBlitLoops(SurfaceType.Index8Gray,
GDIWindowSurfaceData.AnyGdi,
true),
new GDIBlitLoops(SurfaceType.ByteGray,
GDIWindowSurfaceData.AnyGdi),
};
GraphicsPrimitiveMgr.register(primitives);
}
示例5: makePrimitive
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
CompositeType comptype,
SurfaceType dsttype)
{
// REMIND: iterate with a FillRect primitive?
throw new InternalError("FillSpans not implemented for "+
srctype+" with "+comptype);
}
示例6: drawParallelogram
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public void drawParallelogram(SunGraphics2D sg2d,
double ux1, double uy1,
double ux2, double uy2,
double x, double y,
double dx1, double dy1,
double dx2, double dy2,
double lw1, double lw2)
{
GraphicsPrimitive.tracePrimitive("D3DDrawParallelogram");
d3dr.drawParallelogram(sg2d,
ux1, uy1, ux2, uy2,
x, y, dx1, dy1, dx2, dy2, lw1, lw2);
}
示例7: doDrawArc
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
void doDrawArc(GDIWindowSurfaceData sData,
Region clip, Composite comp, int color,
int x, int y, int w, int h,
int angleStart, int angleExtent)
{
GraphicsPrimitive.tracePrimitive("GDIDrawArc");
super.doDrawArc(sData, clip, comp, color, x, y, w, h,
angleStart, angleExtent);
}
示例8: register
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
static void register() {
GraphicsPrimitive[] primitives = {
new OGLMaskBlit(IntArgb, SrcOver),
new OGLMaskBlit(IntArgbPre, SrcOver),
new OGLMaskBlit(IntRgb, SrcOver),
new OGLMaskBlit(IntRgb, SrcNoEa),
new OGLMaskBlit(IntBgr, SrcOver),
new OGLMaskBlit(IntBgr, SrcNoEa),
};
GraphicsPrimitiveMgr.register(primitives);
}
示例9: register
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public static void register()
{
GraphicsPrimitive[] primitives = {
new X11PMBlitBgLoops(X11SurfaceData.IntBgrX11_BM,
X11SurfaceData.IntBgrX11),
new X11PMBlitBgLoops(X11SurfaceData.IntRgbX11_BM,
X11SurfaceData.IntRgbX11),
new X11PMBlitBgLoops(X11SurfaceData.ThreeByteBgrX11_BM,
X11SurfaceData.ThreeByteBgrX11),
new X11PMBlitBgLoops(X11SurfaceData.ThreeByteRgbX11_BM,
X11SurfaceData.ThreeByteRgbX11),
new X11PMBlitBgLoops(X11SurfaceData.ByteIndexedX11_BM,
X11SurfaceData.ByteIndexedOpaqueX11),
new X11PMBlitBgLoops(X11SurfaceData.ByteGrayX11_BM,
X11SurfaceData.ByteGrayX11),
new X11PMBlitBgLoops(X11SurfaceData.Index8GrayX11_BM,
X11SurfaceData.Index8GrayX11),
new X11PMBlitBgLoops(X11SurfaceData.UShort555RgbX11_BM,
X11SurfaceData.UShort555RgbX11),
new X11PMBlitBgLoops(X11SurfaceData.UShort565RgbX11_BM,
X11SurfaceData.UShort565RgbX11),
new X11PMBlitBgLoops(X11SurfaceData.UShortIndexedX11_BM,
X11SurfaceData.UShortIndexedX11),
new X11PMBlitBgLoops(X11SurfaceData.IntRgbX11_BM,
X11SurfaceData.IntArgbPreX11),
new X11PMBlitBgLoops(X11SurfaceData.IntBgrX11_BM,
X11SurfaceData.FourByteAbgrPreX11),
};
GraphicsPrimitiveMgr.register(primitives);
}
示例10: makePrimitive
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
CompositeType comptype,
SurfaceType dsttype)
{
/*
System.out.println("Constructing general blitbg for:");
System.out.println("src: "+srctype);
System.out.println("comp: "+comptype);
System.out.println("dst: "+dsttype);
*/
return new General(srctype, comptype, dsttype);
}
示例11: makePrimitive
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
CompositeType comptype,
SurfaceType dsttype)
{
// REMIND: use FillSpans or converter object?
throw new InternalError("DrawPolygons not implemented for "+
srctype+" with "+comptype);
}
示例12: makePrimitive
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
CompositeType comptype,
SurfaceType dsttype)
{
/*
System.out.println("Constructing general blit for:");
System.out.println("src: "+srctype);
System.out.println("comp: "+comptype);
System.out.println("dst: "+dsttype);
*/
return null;
}
示例13: makePrimitive
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
CompositeType comptype,
SurfaceType dsttype)
{
// REMIND: iterate with a FillRect primitive?
throw new InternalError("FillParallelogram not implemented for "+
srctype+" with "+comptype);
}
示例14: register
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
static void register() {
GraphicsPrimitive[] primitives = {
new D3DMaskBlit(IntArgb, SrcOver),
new D3DMaskBlit(IntArgbPre, SrcOver),
new D3DMaskBlit(IntRgb, SrcOver),
new D3DMaskBlit(IntRgb, SrcNoEa),
new D3DMaskBlit(IntBgr, SrcOver),
new D3DMaskBlit(IntBgr, SrcNoEa),
};
GraphicsPrimitiveMgr.register(primitives);
}
示例15: drawParallelogram
import sun.java2d.loops.GraphicsPrimitive; //导入依赖的package包/类
public void drawParallelogram(SunGraphics2D sg2d,
double ux1, double uy1,
double ux2, double uy2,
double x, double y,
double dx1, double dy1,
double dx2, double dy2,
double lw1, double lw2)
{
GraphicsPrimitive.tracePrimitive("OGLDrawParallelogram");
oglr.drawParallelogram(sg2d,
ux1, uy1, ux2, uy2,
x, y, dx1, dy1, dx2, dy2, lw1, lw2);
}