当前位置: 首页>>代码示例>>Java>>正文


Java Factory类代码示例

本文整理汇总了Java中com.jogamp.graph.geom.Vertex.Factory的典型用法代码示例。如果您正苦于以下问题:Java Factory类的具体用法?Java Factory怎么用?Java Factory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Factory类属于com.jogamp.graph.geom.Vertex包,在下文中一共展示了Factory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getOutlineShapes

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public static List<OutlineShape> getOutlineShapes(TypecastFont font, CharSequence string, float pixelSize,
        AffineTransform transform, Factory<? extends Vertex> vertexFactory) {
    Path2D[] paths = new Path2D[string.length()];
    getPaths(font, string, pixelSize, transform, paths);

    ArrayList<OutlineShape> shapes = new ArrayList<OutlineShape>();
    final int numGlyps = paths.length;
    for (int index = 0; index < numGlyps; index++) {
        if (paths[index] == null) {
            continue;
        }
        OutlineShape shape = new OutlineShape(vertexFactory);
        shapes.add(shape);
        PathIterator iterator = paths[index].iterator(transform);
        if (null != iterator) {
            while (!iterator.isDone()) {
                float[] coords = new float[6];
                int segmentType = iterator.currentSegment(coords);
                addPathVertexToOutline(shape, vertexFactory, coords, segmentType);
                iterator.next();
            }
        }
    }
    return shapes;
}
 
开发者ID:NLeSC,项目名称:Neon,代码行数:26,代码来源:TypecastRenderer.java

示例2: GLEventListenerButton

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public GLEventListenerButton(final Factory<? extends Vertex> factory, final int renderModes,
                             final float width, final float height, final int textureUnit,
                             final GLEventListener glel, final boolean useAlpha, final int fboWidth, final int fboHeight) {
    super(factory, renderModes, width, height, new ImageSequence(textureUnit, true));
    this.glel = glel;
    this.useAlpha = useAlpha;

    setColor(0.95f, 0.95f, 0.95f, 1.0f);
    setPressedColorMod(1f, 1f, 1f, 0.9f);
    setToggleOffColorMod(0.8f, 0.8f, 0.8f, 1.0f);
    setToggleOnColorMod(1.0f, 1.0f, 1.0f, 1.0f);

    this.fboWidth = fboWidth;
    this.fboHeight = fboHeight;
}
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:16,代码来源:GLEventListenerButton.java

示例3: MediaPlayerButton

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
/**
 * @param factory
 * @param renderModes
 * @param width
 * @param height
 * @param mPlayer
 * @param mPlayerListener
 */
public MediaPlayerButton(final Factory<? extends Vertex> factory, final int renderModes,
                         final float width, final float height,
                         final GLMediaPlayer mPlayer) {
    super(factory, renderModes, width, height, mPlayer);
    setColor(0.8f, 0.8f, 0.8f, 1.0f);
    setPressedColorMod(1.1f, 1.1f, 1.1f, 0.7f);
    setToggleOffColorMod(0.8f, 0.8f, 0.8f, 1.0f);
    setToggleOnColorMod(1.0f, 1.0f, 1.0f, 1.0f);
    setEnabled(false); // data and shader n/a yet
}
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:19,代码来源:MediaPlayerButton.java

示例4: LabelButton

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public LabelButton(final Factory<? extends Vertex> factory, final int renderModes,
                   final Font labelFont, final String labelText,
                   final float width, final float height) {
    super(factory, renderModes | Region.COLORCHANNEL_RENDERING_BIT, width, height);
    this.label = new Label0(labelFont, labelText, new float[] { 1.33f, 1.33f, 1.33f, 1.0f }); // 0.75 * 1.33 = 1.0
    setColor(0.75f, 0.75f, 0.75f, 1.0f);
    setPressedColorMod(0.9f, 0.9f, 0.9f, 0.7f);
    setToggleOffColorMod(0.65f, 0.65f, 0.65f, 1.0f);
    setToggleOnColorMod(0.85f, 0.85f, 0.85f, 1.0f);
}
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:11,代码来源:LabelButton.java

示例5: ImageSeqButton

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public ImageSeqButton(final Factory<? extends Vertex> factory, final int renderModes,
                     final float width, final float height, final ImageSequence texSeq) {
    super(factory, renderModes, width, height, texSeq);
    setColor(0.95f, 0.95f, 0.95f, 1.0f);
    setPressedColorMod(1f, 1f, 1f, 0.9f);
    setToggleOffColorMod(0.8f, 0.8f, 0.8f, 1.0f);
    setToggleOnColorMod(1.0f, 1.0f, 1.0f, 1.0f);
}
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:9,代码来源:ImageSeqButton.java

