【问题标题】:Changing line width for drawing into canvas (gwt)更改画布的线宽 (gwt)
【发布时间】:2012-07-11 10:45:35
【问题描述】:

我有一个方法可以在我的画布中绘制一个六边形。

    context.beginPath();
    context.moveTo(points.get(0).X(), points.get(0).Y());
    context.lineTo(points.get(1).X(), points.get(1).Y());
    context.lineTo(points.get(2).X(), points.get(2).Y());
    context.lineTo(points.get(3).X(), points.get(3).Y());
    context.lineTo(points.get(4).X(), points.get(4).Y());
    context.lineTo(points.get(5).X(), points.get(5).Y());
    context.lineTo(points.get(0).X(), points.get(0).Y());
    context.stroke();

如何控制画线的宽度?

【问题讨论】:

    标签: gwt canvas


    【解决方案1】:

    您正在寻找:

    context.setLineWidth(10);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-24
      • 2022-10-19
      相关资源
      最近更新 更多