com.ait.lienzo.client.core.shape.Attributes.getInnerRadius()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中com.ait.lienzo.client.core.shape.Attributes.getInnerRadius()方法的一些代码示例,展示了Attributes.getInnerRadius()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attributes.getInnerRadius()方法的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.Attributes
类名称:Attributes
方法名:getInnerRadius

Attributes.getInnerRadius介绍

暂无

代码示例

代码示例来源:origin: com.ahome-it/lienzo-core

/**
 * Gets the {@link Star} inner radius.
 *
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-core

/**
 * Gets the {@link Star} inner radius.
 * 
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: com.ahome-it/lienzo-core

/**
 * Gets the {@link Star} inner radius.
 *
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-core

/**
 * Gets the {@link Star} inner radius.
 * 
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: com.ahome-it/lienzo-core

/**
 * Gets the {@link Star} inner radius.
 *
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-core

/**
 * Gets the {@link Star} inner radius.
 * 
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Gets the {@link Star} inner radius.
 *
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Gets the {@link Star} inner radius.
 *
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Gets the {@link Star} inner radius.
 *
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Gets the {@link Star} inner radius.
 *
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Gets the {@link Star} inner radius.
 *
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Gets the {@link Star} inner radius.
 *
 * @return double
 */
public double getInnerRadius()
{
  return getAttributes().getInnerRadius();
}

代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-core

/**
 * Draws this star.
 * 
 * @param context
 */
@Override
protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
{
  final int s = attr.getStarPoints();
  final double ir = attr.getInnerRadius();
  final double or = attr.getOuterRadius();
  if ((s > 4) && (ir > 0) && (or > 0) && (or > ir))
  {
    context.beginPath();
    context.moveTo(0, 0 - or);
    for (int n = 1; n < s * 2; n++)
    {
      double radius = n % 2 == 0 ? or : ir;
      context.lineTo(radius * Math.sin(n * Math.PI / s), -1 * radius * Math.cos(n * Math.PI / s));
    }
    context.closePath();
    return true;
  }
  return false;
}

代码示例来源:origin: com.ahome-it/lienzo-core

/**
 * Draws this slice.
 *
 * @param context
 */
@Override
protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
{
  final double ord = attr.getOuterRadius();
  final double ird = attr.getInnerRadius();
  if ((ord > 0) && (ird > 0) && (ord > ird))
  {
    context.beginPath();
    context.arc(0, 0, ord, 0, Math.PI * 2, false);
    context.arc(0, 0, ird, 0, Math.PI * 2, true);
    context.closePath();
    return true;
  }
  return false;
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Draws this slice.
 *
 * @param context
 */
@Override
protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
{
  final double ord = attr.getOuterRadius();
  final double ird = attr.getInnerRadius();
  if ((ord > 0) && (ird > 0) && (ord > ird))
  {
    context.beginPath();
    context.arc(0, 0, ord, 0, Math.PI * 2, false);
    context.arc(0, 0, ird, 0, Math.PI * 2, true);
    context.closePath();
    return true;
  }
  return false;
}

代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-core

/**
 * Draws this slice.
 * 
 * @param context
 */
@Override
protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
{
  final double ord = attr.getOuterRadius();
  final double ird = attr.getInnerRadius();
  if ((ord > 0) && (ird > 0) && (ord > ird))
  {
    context.beginPath();
    context.arc(0, 0, ord, 0, Math.PI * 2, false);
    context.arc(0, 0, ird, 0, Math.PI * 2, true);
    context.closePath();
    return true;
  }
  return false;
}

代码示例来源:origin: ahome-it/lienzo-core

/**
 * Draws this slice.
 *
 * @param context
 */
@Override
protected boolean prepare(final Context2D context, final Attributes attr, final double alpha)
{
  final double ord = attr.getOuterRadius();
  final double ird = attr.getInnerRadius();
  if ((ord > 0) && (ird > 0) && (ord > ird))
  {
    context.beginPath();
    context.arc(0, 0, ord, 0, Math.PI * 2, false);
    context.arc(0, 0, ird, 0, Math.PI * 2, true);
    context.closePath();
    return true;
  }
  return false;
}

代码示例来源:origin: ahome-it/lienzo-core

@Override
protected void stroke(final Context2D context, final Attributes attr, final double alpha, final boolean filled)
{
  if (setStrokeParams(context, attr, alpha, filled))
  {
    if ((attr.hasShadow()) && (false == context.isSelection()))
    {
      doApplyShadow(context, attr);
    }
    context.beginPath();
    context.arc(0, 0, attr.getOuterRadius(), 0, Math.PI * 2, false);
    context.closePath();
    context.stroke();
    context.beginPath();
    context.arc(0, 0, attr.getInnerRadius(), 0, Math.PI * 2, true);
    context.closePath();
    context.stroke();
    context.restore();
  }
}

代码示例来源:origin: com.ahome-it/lienzo-core

@Override
protected void stroke(final Context2D context, final Attributes attr, final double alpha, final boolean filled)
{
  if (setStrokeParams(context, attr, alpha, filled))
  {
    if ((attr.hasShadow()) && (false == context.isSelection()))
    {
      doApplyShadow(context, attr);
    }
    context.beginPath();
    context.arc(0, 0, attr.getOuterRadius(), 0, Math.PI * 2, false);
    context.closePath();
    context.stroke();
    context.beginPath();
    context.arc(0, 0, attr.getInnerRadius(), 0, Math.PI * 2, true);
    context.closePath();
    context.stroke();
    context.restore();
  }
}

代码示例来源:origin: ahome-it/lienzo-core

@Override
protected void stroke(final Context2D context, final Attributes attr, final double alpha, final boolean filled)
{
  if (setStrokeParams(context, attr, alpha, filled))
  {
    if ((attr.hasShadow()) && (false == context.isSelection()))
    {
      doApplyShadow(context, attr);
    }
    context.beginPath();
    context.arc(0, 0, attr.getOuterRadius(), 0, Math.PI * 2, false);
    context.closePath();
    context.stroke();
    context.beginPath();
    context.arc(0, 0, attr.getInnerRadius(), 0, Math.PI * 2, true);
    context.closePath();
    context.stroke();
    context.restore();
  }
}

相关文章

微信公众号

最新文章

更多

Attributes类方法