Mozilla2:GFXTextRun: Difference between revisions

Line 10: Line 10:
  */
  */
class gfxTextRun {
class gfxTextRun {
   // these do not copy the text
   // these do not copy the text. it is the caller's responsibility to keep
  // the text alive during the lifetime of the text run.
   gfxTextRun(const char* ASCII, int length, nsFontMetrics* font, PRBool RTL, nsIAtom* language);
   gfxTextRun(const char* ASCII, int length, nsFontMetrics* font, PRBool RTL, nsIAtom* language);
   gfxTextRun(const PRUnichar* unicode, int length, nsFontMetrics* font, PRBool RTL, nsIAtom* language);
   gfxTextRun(const PRUnichar* unicode, int length, nsFontMetrics* font, PRBool RTL, nsIAtom* language);
Line 58: Line 59:
     gfxRect boundingBox;
     gfxRect boundingBox;
   };
   };
   // The substring must not contain any partial clusters
   // The substring must not contain any partial clusters.
   Dimensions MeasureText(int pos, int len);
   Dimensions MeasureText(int pos, int len);


Line 72: Line 73:
   // We will usually want to call MeasureText right afterwards,
   // We will usually want to call MeasureText right afterwards,
   // the implementor could optimize for that.
   // the implementor could optimize for that.
   // The substring must not contain any partial clusters
   // The substring must not contain any partial clusters.
   int GetCharsFit(int pos, int len, gfxFloat width, PRUint8* breaks);
   int GetCharsFit(int pos, int len, gfxFloat width, PRUint8* breaks);


1,295

edits