Exemplo n.º 1
0
        CSize iDrawContext.measureText(string text, float width, iFont fontInterface)
        {
            Matrix3x2 curr        = transform.current;
            float     pixel       = computePixelSize(ref curr);
            int       widthPIxels = (int)MathF.Round(width / pixel);

            Matrix3x2      tform      = transform.current;
            eTextRendering renderMode = textRenderingStyle(tform.snapMatrixToInt());

            var font = (Font)fontInterface;

            return(font.measureText(text, widthPIxels, renderMode));
        }
Exemplo n.º 2
0
 void iDrawContext.drawText(string text, iFont font, Rect layoutRect, iBrush foreground, iBrush background)
 {
     drawText(text, (Font)font, ref layoutRect, foreground.data(), background.data());
 }
Exemplo n.º 3
0
 CSize Draw.iDrawContext.measureText(string text, float width, iFont font) =>
 throw new NotImplementedException();
Exemplo n.º 4
0
 void Draw.iDrawContext.drawText(string text, iFont font, Rect layoutRect, Draw.iBrush foreground, Draw.iBrush background) =>
 throw new NotImplementedException();
Exemplo n.º 5
0
 public void create(double dpi)
 {
     font = face.createFont(sizePointe, (float)dpi);
 }
Exemplo n.º 6
0
 public sFont(iFontFace face, float size)
 {
     this.face  = face;
     sizePointe = size;
     font       = null;
 }