本文整理汇总了Java中org.apache.batik.gvt.GraphicsNode.setTransform方法的典型用法代码示例。如果您正苦于以下问题:Java GraphicsNode.setTransform方法的具体用法?Java GraphicsNode.setTransform怎么用?Java GraphicsNode.setTransform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.batik.gvt.GraphicsNode
的用法示例。
在下文中一共展示了GraphicsNode.setTransform方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: graphicFillLineString
import org.apache.batik.gvt.GraphicsNode; //导入方法依赖的package包/类
private static void graphicFillLineString(final LineSymbolizer symbolizer, final Shape shape, final GraphicsNode node, final float size,
final double opacity) {
AffineTransform translate = AffineTransform.getTranslateInstance(-node.getBounds().getMinX(), -node.getBounds().getMinY());
node.setTransform(translate);
BufferedImage buff = new BufferedImage((int) node.getBounds().getWidth(), (int) node.getBounds().getHeight(), BufferedImage.TYPE_INT_ARGB);
node.paint((Graphics2D) buff.getGraphics());
graphicFillLineString(symbolizer, shape, buff, size, opacity);
}
示例2: graphicStrokeLineString
import org.apache.batik.gvt.GraphicsNode; //导入方法依赖的package包/类
private static void graphicStrokeLineString(final LineSymbolizer symbolizer, final Shape shape, final GraphicsNode node, final float size,
final double opacity) {
double width = node.getBounds().getWidth();
double height = node.getBounds().getHeight();
List<AffineTransform> transforms = getGraphicStrokeLineStringTransforms(symbolizer, shape, size, width, height);
for (AffineTransform t : transforms) {
AffineTransform tr = AffineTransform.getTranslateInstance(-node.getBounds().getMinX(), -node.getBounds().getMinY());
t.concatenate(tr);
node.setTransform(t);
logger.warn("Replace by a GL function");
// node.paint(graphics);
}
}
示例3: drawGraphicFillPolygon
import org.apache.batik.gvt.GraphicsNode; //导入方法依赖的package包/类
public static void drawGraphicFillPolygon(GraphicsNode node, float size, Graphics2D graphics, double opacity, double widthSymbol, double heightSymbol, double offsetYSymbol, double offsetXSymbol) {
AffineTransform translate = AffineTransform.getTranslateInstance(-node.getBounds().getMinX(), -node.getBounds().getMinY());
node.setTransform(translate);
BufferedImage buff = new BufferedImage((int) node.getBounds().getWidth(), (int) node.getBounds().getHeight(), BufferedImage.TYPE_INT_ARGB);
node.paint((Graphics2D) buff.getGraphics());
drawGraphicFillPolygon(buff, size, graphics, opacity, widthSymbol, heightSymbol, offsetYSymbol, offsetXSymbol);
}
示例4: graphicFillLineString
import org.apache.batik.gvt.GraphicsNode; //导入方法依赖的package包/类
private static void graphicFillLineString(Shape shape, GraphicsNode node,
float size, Graphics2D graphics, double opacity) {
AffineTransform translate = AffineTransform.getTranslateInstance(
-node.getBounds().getMinX(), -node.getBounds().getMinY());
node.setTransform(translate);
BufferedImage buff = new BufferedImage(
(int) node.getBounds().getWidth(),
(int) node.getBounds().getHeight(),
BufferedImage.TYPE_INT_ARGB);
node.paint((Graphics2D) buff.getGraphics());
graphicFillLineString(shape, buff, size, graphics, opacity);
}
示例5: graphicStrokeLineString
import org.apache.batik.gvt.GraphicsNode; //导入方法依赖的package包/类
private static void graphicStrokeLineString(Shape shape, GraphicsNode node,
float size, Graphics2D graphics, double opacity) {
double width = node.getBounds().getWidth();
double height = node.getBounds().getHeight();
List<AffineTransform> transforms = getGraphicStrokeLineStringTransforms(
shape, size, width, height, 0.0);
for (AffineTransform t : transforms) {
AffineTransform tr = AffineTransform.getTranslateInstance(
-node.getBounds().getMinX(), -node.getBounds().getMinY());
t.concatenate(tr);
node.setTransform(t);
node.paint(graphics);
}
}
示例6: graphicFillPolygon
import org.apache.batik.gvt.GraphicsNode; //导入方法依赖的package包/类
private static void graphicFillPolygon(Shape shape, GraphicsNode node,
float size, Graphics2D graphics, double opacity) {
AffineTransform translate = AffineTransform.getTranslateInstance(
-node.getBounds().getMinX(), -node.getBounds().getMinY());
node.setTransform(translate);
BufferedImage buff = new BufferedImage(
(int) node.getBounds().getWidth(),
(int) node.getBounds().getHeight(),
BufferedImage.TYPE_INT_ARGB);
node.paint((Graphics2D) buff.getGraphics());
graphicFillPolygon(shape, buff, size, graphics, opacity);
}
示例7: setTransform
import org.apache.batik.gvt.GraphicsNode; //导入方法依赖的package包/类
/**
* Sets the graphics node's transform to the current animated transform
* value.
*/
protected void setTransform(GraphicsNode n, Element e, BridgeContext ctx) {
n.setTransform(computeTransform((SVGTransformable) e, ctx));
}