protected Rectangle applyMargins(Rectangle rect,float[] margins,boolean reverse){
  if (isPositioned())   return rect;
  return rect.<Rectangle>applyMargins(margins[0],margins[1],margins[2],margins[3],reverse);
}

protected Rectangle applyMargins ( Rectangle rect , float [ ] margins , boolean reverse ) { if ( isPositioned ( ) ) return rect ; return rect . < Rectangle > applyMargins ( margins [ 0 ] , margins [ 1 ] , margins [ 2 ] , margins [ 3 ] , reverse ) ; }
applies given margins on the given rectangle
