public virtual void MeasureWidths(SplitText st, int position, int len, TextPositions positions) { byte[] s = new byte[len * 3]; int lenUTF8 = st.RetrieveUTF8(position, s, len); MeasureWidths(s, lenUTF8, positions, st.GetEncoding()); }
public virtual void PaintText(SplitText st, int position, int len, SRectangle rcw, int ascentLine) { try { byte[] s = new byte[len * 3]; int lenUTF8 = st.RetrieveUTF8(position, s, len); System.String sg = System.Text.Encoding.UTF8.GetString(s, 0, lenUTF8); g.DrawString(sg, fontHandle, textBrush, rcw.left, rcw.top + ascentLine - ascent, sf); } catch (System.IO.IOException) { System.Console.Out.WriteLine("Failed to convert"); } }