private void drawLine(SSLine line, SSPosition position, SKCanvas canvas) { foreach (SSLabel label in line.labels) { position = drawLabel(label, canvas, position); } }
private LineProps calculateLineProps(SSLine line) { LineProps lineProps = new LineProps(0, 0); foreach (SSLabel label in line.labels) { using (SKPaint paint = new SKPaint()) { paint.TextSize = label.fontSize; paint.IsAntialias = true; paint.Typeface = getFont(label); lineProps.width += paint.MeasureText(label.text); if (label.fontSize > lineProps.maxHeight) { lineProps.maxHeight = label.fontSize; } } } return(lineProps); }