gpt4 book ai didi

com.ait.lienzo.client.core.shape.wires.WiresShape.getPath()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 11:59:05 33 4
gpt4 key购买 nike

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

WiresShape.getPath介绍

暂无

代码示例

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

public static Point2DArray getWiresIntersectionPoints(final WiresShape wiresShape, final Direction[] requestedCardinals)
{
  return Geometry.getCardinalIntersects(wiresShape.getPath(), requestedCardinals);
}

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

private void batch()
  {
    if (null != m_wiresShape.getPath().getLayer())
    {
      m_wiresShape.getPath().getLayer().batch();
    }
  }
}

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

private void batch()
  {
    if (null != m_wiresShape.getPath().getLayer())
    {
      m_wiresShape.getPath().getLayer().batch();
    }
  }
}

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

private void batch()
  {
    if (null != m_wiresShape.getPath().getLayer())
    {
      m_wiresShape.getPath().getLayer().batch();
    }
  }
}

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

public static void drawShapeToBacking(final Context2D ctx, final WiresShape shape, final String color)
{
  final MultiPath multiPath = shape.getPath();
  drawShapeToBacking(ctx, shape, color, multiPath.getStrokeWidth(), true);
}

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

public static void drawShapeToBacking(final Context2D ctx, final WiresShape shape, final String color)
{
  final MultiPath multiPath = shape.getPath();
  drawShapeToBacking(ctx, shape, color, multiPath.getStrokeWidth(), true);
}

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

private void restoreBody()
{
  if (isBodyHighlight())
  {
    m_parent.getPath().setStrokeColor(m_priorColor);
    m_parent.getPath().setStrokeAlpha(getPriorAlpha());
    m_parent.getPath().setStrokeWidth(m_priorSize);
    m_priorColor = null;
    m_priorSize = null;
    m_priorAlpha = null;
    drawLayer();
  }
}

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

public static void drawShapeToBacking(final Context2D ctx, final WiresShape shape, final String color)
{
  final MultiPath multiPath = shape.getPath();
  drawShapeToBacking(ctx, shape, color, multiPath.getStrokeWidth(), true);
}

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

@Override
protected void beforeMoveStart(final double x, final double y)
{
  super.beforeMoveStart(x, y);
  m_initialPathLocation = getShape().getPath().getComputedLocation();
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo

private static BoundingBox getBoundingBox(final ShapeView<?> view) {
  if (view instanceof WiresShape) {
    return ((WiresShape) view).getPath().getBoundingBox();
  } else if (view instanceof WiresConnector) {
    final WiresConnector wiresConnector = (WiresConnector) view;
    return wiresConnector.getGroup().getBoundingBox();
  }
  return null;
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-lienzo-extensions

public WiresShapeToolbox(final WiresShape shape) {
  this(shape,
     new ToolboxImpl(() -> shape.getPath().getBoundingBox()),
     new HandlerRegistrationManager());
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

private double getTotalHeight(WiresShape ws) {
    double height = ws.getPath().getBoundingBox().getHeight();

    for (WiresShape child : ws.getChildShapes()) {
      height += (getTotalHeight(child) + PADDING_Y);
    }

    return height;
  }
}

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

public void destroy()
{
  m_list.destroy();
  m_registrationManager.removeHandler();
  m_magnetManager.m_magnetRegistry.remove(m_wiresShape.getPath().uuid());
}

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

public void destroy()
{
  m_list.destroy();
  m_registrationManager.removeHandler();
  m_magnetManager.m_magnetRegistry.remove(m_wiresShape.getPath().uuid());
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Override
  public void layout(final WiresContainer container) {
    double x = LEFT_MARGIN_PADDING;
    for (WiresShape ws : container.getChildShapes()) {
      ws.setLocation(new Point2D(x,
                    PADDING_Y));
      x = x + ws.getPath().getBoundingBox().getWidth() + PADDING_X;
    }
  }
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-case-mgmt-client

@Override
public void layout(final WiresContainer container) {
  double y = PADDING_Y;
  if (container instanceof WiresShape) {
    y = y + ((WiresShape) container).getPath().getBoundingBox().getHeight();
  }
  for (WiresShape ws : container.getChildShapes()) {
    ws.setLocation(new Point2D(PADDING_X,
                  y));
    y = y + getTotalHeight(ws) + PADDING_Y;
  }
}

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

private Point2D calculateAbsCandidateLocation(final WiresShape shape, final WiresMagnet shapeMagnet)
{
  final Point2D trgLocation = new Point2D(shapeMagnet.getX(), shapeMagnet.getY());
  final BoundingBox shapeBB = shape.getPath().getBoundingBox();
  final BoundingBox box = shape.getPath().getBoundingBox();
  final double newX = trgLocation.getX() - shapeBB.getMinX() - (box.getWidth() / 2);
  final double newY = trgLocation.getY() - shapeBB.getMinY() - (box.getHeight() / 2);
  return new Point2D(newX, newY);
}

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

private Point2D calculateAbsCandidateLocation(final WiresShape shape, final WiresMagnet shapeMagnet)
{
  final Point2D trgLocation = new Point2D(shapeMagnet.getX(), shapeMagnet.getY());
  final BoundingBox shapeBB = shape.getPath().getBoundingBox();
  final BoundingBox box = shape.getPath().getBoundingBox();
  final double newX = trgLocation.getX() - shapeBB.getMinX() - (box.getWidth() / 2);
  final double newY = trgLocation.getY() - shapeBB.getMinY() - (box.getHeight() / 2);
  return new Point2D(newX, newY);
}

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

private Point2D calculateAbsCandidateLocation(final WiresShape shape, final WiresMagnet shapeMagnet)
{
  final Point2D trgLocation = new Point2D(shapeMagnet.getX(), shapeMagnet.getY());
  final BoundingBox shapeBB = shape.getPath().getBoundingBox();
  final BoundingBox box = shape.getPath().getBoundingBox();
  final double newX = trgLocation.getX() - shapeBB.getMinX() - (box.getWidth() / 2);
  final double newY = trgLocation.getY() - shapeBB.getMinY() - (box.getHeight() / 2);
  return new Point2D(newX, newY);
}

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

@Override
protected boolean afterMove(final double dx, final double dy)
{
  super.afterMove(dx, dy);
  m_intersection = null;
  if (isAllow())
  {
    final Point2D location = getParentPickerControl().getCurrentLocation();
    final Point2D absLoc = getParent().getComputedLocation(); // convert to local xy of the path
    this.m_intersection = Geometry.findIntersection((int) (location.getX() - absLoc.getX()), (int) (location.getY() - absLoc.getY()), ((WiresShape) getParent()).getPath());
  }
  return null != this.m_intersection;
}

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com