public RowColInfo(RowColInfo other) { Percent = other.Percent; Extent = other.Extent; Start = other.Start; End = other.End; }
public RowColInfo[] Split(double offset) { RowColInfo[] info = new RowColInfo[2]; int newPercent = (int)(Percent * offset / Extent); info[0] = new RowColInfo(newPercent); info[1] = new RowColInfo(Percent - newPercent); return(info); }
public RowColInfo[] Split(double offset, double space) { RowColInfo[] info = new RowColInfo[2]; double totalExtent = Extent * _multiplier / Percent; totalExtent -= space; int percent0 = (int)(offset * _multiplier / totalExtent); int percent1 = (int)((Extent - space - offset) * _multiplier / totalExtent); info[0] = new RowColInfo(percent0); info[1] = new RowColInfo(percent1); return(info); }