use of au.gov.asd.tac.constellation.visual.opengl.utilities.glyphs.NodeGlyphStreamContext in project constellation by constellation-app.
the class NodeLabelBatcher method bufferBottomLabel.
private void bufferBottomLabel(final int pos, final VisualAccess access, NodeGlyphStream glyphStream) {
final float visibility = access.getVertexVisibility(pos);
int totalScale = LabelUtilities.NRADIUS_TO_LABEL_UNITS;
for (int label = 0; label < access.getBottomLabelCount(); label++) {
final String labelText = access.getVertexBottomLabelText(pos, label);
ArrayList<String> lines = LabelUtilities.splitTextIntoLines(labelText);
for (final String line : lines) {
SharedDrawable.getGlyphManager().renderTextAsLigatures(line, glyphStream, new NodeGlyphStreamContext(pos, -totalScale, visibility, label));
totalScale += labelBottomInfoReference.get(label, 3);
}
}
}
use of au.gov.asd.tac.constellation.visual.opengl.utilities.glyphs.NodeGlyphStreamContext in project constellation by constellation-app.
the class NodeLabelBatcher method bufferTopLabel.
private void bufferTopLabel(final int pos, final VisualAccess access, final NodeGlyphStream glyphStream) {
final float visibility = access.getVertexVisibility(pos);
int totalScale = LabelUtilities.NRADIUS_TO_LABEL_UNITS;
for (int label = 0; label < access.getTopLabelCount(); label++) {
final String text = access.getVertexTopLabelText(pos, label);
ArrayList<String> lines = LabelUtilities.splitTextIntoLines(text);
Collections.reverse(lines);
for (final String line : lines) {
SharedDrawable.getGlyphManager().renderTextAsLigatures(line, glyphStream, new NodeGlyphStreamContext(pos, totalScale, visibility, label));
totalScale += labelTopInfoReference.get(label, 3);
}
}
}
Aggregations