• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java PathConsumer2D类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Stroker

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
/**
 * Constructs a <code>Stroker</code>.
 *
 * @param pc2d an output <code>PathConsumer2D</code>.
 * @param lineWidth the desired line width in pixels
 * @param capStyle the desired end cap style, one of
 * <code>CAP_BUTT</code>, <code>CAP_ROUND</code> or
 * <code>CAP_SQUARE</code>.
 * @param joinStyle the desired line join style, one of
 * <code>JOIN_MITER</code>, <code>JOIN_ROUND</code> or
 * <code>JOIN_BEVEL</code>.
 * @param miterLimit the desired miter limit
 */
public Stroker(PathConsumer2D pc2d,
               float lineWidth,
               int capStyle,
               int joinStyle,
               float miterLimit)
{
    this.out = pc2d;

    this.lineWidth2 = lineWidth / 2;
    this.capStyle = capStyle;
    this.joinStyle = joinStyle;

    float limit = miterLimit * lineWidth2;
    this.miterLimitSq = limit*limit;

    this.prev = CLOSE;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:Stroker.java


示例2: pop

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
public void pop(PathConsumer2D io) {
    numCurves--;
    int type = curveTypes[numCurves];
    end -= (type - 2);
    switch(type) {
    case 8:
        io.curveTo(curves[end+0], curves[end+1],
                   curves[end+2], curves[end+3],
                   curves[end+4], curves[end+5]);
        break;
    case 6:
        io.quadTo(curves[end+0], curves[end+1],
                   curves[end+2], curves[end+3]);
         break;
    case 4:
        io.lineTo(curves[end], curves[end+1]);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:Stroker.java


示例3: deltaTransformConsumer

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
public static PathConsumer2D
    deltaTransformConsumer(PathConsumer2D out,
                           AffineTransform at)
{
    if (at == null) {
        return out;
    }
    float Mxx = (float) at.getScaleX();
    float Mxy = (float) at.getShearX();
    float Myx = (float) at.getShearY();
    float Myy = (float) at.getScaleY();
    if (Mxy == 0f && Myx == 0f) {
        if (Mxx == 1f && Myy == 1f) {
            return out;
        } else {
            return new DeltaScaleFilter(out, Mxx, Myy);
        }
    } else {
        return new DeltaTransformFilter(out, Mxx, Mxy, Myx, Myy);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:TransformingPathConsumer2D.java


示例4: inverseDeltaTransformConsumer

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
public static PathConsumer2D
    inverseDeltaTransformConsumer(PathConsumer2D out,
                                  AffineTransform at)
{
    if (at == null) {
        return out;
    }
    float Mxx = (float) at.getScaleX();
    float Mxy = (float) at.getShearX();
    float Myx = (float) at.getShearY();
    float Myy = (float) at.getScaleY();
    if (Mxy == 0f && Myx == 0f) {
        if (Mxx == 1f && Myy == 1f) {
            return out;
        } else {
            return new DeltaScaleFilter(out, 1.0f/Mxx, 1.0f/Myy);
        }
    } else {
        float det = Mxx * Myy - Mxy * Myx;
        return new DeltaTransformFilter(out,
                                        Myy / det,
                                        -Mxy / det,
                                        -Myx / det,
                                        Mxx / det);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:TransformingPathConsumer2D.java


示例5: strokeTo

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
public void strokeTo(Shape src,
                     AffineTransform at,
                     BasicStroke bs,
                     boolean thin,
                     boolean normalize,
                     boolean antialias,
                     PathConsumer2D consumer)
{
    System.out.println(name+".strokeTo("+
                       src.getClass().getName()+", "+
                       at+", "+
                       bs+", "+
                       (thin ? "thin" : "wide")+", "+
                       (normalize ? "normalized" : "pure")+", "+
                       (antialias ? "AA" : "non-AA")+", "+
                       consumer.getClass().getName()+")");
    target.strokeTo(src, at, bs, thin, normalize, antialias, consumer);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:RenderingEngine.java


示例6: Stroker

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
/**
 * Constructs a {@code Stroker}.
 *
 * @param pc2d an output {@code PathConsumer2D}.
 * @param lineWidth the desired line width in pixels
 * @param capStyle the desired end cap style, one of
 * {@code CAP_BUTT}, {@code CAP_ROUND} or
 * {@code CAP_SQUARE}.
 * @param joinStyle the desired line join style, one of
 * {@code JOIN_MITER}, {@code JOIN_ROUND} or
 * {@code JOIN_BEVEL}.
 * @param miterLimit the desired miter limit
 */
public Stroker(PathConsumer2D pc2d,
               float lineWidth,
               int capStyle,
               int joinStyle,
               float miterLimit)
{
    this.out = pc2d;

    this.lineWidth2 = lineWidth / 2;
    this.capStyle = capStyle;
    this.joinStyle = joinStyle;

    float limit = miterLimit * lineWidth2;
    this.miterLimitSq = limit*limit;

    this.prev = CLOSE;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:31,代码来源:Stroker.java


示例7: init

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
/**
 * Inits the <code>Stroker</code>.
 *
 * @param pc2d an output <code>PathConsumer2D</code>.
 * @param lineWidth the desired line width in pixels
 * @param capStyle the desired end cap style, one of
 * <code>CAP_BUTT</code>, <code>CAP_ROUND</code> or
 * <code>CAP_SQUARE</code>.
 * @param joinStyle the desired line join style, one of
 * <code>JOIN_MITER</code>, <code>JOIN_ROUND</code> or
 * <code>JOIN_BEVEL</code>.
 * @param miterLimit the desired miter limit
 * @return this instance
 */
Stroker init(PathConsumer2D pc2d,
          float lineWidth,
          int capStyle,
          int joinStyle,
          float miterLimit)
{
    this.out = pc2d;

    this.lineWidth2 = lineWidth / 2.0f;
    this.invHalfLineWidth2Sq = 1.0f / (2.0f * lineWidth2 * lineWidth2);
    this.capStyle = capStyle;
    this.joinStyle = joinStyle;

    float limit = miterLimit * lineWidth2;
    this.miterLimitSq = limit * limit;

    this.prev = CLOSE;

    rdrCtx.stroking = 1;

    return this; // fluent API
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:37,代码来源:Stroker.java


示例8: deltaTransformConsumer

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
PathConsumer2D deltaTransformConsumer(PathConsumer2D out,
                                      AffineTransform at)
{
    if (at == null) {
        return out;
    }
    float mxx = (float) at.getScaleX();
    float mxy = (float) at.getShearX();
    float myx = (float) at.getShearY();
    float myy = (float) at.getScaleY();

    if (mxy == 0.0f && myx == 0.0f) {
        if (mxx == 1.0f && myy == 1.0f) {
            return out;
        } else {
            return dt_DeltaScaleFilter.init(out, mxx, myy);
        }
    } else {
        return dt_DeltaTransformFilter.init(out, mxx, mxy, myx, myy);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:TransformingPathConsumer2D.java


示例9: inverseDeltaTransformConsumer

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
PathConsumer2D inverseDeltaTransformConsumer(PathConsumer2D out,
                                             AffineTransform at)
{
    if (at == null) {
        return out;
    }
    float mxx = (float) at.getScaleX();
    float mxy = (float) at.getShearX();
    float myx = (float) at.getShearY();
    float myy = (float) at.getScaleY();

    if (mxy == 0.0f && myx == 0.0f) {
        if (mxx == 1.0f && myy == 1.0f) {
            return out;
        } else {
            return iv_DeltaScaleFilter.init(out, 1.0f/mxx, 1.0f/myy);
        }
    } else {
        float det = mxx * myy - mxy * myx;
        return iv_DeltaTransformFilter.init(out,
                                            myy / det,
                                           -mxy / det,
                                           -myx / det,
                                            mxx / det);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:TransformingPathConsumer2D.java


示例10: init

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
/**
 * Inits the <code>Stroker</code>.
 *
 * @param pc2d an output <code>PathConsumer2D</code>.
 * @param lineWidth the desired line width in pixels
 * @param capStyle the desired end cap style, one of
 * <code>CAP_BUTT</code>, <code>CAP_ROUND</code> or
 * <code>CAP_SQUARE</code>.
 * @param joinStyle the desired line join style, one of
 * <code>JOIN_MITER</code>, <code>JOIN_ROUND</code> or
 * <code>JOIN_BEVEL</code>.
 * @param miterLimit the desired miter limit
 * @return this instance
 */
Stroker init(PathConsumer2D pc2d,
          float lineWidth,
          int capStyle,
          int joinStyle,
          float miterLimit)
{
    this.out = pc2d;

    this.lineWidth2 = lineWidth / 2f;
    this.invHalfLineWidth2Sq = 1f / (2f * lineWidth2 * lineWidth2);
    this.capStyle = capStyle;
    this.joinStyle = joinStyle;

    float limit = miterLimit * lineWidth2;
    this.miterLimitSq = limit * limit;

    this.prev = CLOSE;

    rdrCtx.stroking = 1;

    return this; // fluent API
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:37,代码来源:Stroker.java


示例11: deltaTransformConsumer

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
PathConsumer2D deltaTransformConsumer(PathConsumer2D out,
                                      AffineTransform at)
{
    if (at == null) {
        return out;
    }
    float mxx = (float) at.getScaleX();
    float mxy = (float) at.getShearX();
    float myx = (float) at.getShearY();
    float myy = (float) at.getScaleY();

    if (mxy == 0f && myx == 0f) {
        if (mxx == 1f && myy == 1f) {
            return out;
        } else {
            return dt_DeltaScaleFilter.init(out, mxx, myy);
        }
    } else {
        return dt_DeltaTransformFilter.init(out, mxx, mxy, myx, myy);
    }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:22,代码来源:TransformingPathConsumer2D.java


示例12: inverseDeltaTransformConsumer

import sun.awt.geom.PathConsumer2D; //导入依赖的package包/类
PathConsumer2D inverseDeltaTransformConsumer(PathConsumer2D out,
                                             AffineTransform at)
{
    if (at == null) {
        return out;
    }
    float mxx = (float) at.getScaleX();
    float mxy = (float) at.getShearX();
    float myx = (float) at.getShearY();
    float myy = (float) at.getScaleY();

    if (mxy == 0f && myx == 0f) {
        if (mxx == 1f && myy == 1f) {
            return out;
        } else {
            return iv_DeltaScaleFilter.init(out, 1.0f/mxx, 1.0f/myy);
        }
    } else {
        float det = mxx * myy - mxy * myx;
        return iv_DeltaTransformFilter.init(out,
                                            myy / det,
                                           -mxy / det,
                                           -myx / det,
                                            mxx / det);
    }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:27,代码来源:TransformingPathConsumer2D.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SunPageSelection类代码示例发布时间:2022-05-21
下一篇:
Java NativeExpressAdView类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap