Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Source/HtmlRenderer.WPF/Adapters/GraphicsAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,15 @@ public override void DrawString(string str, RFont font, RColor color, RPoint poi

glyphRendered = true;
var glyphRun = new GlyphRun(glyphTypeface, rtl ? 1 : 0, false, 96d / 72d * font.Size, glyphs, Utils.ConvertRound(point), widths, null, null, null, null, null, null);
var rect = glyphRun.ComputeAlignmentBox();
var guidelines = new GuidelineSet();
guidelines.GuidelinesX.Add(rect.Left);
guidelines.GuidelinesX.Add(rect.Right);
guidelines.GuidelinesY.Add(rect.Top);
guidelines.GuidelinesY.Add(rect.Bottom);
_g.PushGuidelineSet(guidelines);
_g.DrawGlyphRun(colorConv, glyphRun);
_g.Pop();
}
}

Expand Down Expand Up @@ -269,7 +277,7 @@ public override void DrawRectangle(RPen pen, double x, double y, double width, d
x += .5;
y += .5;
}

_g.DrawRectangle(null, ((PenAdapter)pen).CreatePen(), new Rect(x, y, width, height));
}

Expand Down