mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-07-05 17:48:38 +00:00
don't stroke when fill
This commit is contained in:
parent
b5d73e6850
commit
a4a2252741
|
@ -81,18 +81,18 @@ void HTMLRenderer::css_draw(GfxState *state, bool fill)
|
||||||
if(y1 > y2) swap(y1, y2);
|
if(y1 > y2) swap(y1, y2);
|
||||||
|
|
||||||
double x,y,w,h,lw[2];
|
double x,y,w,h,lw[2];
|
||||||
css_fix_rectangle_border_width(x1, y1, x2, y2, state->getLineWidth(),
|
css_fix_rectangle_border_width(x1, y1, x2, y2, (fill ? 0.0 : state->getLineWidth()),
|
||||||
x,y,w,h,lw[0],lw[1]);
|
x,y,w,h,lw[0],lw[1]);
|
||||||
|
|
||||||
GfxRGB stroke_color;
|
GfxRGB stroke_color;
|
||||||
state->getStrokeRGB(&stroke_color);
|
if(!fill) state->getStrokeRGB(&stroke_color);
|
||||||
|
|
||||||
GfxRGB fill_color;
|
GfxRGB fill_color;
|
||||||
if(fill) state->getFillRGB(&fill_color);
|
if(fill) state->getFillRGB(&fill_color);
|
||||||
|
|
||||||
int lw_count = 2;
|
int lw_count = 2;
|
||||||
|
|
||||||
GfxRGB * ps = &stroke_color;
|
GfxRGB * ps = fill ? nullptr : (&stroke_color);
|
||||||
GfxRGB * pf = fill ? (&fill_color) : nullptr;
|
GfxRGB * pf = fill ? (&fill_color) : nullptr;
|
||||||
|
|
||||||
if(_equal(h, 0) || _equal(w, 0))
|
if(_equal(h, 0) || _equal(w, 0))
|
||||||
|
@ -100,8 +100,8 @@ void HTMLRenderer::css_draw(GfxState *state, bool fill)
|
||||||
// orthogonal line
|
// orthogonal line
|
||||||
|
|
||||||
// TODO: check length
|
// TODO: check length
|
||||||
|
pf = ps;
|
||||||
ps = nullptr;
|
ps = nullptr;
|
||||||
pf = &stroke_color;
|
|
||||||
h += lw[0];
|
h += lw[0];
|
||||||
w += lw[1];
|
w += lw[1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user