public LineLayout(string l, TTFText atm, bool initialize) { offset = 0; linetext = ""; hspacing = atm.Hspacing; tm = atm; linewidth = tm.CurrentTextStyle.LineWidth; advancedir = Vector3.right; charadvances = new float[default_alloc]; // for each character this is the ideal advance charpositions = new float[default_alloc]; // we shall allow user to set up each character individually charheights = new float[default_alloc]; charstyleindex = new int[default_alloc]; charmetadata = new object[default_alloc]; for (int j = 0; j < default_alloc; j++) { charstyleindex [j] = -1; } advancelen = 0; lineno = 0; align = tm.CurrentTextStyle.ParagraphAlignment; AppendText(l); //ComputeMetricInfo(); if (initialize) { ComputeCharacterPositions(); } }
float Xmin0 = 0; // leftmost boundary for the first glyph of this line #endregion Fields #region Constructors public LineLayout(string l, TTFText atm, bool initialize) { offset = 0; linetext = ""; hspacing = atm.Hspacing; tm = atm; linewidth = tm.CurrentTextStyle.LineWidth; advancedir = Vector3.right; charadvances = new float[default_alloc]; // for each character this is the ideal advance charpositions = new float[default_alloc]; // we shall allow user to set up each character individually charheights = new float[default_alloc]; charstyleindex = new int[default_alloc]; charmetadata = new object[default_alloc]; for (int j=0; j<default_alloc; j++) { charstyleindex [j] = -1; } advancelen = 0; lineno = 0; align = tm.CurrentTextStyle.ParagraphAlignment; AppendText (l); //ComputeMetricInfo(); if (initialize) { ComputeCharacterPositions (); } }
public TTFTextStyle SetParagraphAlignment(TTFText.ParagraphAlignmentEnum s) { ParagraphAlignment = s; return(this); }