目录
当前位置: 首页 > 文档资料 > Snap.svg 英文文档 >

Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t)

优质
小牛编辑
125浏览
2023-12-01

Utility method Finds dot coordinates on the given cubic beziér curve at the given t

Parameters

  1. p1xnumberx of the first point of the curve
  2. p1ynumbery of the first point of the curve
  3. c1xnumberx of the first anchor of the curve
  4. c1ynumbery of the first anchor of the curve
  5. c2xnumberx of the second anchor of the curve
  6. c2ynumbery of the second anchor of the curve
  7. p2xnumberx of the second point of the curve
  8. p2ynumbery of the second point of the curve
  9. tnumberposition on the curve (0..1)

Returns: object point information in format:

  1. {
    1. x: numberx coordinate of the point,
    2. y: numbery coordinate of the point,
    3. m: {
      1. x: number x coordinate of the left anchor,
      2. y: number y coordinate of the left anchor
    4. },
    5. n: {
      1. x: number x coordinate of the right anchor,
      2. y: number y coordinate of the right anchor
    6. },
    7. start: {
      1. x: number x coordinate of the start of the curve,
      2. y: number y coordinate of the start of the curve
    8. },
    9. end: {
      1. x: number x coordinate of the end of the curve,
      2. y: number y coordinate of the end of the curve
    10. },
    11. alpha: numberangle of the curve derivative at the point
  2. }