Function subtractOffset

  • Subtracts x,y,width,height of a-b.

    subtractOffset({x:100,y:100,width:100,height:100}, {x:10, y:20, width: 30, height: 40});
    // Yields: {x: 90, y: 80, width: 70, height: 60 }

    If either a or b are missing x & y, 0 is used

    Returns RectPositioned