src/text/vectorText.js
function translateLine (options, line) {
  const { x, y } = Object.assign({ x: 0, y: 0 }, options || {})
  let segments = line.segments
  let segment = null
  let point = null
  for (let i = 0, il = segments.length; i < il; i++) {
    segment = segments[i]
    for (let j = 0, jl = segment.length; j < jl; j++) {
      point = segment[j]
      segment[j] = [point[0] + x, point[1] + y]
    }
  }
  return line
}
function translateLine (options, line) {
  const { x, y } = Object.assign({ x: 0, y: 0 }, options || {})
  let segments = line.segments
  let segment = null
  let point = null
  for (let i = 0, il = segments.length; i < il; i++) {
    segment = segments[i]
    for (let j = 0, jl = segment.length; j < jl; j++) {
      point = segment[j]
      segment[j] = [point[0] + x, point[1] + y]
    }
  }
  return line
}
function translateLine ( options , line ) { const { x , y } = Object . assign ( { x : 0 , y : 0 } , options || { } ) let segments = line . segments let segment = null let point = null for ( let i = 0 , il = segments . length ; i < il ; i ++ ) { segment = segments [ i ] for ( let j = 0 , jl = segment . length ; j < jl ; j ++ ) { point = segment [ j ] segment [ j ] = [ point [ 0 ] + x , point [ 1 ] + y ] } } return line }
translate text line
translate text line