private void DrawStringOnCurrPath(string value, IFontDefn font, PointF location, float fontBaselineHeight, float rotation) { throw new NotImplementedException(); //var drawPath = _currPath; //if (rotation != 0.0f) drawPath = new GraphicsPath(); //font.AddStringToPath(this.Renderer, drawPath, value, new PointF(location.X, location.Y - fontBaselineHeight)); //if (rotation != 0.0f && drawPath.PointCount > 0) //{ // using (var matrix = new Matrix()) // { // matrix.Translate(-1 * location.X, -1 * location.Y, MatrixOrder.Append); // matrix.Rotate(rotation, MatrixOrder.Append); // matrix.Translate(location.X, location.Y, MatrixOrder.Append); // drawPath.Transform(matrix); // _currPath.AddPath(drawPath, false); // } //} }
private void DrawStringOnCurrPath(string value, IFontDefn font, PointF location, float fontBaselineHeight, float rotation) { var drawPath = _currPath; if (rotation != 0.0f) { drawPath = new GraphicsPath(); } font.AddStringToPath(this.Renderer, drawPath, value, new PointF(location.X, location.Y - fontBaselineHeight)); if (rotation != 0.0f && drawPath.PointCount > 0) { using (var matrix = new Matrix()) { matrix.Translate(-1 * location.X, -1 * location.Y, MatrixOrder.Append); matrix.Rotate(rotation, MatrixOrder.Append); matrix.Translate(location.X, location.Y, MatrixOrder.Append); drawPath.Transform(matrix); _currPath.AddPath(drawPath, false); } } }
public FontBoundable(IFontDefn font, float width) { _font = font; _width = width; }
public FontBoundable(IFontDefn font) { _font = font; }
private void DrawStringOnCurrPath(string value, IFontDefn font, PointF location, float fontBaselineHeight, float rotation) { var drawPath = _currPath; if (rotation != 0.0f) drawPath = new GraphicsPath(); font.AddStringToPath(this.Renderer, drawPath, value, new PointF(location.X, location.Y - fontBaselineHeight)); if (rotation != 0.0f && drawPath.PointCount > 0) { using (var matrix = new Matrix()) { matrix.Translate(-1 * location.X, -1 * location.Y, MatrixOrder.Append); matrix.Rotate(rotation, MatrixOrder.Append); matrix.Translate(location.X, location.Y, MatrixOrder.Append); drawPath.Transform(matrix); _currPath.AddPath(drawPath, false); } } }