From b3f38746a23567d33caecf364de59c65aeb0761d Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 18 Dec 2009 15:45:02 -0600 Subject: [PATCH 04/13] gdiplus: Add some traces for the values of point arguments. --- dlls/gdiplus/brush.c | 6 +++--- dlls/gdiplus/gdiplus.c | 6 ++++++ dlls/gdiplus/gdiplus_private.h | 2 ++ dlls/gdiplus/graphics.c | 3 +++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 49e9e0e..ad372c0 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -311,8 +311,8 @@ GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF* startpoint, { COLORREF col = ARGB2COLORREF(startcolor); - TRACE("(%p, %p, %x, %x, %d, %p)\n", startpoint, endpoint, - startcolor, endcolor, wrap, line); + TRACE("(%s, %s, %x, %x, %d, %p)\n", debugstr_pointf(startpoint), + debugstr_pointf(endpoint), startcolor, endcolor, wrap, line); if(!line || !startpoint || !endpoint || wrap == WrapModeClamp) return InvalidParameter; @@ -1448,7 +1448,7 @@ GpStatus WINGDIPAPI GdipSetPathGradientCenterColor(GpPathGradient *grad, GpStatus WINGDIPAPI GdipSetPathGradientCenterPoint(GpPathGradient *grad, GpPointF *point) { - TRACE("(%p, %p)\n", grad, point); + TRACE("(%p, %s)\n", grad, debugstr_pointf(point)); if(!grad || !point) return InvalidParameter; diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c index 9fe9332..77cbc5c 100644 --- a/dlls/gdiplus/gdiplus.c +++ b/dlls/gdiplus/gdiplus.c @@ -444,3 +444,9 @@ const char *debugstr_rectf(CONST RectF* rc) if (!rc) return "(null)"; return wine_dbg_sprintf("(%0.2f,%0.2f,%0.2f,%0.2f)", rc->X, rc->Y, rc->Width, rc->Height); } + +const char *debugstr_pointf(CONST PointF* pt) +{ + if (!pt) return "(null)"; + return wine_dbg_sprintf("(%0.2f,%0.2f)", pt->X, pt->Y); +} diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 6d778a4..7ce4bd5 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -80,6 +80,8 @@ static inline REAL deg2rad(REAL degrees) extern const char *debugstr_rectf(CONST RectF* rc); +extern const char *debugstr_pointf(CONST PointF* pt); + extern void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height, BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride); diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 5ab544d..7d5caf8 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1876,6 +1876,9 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image if(!graphics || !image || !points || count != 3) return InvalidParameter; + TRACE("%s %s %s\n", debugstr_pointf(&points[0]), debugstr_pointf(&points[1]), + debugstr_pointf(&points[2])); + memcpy(ptf, points, 3 * sizeof(GpPointF)); transform_and_round_points(graphics, pti, ptf, 3); -- 1.6.3.3