author | francesco-ST <francesco.abbate@st.com> | 2010年07月15日 13:57:44 +0200 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2010年07月15日 13:57:44 +0200 |
commit | 426d707efc9845a1230a8f8fa984338719a151a7 (patch) | |
tree | 48a31d20eca434223347dd10bb9fba58df059bc0 /pre3d/pre3d.lua | |
parent | f93eaab58d78528b56710dbdbcf0b0232d1f46ad (diff) | |
download | gsl-shell-426d707efc9845a1230a8f8fa984338719a151a7.tar.gz |
-rw-r--r-- | pre3d/pre3d.lua | 26 |
diff --git a/pre3d/pre3d.lua b/pre3d/pre3d.lua index c2592ebe..2c379f44 100644 --- a/pre3d/pre3d.lua +++ b/pre3d/pre3d.lua @@ -822,26 +822,6 @@ function RendererMT.drawBuffer(this) local is_triangle = qf:isTriangle() - if obj.draw_overdraw then - -- Unfortunately when we fill with canvas, we can get some gap looking - -- things on the edges between quads. One possible solution is to - -- stroke the path, but this turns out to be really expensive. Instead - -- we try to increase the area of the quad. Each edge pushes its - -- vertices away from each other. This is sort of similar in concept - -- to the builtin canvas shadow support (shadowOffsetX, etc). However, - -- Chrome doesn't support shadows correctly now. It does in trunk, but - -- using shadows to fill the gaps looks awful, and also seems slower. - - pushPoints2dIP(qf.i0, qf.i1) - pushPoints2dIP(qf.i1, qf.i2) - if is_triangle then - pushPoints2dIP(qf.i2, qf.i0) - else - pushPoints2dIP(qf.i2, qf.i3) - pushPoints2dIP(qf.i3, qf.i0) - end - end - -- Create our quad as a <canvas> path. local qpath = path(qf.i0.x, qf.i0.y) qpath:line_to(qf.i1.x, qf.i1.y) @@ -854,7 +834,11 @@ function RendererMT.drawBuffer(this) -- Fill... local frgba = obj.fill_rgba if frgba then - win:draw(qpath, frgba) + if obj.draw_overdraw then + win:draw(qpath, frgba, {{'extend'}}) + else + win:draw(qpath, frgba) + end end -- Stroke... |