本文整理汇总了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;
}
示例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;
}
示例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
}
示例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);
}
示例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);
}
示例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);
}
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例14: vertexFactory
import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public final Vertex.Factory<? extends Vertex> vertexFactory() {
return shape.vertexFactory();
}
示例15: getVertexFactory
import com.jogamp.graph.geom.Vertex.Factory; //导入依赖的package包/类
public Factory<? extends Vertex> getVertexFactory()
{
return renderer.getRenderState().getVertexFactory();
}