示例6: addPathVertexToOutline

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
private static void addPathVertexToOutline(OutlineShape shape, Factory<? extends Vertex> vertexFactory,
        float[] coords, int segmentType) {
    switch (segmentType) {
    case PathIterator.SEG_MOVETO:
        shape.closeLastOutline();
        shape.addEmptyOutline();
        shape.addVertex(0, vertexFactory.create(coords, 0, 2, true));
        break;
    case PathIterator.SEG_LINETO:
        shape.addVertex(0, vertexFactory.create(coords, 0, 2, true));
        break;
    case PathIterator.SEG_QUADTO:
        shape.addVertex(0, vertexFactory.create(coords, 0, 2, false));
        shape.addVertex(0, vertexFactory.create(coords, 2, 2, true));
        break;
    case PathIterator.SEG_CUBICTO:
        shape.addVertex(0, vertexFactory.create(coords, 0, 2, false));
        shape.addVertex(0, vertexFactory.create(coords, 2, 2, false));
        shape.addVertex(0, vertexFactory.create(coords, 4, 2, true));
        break;
    case PathIterator.SEG_CLOSE:
        shape.closeLastOutline();
        break;
    default:
        throw new IllegalArgumentException("Unhandled Segment Type: " + segmentType);
    }
}
 
开发者ID:NLeSC,项目名称:Neon,代码行数:28,代码来源:TypecastRenderer.java

示例7: RoundButton

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
protected RoundButton(final Factory<? extends Vertex> factory, final int renderModes, final float width, final float height) {
    super(factory, renderModes);
    this.width = width;
    this.height = height;
}
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:6,代码来源:RoundButton.java

示例8: UIShape

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public UIShape(final Factory<? extends Vertex> factory, final int renderModes) {
    this.vertexFactory = factory;
    this.renderModes = renderModes;
    this.box = new AABBox();
}
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:6,代码来源:UIShape.java

示例9: CrossHair

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public CrossHair(final Factory<? extends Vertex> factory, final int renderModes, final float width, final float height, final float linewidth) {
    super(factory, renderModes);
    this.width = width;
    this.height = height;
    this.lineWidth = linewidth;
}
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:7,代码来源:CrossHair.java

示例10: TextureSeqButton

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public TextureSeqButton(final Factory<? extends Vertex> factory, final int renderModes,
                     final float width, final float height, final TextureSequence texSeq) {
    super(factory, renderModes | Region.COLORTEXTURE_RENDERING_BIT, width, height);
    this.texSeq = texSeq;
}
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:6,代码来源:TextureSeqButton.java

示例11: Label

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public Label(final Factory<? extends Vertex> factory, final int renderModes, final Font font, final float pixelSize, final String text) {
    super(factory, renderModes);
    this.font = font;
    this.pixelSize = pixelSize;
    this.text = text;
}
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:7,代码来源:Label.java

示例12: getOutlineShapes

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
@Override
public List<OutlineShape> getOutlineShapes(CharSequence string, float pixelSize,
        Factory<? extends Vertex> vertexFactory) {
    AffineTransform transform = new AffineTransform(vertexFactory);
    return TypecastRenderer.getOutlineShapes(this, string, pixelSize, transform, vertexFactory);
}
 
开发者ID:NLeSC,项目名称:Neon,代码行数:7,代码来源:TypecastFont.java

示例13: GlyphShape

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
/**
 * Create a new Glyph shape based on Parametric curve control polyline
 */
public GlyphShape(Vertex.Factory<? extends Vertex> factory) {
    shape = new OutlineShape(factory);
}
 
开发者ID:NLeSC,项目名称:Neon,代码行数:7,代码来源:GlyphShape.java

示例14: vertexFactory

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public final Vertex.Factory<? extends Vertex> vertexFactory() {
    return shape.vertexFactory();
}
 
开发者ID:NLeSC,项目名称:Neon,代码行数:4,代码来源:GlyphShape.java

示例15: getVertexFactory

import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public Factory<? extends Vertex> getVertexFactory()
{
	return renderer.getRenderState().getVertexFactory();
}
 
开发者ID:philjord,项目名称:3DTools,代码行数:5,代码来源:Canvas3D2D.java


注:本文中的com.jogamp.graph.geom.Vertex.Factory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。