protected override CPoint transformToPhysicalPixels(Vector2 point, out IntMatrix?intMatrix) { Matrix3x2 tform = transform.current; point = Vector2.Transform(point, tform); point *= device.dpiScaling.mulPixels; intMatrix = tform.snapMatrixToInt(); return(point.roundToInt()); }
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)); }