Dumping variable address by itself is barely useful for matrices.
For this handy when debugging gdi_transform
Signed-off-by: David Kahurani k.kahurani@gmail.com
From: David Kahurani k.kahurani@gmail.com
Dumping variable address by itself is barely useful.
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/gdiplus/brush.c | 18 +++++++++--------- dlls/gdiplus/gdiplus.c | 7 +++++++ dlls/gdiplus/gdiplus_private.h | 2 ++ dlls/gdiplus/graphics.c | 14 +++++--------- dlls/gdiplus/graphicspath.c | 10 +++++----- dlls/gdiplus/matrix.c | 32 ++++++++++++++++---------------- dlls/gdiplus/pen.c | 6 +++--- dlls/gdiplus/region.c | 4 ++-- 8 files changed, 49 insertions(+), 44 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 582c5f80bc1..ed1b559dc9a 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -1296,7 +1296,7 @@ GpStatus WINGDIPAPI GdipGetTextureImage(GpTexture *brush, GpImage **image) */ GpStatus WINGDIPAPI GdipGetTextureTransform(GpTexture *brush, GpMatrix *matrix) { - TRACE("(%p, %p)\n", brush, matrix); + TRACE("(%p, %s)\n", brush, debugstr_matrix(matrix));
if(!brush || !matrix) return InvalidParameter; @@ -1327,7 +1327,7 @@ GpStatus WINGDIPAPI GdipGetTextureWrapMode(GpTexture *brush, GpWrapMode *wrapmod GpStatus WINGDIPAPI GdipMultiplyTextureTransform(GpTexture* brush, GDIPCONST GpMatrix *matrix, GpMatrixOrder order) { - TRACE("(%p, %p, %d)\n", brush, matrix, order); + TRACE("(%p, %s, %d)\n", brush, debugstr_matrix(matrix), order);
if(!brush || !matrix) return InvalidParameter; @@ -1841,7 +1841,7 @@ GpStatus WINGDIPAPI GdipSetPathGradientWrapMode(GpPathGradient *grad, GpStatus WINGDIPAPI GdipSetPathGradientTransform(GpPathGradient *grad, GpMatrix *matrix) { - TRACE("(%p,%p)\n", grad, matrix); + TRACE("(%p,%s)\n", grad, debugstr_matrix(matrix));
if (!grad || !matrix || grad->brush.bt != BrushTypePathGradient) return InvalidParameter; @@ -1854,7 +1854,7 @@ GpStatus WINGDIPAPI GdipSetPathGradientTransform(GpPathGradient *grad, GpStatus WINGDIPAPI GdipGetPathGradientTransform(GpPathGradient *grad, GpMatrix *matrix) { - TRACE("(%p,%p)\n", grad, matrix); + TRACE("(%p,%s)\n", grad, debugstr_matrix(matrix));
if (!grad || !matrix || grad->brush.bt != BrushTypePathGradient) return InvalidParameter; @@ -1867,7 +1867,7 @@ GpStatus WINGDIPAPI GdipGetPathGradientTransform(GpPathGradient *grad, GpStatus WINGDIPAPI GdipMultiplyPathGradientTransform(GpPathGradient *grad, GDIPCONST GpMatrix *matrix, GpMatrixOrder order) { - TRACE("(%p,%p,%i)\n", grad, matrix, order); + TRACE("(%p,%s,%i)\n", grad, debugstr_matrix(matrix), order);
if (!grad || grad->brush.bt != BrushTypePathGradient) return InvalidParameter; @@ -1935,7 +1935,7 @@ GpStatus WINGDIPAPI GdipSetSolidFillColor(GpSolidFill *sf, ARGB argb) GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *texture, GDIPCONST GpMatrix *matrix) { - TRACE("(%p, %p)\n", texture, matrix); + TRACE("(%p, %s)\n", texture, debugstr_matrix(matrix));
if(!texture || !matrix) return InvalidParameter; @@ -2112,7 +2112,7 @@ GpStatus WINGDIPAPI GdipResetLineTransform(GpLineGradient *brush) GpStatus WINGDIPAPI GdipSetLineTransform(GpLineGradient *brush, GDIPCONST GpMatrix *matrix) { - TRACE("(%p,%p)\n", brush, matrix); + TRACE("(%p,%s)\n", brush, debugstr_matrix(matrix));
if(!brush || !matrix) return InvalidParameter; @@ -2124,7 +2124,7 @@ GpStatus WINGDIPAPI GdipSetLineTransform(GpLineGradient *brush,
GpStatus WINGDIPAPI GdipGetLineTransform(GpLineGradient *brush, GpMatrix *matrix) { - TRACE("(%p,%p)\n", brush, matrix); + TRACE("(%p,%s)\n", brush, debugstr_matrix(matrix));
if(!brush || !matrix) return InvalidParameter; @@ -2148,7 +2148,7 @@ GpStatus WINGDIPAPI GdipScaleLineTransform(GpLineGradient *brush, REAL sx, REAL GpStatus WINGDIPAPI GdipMultiplyLineTransform(GpLineGradient *brush, GDIPCONST GpMatrix *matrix, GpMatrixOrder order) { - TRACE("(%p,%p,%u)\n", brush, matrix, order); + TRACE("(%p,%s,%u)\n", brush, debugstr_matrix(matrix), order);
if(!brush) return InvalidParameter; diff --git a/dlls/gdiplus/gdiplus.c b/dlls/gdiplus/gdiplus.c index e77d4a9e21f..a3c85986ffc 100644 --- a/dlls/gdiplus/gdiplus.c +++ b/dlls/gdiplus/gdiplus.c @@ -492,3 +492,10 @@ const char *debugstr_pointf(const PointF* pt) if (!pt) return "(null)"; return wine_dbg_sprintf("(%0.2f,%0.2f)", pt->X, pt->Y); } + +const char *debugstr_matrix(const GpMatrix *matrix) +{ + if (!matrix) return "(null)"; + return wine_dbg_sprintf("%p(%0.2f,%0.2f,%0.2f,%0.2f,%0.2f,%0.2f)",matrix, matrix->matrix[0], matrix->matrix[1], + matrix->matrix[2], matrix->matrix[3], matrix->matrix[4], matrix->matrix[5]); +} diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index c68fdedb0b8..2638959300b 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -203,6 +203,8 @@ extern const char *debugstr_rectf(const RectF* rc) DECLSPEC_HIDDEN;
extern const char *debugstr_pointf(const PointF* pt) DECLSPEC_HIDDEN;
+extern const char *debugstr_matrix(const GpMatrix* matrix) DECLSPEC_HIDDEN; + extern void convert_32bppARGB_to_32bppPARGB(UINT width, UINT height, BYTE *dst_bits, INT dst_stride, const BYTE *src_bits, INT src_stride) DECLSPEC_HIDDEN;
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 835c2889bd1..6dc34707bbf 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5029,7 +5029,7 @@ GpStatus WINGDIPAPI GdipGetVisibleClipBoundsI(GpGraphics *graphics, GpRect *rect
GpStatus WINGDIPAPI GdipGetWorldTransform(GpGraphics *graphics, GpMatrix *matrix) { - TRACE("(%p, %p)\n", graphics, matrix); + TRACE("(%p, %s)\n", graphics, debugstr_matrix(matrix));
if(!graphics || !matrix) return InvalidParameter; @@ -6377,7 +6377,7 @@ GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics *graphics, GpMatrix *matrix { GpStatus stat;
- TRACE("(%p, %p)\n", graphics, matrix); + TRACE("(%p, %s)\n", graphics, debugstr_matrix(matrix));
if(!graphics || !matrix) return InvalidParameter; @@ -6385,10 +6385,6 @@ GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics *graphics, GpMatrix *matrix if(graphics->busy) return ObjectBusy;
- TRACE("%f,%f,%f,%f,%f,%f\n", - matrix->matrix[0], matrix->matrix[1], matrix->matrix[2], - matrix->matrix[3], matrix->matrix[4], matrix->matrix[5]); - if (is_metafile_graphics(graphics)) { stat = METAFILE_SetWorldTransform((GpMetafile*)graphics->image, matrix);
@@ -6675,7 +6671,7 @@ GpStatus WINGDIPAPI GdipMultiplyWorldTransform(GpGraphics *graphics, GDIPCONST G GpMatrix m; GpStatus ret;
- TRACE("(%p, %p, %d)\n", graphics, matrix, order); + TRACE("(%p, %s, %d)\n", graphics, debugstr_matrix(matrix), order);
if(!graphics || !matrix) return InvalidParameter; @@ -7105,7 +7101,7 @@ GpStatus WINGDIPAPI GdipMeasureDriverString(GpGraphics *graphics, GDIPCONST UINT REAL rel_width, rel_height, ascent, descent; GpPointF pt[3];
- TRACE("(%p %p %d %p %p %d %p %p)\n", graphics, text, length, font, positions, flags, matrix, boundingBox); + TRACE("(%p %p %d %p %p %d %s %p)\n", graphics, text, length, font, positions, flags, debugstr_matrix(matrix), boundingBox);
if (!graphics || !text || !font || !positions || !boundingBox) return InvalidParameter; @@ -7533,7 +7529,7 @@ GpStatus WINGDIPAPI GdipDrawDriverString(GpGraphics *graphics, GDIPCONST UINT16 GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix ) { - TRACE("(%p %s %p %p %p %d %p)\n", graphics, debugstr_wn(text, length), font, brush, positions, flags, matrix); + TRACE("(%p %s %p %p %p %d %s)\n", graphics, debugstr_wn(text, length), font, brush, positions, flags, debugstr_matrix(matrix));
if (!graphics || !text || !font || !brush || !positions) return InvalidParameter; diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 85e0f7d5777..6cdc2a58059 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1500,7 +1500,7 @@ GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath* path, GpRectF* bounds, INT count, i; REAL path_width = 1.0, width, height, temp, low_x, low_y, high_x, high_y;
- TRACE("(%p, %p, %p, %p)\n", path, bounds, matrix, pen); + TRACE("(%p, %p, %s, %p)\n", path, bounds, debugstr_matrix(matrix), pen);
/* Matrix and pen can be null. */ if(!path || !bounds) @@ -1582,7 +1582,7 @@ GpStatus WINGDIPAPI GdipGetPathWorldBoundsI(GpPath* path, GpRect* bounds, GpStatus ret; GpRectF boundsF;
- TRACE("(%p, %p, %p, %p)\n", path, bounds, matrix, pen); + TRACE("(%p, %p, %s, %p)\n", path, bounds, debugstr_matrix(matrix), pen);
ret = GdipGetPathWorldBounds(path,&boundsF,matrix,pen);
@@ -1796,7 +1796,7 @@ GpStatus WINGDIPAPI GdipSetPathFillMode(GpPath *path, GpFillMode fill)
GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix) { - TRACE("(%p, %p)\n", path, matrix); + TRACE("(%p, %s)\n", path, debugstr_matrix(matrix));
if(!path) return InvalidParameter; @@ -1812,7 +1812,7 @@ GpStatus WINGDIPAPI GdipWarpPath(GpPath *path, GpMatrix* matrix, GDIPCONST GpPointF *points, INT count, REAL x, REAL y, REAL width, REAL height, WarpMode warpmode, REAL flatness) { - FIXME("(%p,%p,%p,%i,%0.2f,%0.2f,%0.2f,%0.2f,%i,%0.2f)\n", path, matrix, + FIXME("(%p,%s,%p,%i,%0.2f,%0.2f,%0.2f,%0.2f,%i,%0.2f)\n", path, debugstr_matrix(matrix), points, count, x, y, width, height, warpmode, flatness);
return NotImplemented; @@ -2434,7 +2434,7 @@ GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, path_list_node_t *points=NULL, *last_point=NULL; int i, subpath_start=0, new_length;
- TRACE("(%p,%p,%p,%0.2f)\n", path, pen, matrix, flatness); + TRACE("(%p,%p,%s,%0.2f)\n", path, pen, debugstr_matrix(matrix), flatness);
if (!path || !pen) return InvalidParameter; diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index c5d5d70c648..a87235a9cc6 100644 --- a/dlls/gdiplus/matrix.c +++ b/dlls/gdiplus/matrix.c @@ -120,7 +120,7 @@ GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect *rect, GDIPCONST GpPoint
GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix *matrix, GpMatrix **clone) { - TRACE("(%p, %p)\n", matrix, clone); + TRACE("(%s, %p)\n", debugstr_matrix(matrix), clone);
if(!matrix || !clone) return InvalidParameter; @@ -168,7 +168,7 @@ GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix) GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix *matrix, REAL *out) { - TRACE("(%p, %p)\n", matrix, out); + TRACE("(%s, %p)\n", debugstr_matrix(matrix), out);
if(!matrix || !out) return InvalidParameter; @@ -183,7 +183,7 @@ GpStatus WINGDIPAPI GdipInvertMatrix(GpMatrix *matrix) GpMatrix copy; REAL det;
- TRACE("(%p)\n", matrix); + TRACE("(%s)\n", debugstr_matrix(matrix));
if(!matrix) return InvalidParameter; @@ -223,7 +223,7 @@ GpStatus WINGDIPAPI GdipInvertMatrix(GpMatrix *matrix)
GpStatus WINGDIPAPI GdipIsMatrixInvertible(GDIPCONST GpMatrix *matrix, BOOL *result) { - TRACE("(%p, %p)\n", matrix, result); + TRACE("(%s, %p)\n", debugstr_matrix(matrix), result);
if(!matrix || !result) return InvalidParameter; @@ -239,7 +239,7 @@ GpStatus WINGDIPAPI GdipIsMatrixInvertible(GDIPCONST GpMatrix *matrix, BOOL *res GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix *matrix, GDIPCONST GpMatrix* matrix2, GpMatrixOrder order) { - TRACE("(%p, %p, %d)\n", matrix, matrix2, order); + TRACE("(%s, %s, %d)\n", debugstr_matrix(matrix), debugstr_matrix(matrix2), order);
if(!matrix || !matrix2) return InvalidParameter; @@ -259,7 +259,7 @@ GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix *matrix, REAL angle, { REAL cos_theta, sin_theta, rotate[6];
- TRACE("(%p, %.2f, %d)\n", matrix, angle, order); + TRACE("(%p, %.2f, %d)\n", debugstr_matrix(matrix), angle, order);
if(!matrix) return InvalidParameter; @@ -288,7 +288,7 @@ GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix *matrix, REAL angle, GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpMatrixOrder order) { - TRACE("(%p, %.2f, %.2f, %d)\n", matrix, scaleX, scaleY, order); + TRACE("(%s, %.2f, %.2f, %d)\n", debugstr_matrix(matrix), scaleX, scaleY, order);
if(!matrix) return InvalidParameter; @@ -318,7 +318,7 @@ GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy) { - TRACE("(%p, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", matrix, m11, m12, + TRACE("(%s, %.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\n", debugstr_matrix(matrix), m11, m12, m21, m22, dx, dy);
if(!matrix) @@ -339,7 +339,7 @@ GpStatus WINGDIPAPI GdipShearMatrix(GpMatrix *matrix, REAL shearX, REAL shearY, { REAL shear[6];
- TRACE("(%p, %.2f, %.2f, %d)\n", matrix, shearX, shearY, order); + TRACE("(%s, %.2f, %.2f, %d)\n", debugstr_matrix(matrix), shearX, shearY, order);
if(!matrix) return InvalidParameter; @@ -368,7 +368,7 @@ GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, REAL x, y; INT i;
- TRACE("(%p, %p, %d)\n", matrix, pts, count); + TRACE("(%s, %p, %d)\n", debugstr_matrix(matrix), pts, count);
if(!matrix || !pts || count <= 0) return InvalidParameter; @@ -391,7 +391,7 @@ GpStatus WINGDIPAPI GdipTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, I GpStatus ret; INT i;
- TRACE("(%p, %p, %d)\n", matrix, pts, count); + TRACE("(%s, %p, %d)\n", debugstr_matrix(matrix), pts, count);
if(count <= 0) return InvalidParameter; @@ -420,7 +420,7 @@ GpStatus WINGDIPAPI GdipTransformMatrixPointsI(GpMatrix *matrix, GpPoint *pts, I GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, REAL offsetY, GpMatrixOrder order) { - TRACE("(%p, %.2f, %.2f, %d)\n", matrix, offsetX, offsetY, order); + TRACE("(%s, %.2f, %.2f, %d)\n", debugstr_matrix(matrix), offsetX, offsetY, order);
if(!matrix) return InvalidParameter; @@ -448,7 +448,7 @@ GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF * REAL x, y; INT i;
- TRACE("(%p, %p, %d)\n", matrix, pts, count); + TRACE("(%s, %p, %d)\n", debugstr_matrix(matrix), pts, count);
if(!matrix || !pts || count <= 0) return InvalidParameter; @@ -471,7 +471,7 @@ GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint * GpStatus ret; INT i;
- TRACE("(%p, %p, %d)\n", matrix, pts, count); + TRACE("(%s, %p, %d)\n", debugstr_matrix(matrix), pts, count);
if(count <= 0) return InvalidParameter; @@ -500,7 +500,7 @@ GpStatus WINGDIPAPI GdipVectorTransformMatrixPointsI(GpMatrix *matrix, GpPoint * GpStatus WINGDIPAPI GdipIsMatrixEqual(GDIPCONST GpMatrix *matrix, GDIPCONST GpMatrix *matrix2, BOOL *result) { - TRACE("(%p, %p, %p)\n", matrix, matrix2, result); + TRACE("(%s, %s, %p)\n", debugstr_matrix(matrix), debugstr_matrix(matrix2), result);
if(!matrix || !matrix2 || !result) return InvalidParameter; @@ -519,7 +519,7 @@ GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix *matrix, BOOL *resul 0.0, 0.0 } };
- TRACE("(%p, %p)\n", matrix, result); + TRACE("(%s, %p)\n", debugstr_matrix(matrix), result);
if(!matrix || !result) return InvalidParameter; diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index 535ef10c05d..6446b725e4d 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -436,7 +436,7 @@ GpStatus WINGDIPAPI GdipSetPenTransform(GpPen *pen, GpMatrix *matrix) { static int calls;
- TRACE("(%p,%p)\n", pen, matrix); + TRACE("(%p,%s)\n", pen, debugstr_matrix(matrix));
if(!pen || !matrix) return InvalidParameter; @@ -451,7 +451,7 @@ GpStatus WINGDIPAPI GdipSetPenTransform(GpPen *pen, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipGetPenTransform(GpPen *pen, GpMatrix *matrix) { - TRACE("(%p,%p)\n", pen, matrix); + TRACE("(%p,%s)\n", pen, debugstr_matrix(matrix));
if(!pen || !matrix) return InvalidParameter; @@ -494,7 +494,7 @@ GpStatus WINGDIPAPI GdipRotatePenTransform(GpPen *pen, REAL angle, GpMatrixOrder GpStatus WINGDIPAPI GdipMultiplyPenTransform(GpPen *pen, GDIPCONST GpMatrix *matrix, GpMatrixOrder order) { - TRACE("(%p,%p,%u)\n", pen, matrix, order); + TRACE("(%p,%s,%u)\n", pen, debugstr_matrix(matrix), order);
if(!pen) return InvalidParameter; diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c index bbffbdd8d11..d0d9f4ba54e 100644 --- a/dlls/gdiplus/region.c +++ b/dlls/gdiplus/region.c @@ -1471,7 +1471,7 @@ static GpStatus transform_region_element(region_element* element, GpMatrix *matr
GpStatus WINGDIPAPI GdipTransformRegion(GpRegion *region, GpMatrix *matrix) { - TRACE("(%p, %p)\n", region, matrix); + TRACE("(%p, %s)\n", region, debugstr_matrix(matrix));
if (!region || !matrix) return InvalidParameter; @@ -1595,7 +1595,7 @@ GpStatus WINGDIPAPI GdipGetRegionScansCount(GpRegion *region, UINT *count, GpMat GpStatus stat; LPRGNDATA data;
- TRACE("(%p, %p, %p)\n", region, count, matrix); + TRACE("(%p, %p, %s)\n", region, count, debugstr_matrix(matrix));
if (!region || !count || !matrix) return InvalidParameter;
This merge request was approved by Esme Povirk.