public BarnumberMetrics(Graphics graphics, string ID_Type, TextInfo textInfo, FrameInfo frameInfo) : base(graphics, ID_Type, textInfo) { TextMetrics textMetrics = new TextMetrics(graphics, null, textInfo); _top = textMetrics.Top - frameInfo.PaddingY; _right = textMetrics.Right + frameInfo.PaddingX; _bottom = textMetrics.Bottom + frameInfo.PaddingY; _left = textMetrics.Left - frameInfo.PaddingX; _strokeWidth = frameInfo.StrokeWidth; }
public FramedBarNumberText(object container, string text, float gap, float stafflinethickness) : base(container, text, "Arial", (gap * 2F), TextHorizAlign.center) { float paddingX = 22F; if(text.Length > 1) paddingX = 10F; float paddingY = 22F; float strokeWidth = stafflinethickness * 1.2F; _frameInfo = new FrameInfo(TextFrameType.rectangle, paddingX, paddingY, strokeWidth, new ColorString("000000")); }