public GlyphPlanSequence(IUnscaledGlyphPlanList glyphPlanList, int startAt, int len) { _glyphPlanList = glyphPlanList; this.startAt = startAt; this.len = (ushort)len; _isRTL = false; }
public GlyphPlanSequence(IUnscaledGlyphPlanList glyphPlanList) { _glyphPlanList = glyphPlanList; this.startAt = 0; this.len = (ushort)glyphPlanList.Count; _isRTL = false; }
public virtual void GenerateGlyphPlan( char[] textBuffer, int startAt, int len, IUnscaledGlyphPlanList unscaledGlyphPlan) { GlyphLayout glyphLayout = this.GlyphLayoutMan; glyphLayout.Layout(textBuffer, startAt, len); glyphLayout.GenerateUnscaledGlyphPlans(unscaledGlyphPlan); }
// public float CalculateWidth() { if (_glyphBuffer == null) { return(0); } // IUnscaledGlyphPlanList plans = _glyphBuffer; int end = startAt + len; float width = 0; for (int i = startAt; i < end; ++i) { width += plans[i].AdvanceX; } return(width); }
/// <summary> /// fetch layout result, unscaled version, put to IUnscaledGlyphPlanList /// </summary> /// <param name="glyphPositions"></param> /// <param name="pxscale"></param> /// <param name="outputGlyphPlanList"></param> public void GenerateUnscaledGlyphPlans(IUnscaledGlyphPlanList outputGlyphPlanList) { IGlyphPositions glyphPositions = _glyphPositions; int finalGlyphCount = glyphPositions.Count; for (int i = 0; i < finalGlyphCount; ++i) { short offsetX, offsetY, advW; ushort glyphIndex = glyphPositions.GetGlyph(i, out ushort input_offset, out offsetX, out offsetY, out advW); // outputGlyphPlanList.Append(new UnscaledGlyphPlan( input_offset, glyphIndex, advW, offsetX, offsetY )); } }
public GlyphPlanSequence(IUnscaledGlyphPlanList glyphBuffer) { _glyphBuffer = glyphBuffer; this.startAt = 0; this.len = (ushort)glyphBuffer.Count; }
public GlyphPlanSequence(IUnscaledGlyphPlanList glyphBuffer, int startAt, int len) { _glyphBuffer = glyphBuffer; this.startAt = startAt; this.len = (ushort)len; }