CairoCanvas, fixed line widths and clipping bounds

git-svn-id: trunk@40608 -
This commit is contained in:
jesus 2013-03-21 20:21:48 +00:00
parent 0bf1e0e25d
commit ccc3e57ea5

View File

@ -135,7 +135,7 @@ procedure TCairoPrinterCanvas.SetPenProperties;
var var
i, w: integer; i, w: integer;
begin begin
w := Pen.Width * 2; w := Pen.Width;
for i := 0 to High(d) do for i := 0 to High(d) do
d[i] := d[i] * w; d[i] := d[i] * w;
cairo_set_dash(cr, @d, High(d), 0); cairo_set_dash(cr, @d, High(d), 0);
@ -189,7 +189,7 @@ begin
pjsMiter: cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); pjsMiter: cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER);
end; end;
cairo_set_line_width(cr, Pen.Width*FontScale); //line_width is diameter of the pen circle cairo_set_line_width(cr, Pen.Width*72/XDPI); //line_width is diameter of the pen circle
end; end;
procedure TCairoPrinterCanvas.SetBrushProperties; procedure TCairoPrinterCanvas.SetBrushProperties;
@ -676,7 +676,7 @@ begin
BreakBoxWidth := BoxWidth; BreakBoxWidth := BoxWidth;
if Style.Clipping then begin if Style.Clipping then begin
cairo_rectangle(cr, BoxLeft, BoxTop, BoxWidth, BoxHeight); cairo_rectangle(cr, BoxLeft, BoxTop, BoxWidth+Pen.Width, BoxHeight+Pen.Width);
cairo_clip(cr); cairo_clip(cr);
end; end;
if Style.ExpandTabs then if Style.ExpandTabs then