Painter: fixed issue with path and DrawImage with empty Image

git-svn-id: svn://ultimatepp.org/upp/trunk@3591 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-07-02 18:17:59 +00:00
parent c0518e661a
commit 70ce7b138e
2 changed files with 6 additions and 1 deletions

View file

@ -42,12 +42,16 @@ bool Painter::ClipoffOp(const Rect& r)
bool Painter::ExcludeClipOp(const Rect& r)
{
RectPath(Rect(-99999, -99999, 99999, r.top));
RectPath(Rect(-99999, r.top, r.left, 99999));
RectPath(Rect(r.right, r.top, 99999, 99999));
RectPath(Rect(r.left, r.bottom, r.right, 99999));
Clip();
return true;
}
bool Painter::IntersectClipOp(const Rect& r)
{
return true;
RectPath(r);
Clip();
return true;

View file

@ -176,6 +176,7 @@ struct PainterImageSpan : SpanSource {
void BufferPainter::RenderImage(double width, const Image& image, const Xform2D& transsrc, dword flags)
{
current = Null;
if(image.GetWidth() == 0 || image.GetHeight() == 0)
return;
PainterImageSpan ss;