public static TabStop NewInstance(float currentPosition, float tabInterval) { currentPosition = (float)Math.Round(currentPosition * 1000) / 1000; tabInterval = (float)Math.Round(tabInterval * 1000) / 1000; TabStop tabStop = new TabStop(currentPosition + tabInterval - currentPosition % tabInterval); return tabStop; }
public static TabStop getTabStopNewInstance(float currentPosition, TabSettings tabSettings) { if (tabSettings != null) { return(tabSettings.GetTabStopNewInstance(currentPosition)); } return(TabStop.NewInstance(currentPosition, DEFAULT_TAB_INTERVAL)); }
public TabStop GetTabStopNewInstance(float currentPosition) { TabStop tabStop = null; if (tabStops != null) { foreach (TabStop currentTabStop in tabStops) { if (currentTabStop.Position - currentPosition > 0.001) { tabStop = new TabStop(currentTabStop); break; } } } if (tabStop == null) { tabStop = TabStop.NewInstance(currentPosition, tabInterval); } return tabStop; }
virtual public TabStop GetTabStopNewInstance(float currentPosition) { TabStop tabStop = null; if (tabStops != null) { foreach (TabStop currentTabStop in tabStops) { if (currentTabStop.Position - currentPosition > 0.001) { tabStop = new TabStop(currentTabStop); break; } } } if (tabStop == null) { tabStop = TabStop.NewInstance(currentPosition, tabInterval); } return(tabStop); }
public TabStop(TabStop tabStop) : this(tabStop.Position, tabStop.Leader, tabStop.Align, tabStop.AnchorChar) { }