diff options
Diffstat (limited to 'dw/image.cc')
-rw-r--r-- | dw/image.cc | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/dw/image.cc b/dw/image.cc index ba3348de..79331afb 100644 --- a/dw/image.cc +++ b/dw/image.cc @@ -181,6 +181,9 @@ void Image::sizeRequestSimpl (core::Requisition *requisition) DEBUG_MSG(1, "-- Image::sizeRequestSimpl() begins\n"); + DEBUG_MSG(1, "Image::sizeRequestImpl border: w=%d h=%d\n", + boxDiffWidth(), boxDiffHeight()); + /* First set a naive size based on the image properties if given */ if (buffer) { @@ -207,7 +210,7 @@ void Image::sizeRequestSimpl (core::Requisition *requisition) requisition->ascent += boxOffsetY (); requisition->descent += boxRestHeight (); - DEBUG_MSG(1, "initial requisition: w=%d, h=%d\n", + DEBUG_MSG(1, "Image: initial requisition (with border): w=%d, h=%d\n", requisition->width, requisition->ascent + requisition->descent); /* Then correct the size if needed, so it fits within the available space in @@ -217,7 +220,7 @@ void Image::sizeRequestSimpl (core::Requisition *requisition) correctRequisition (requisition, core::splitHeightPreserveDescent, true, true); - DEBUG_MSG(1, "corrected requisition: w=%d, h=%d\n", + DEBUG_MSG(1, "Image: corrected requisition: w=%d, h=%d\n", requisition->width, requisition->ascent + requisition->descent); DBG_OBJ_MSGF ("resize", 1, "=> %d * (%d + %d)", @@ -264,6 +267,13 @@ void Image::sizeAllocateImpl (core::Allocation *allocation) allocation->x, allocation->y, allocation->width, allocation->ascent, allocation->descent); + DEBUG_MSG(1, "Image::sizeAllocateImpl x=%d y=%d w=%d h=(%d + %d)\n", + allocation->x, allocation->y, allocation->width, + allocation->ascent, allocation->descent); + + DEBUG_MSG(1, "Image::sizeAllocateImpl border: w=%d h=%d\n", + boxDiffWidth(), boxDiffHeight()); + int newBufWidth = allocation->width - boxDiffWidth (); int newBufHeight = @@ -274,6 +284,9 @@ void Image::sizeAllocateImpl (core::Allocation *allocation) (newBufWidth != bufWidth || newBufHeight != bufHeight)) { DBG_OBJ_MSG ("resize", 1, "replacing buffer"); + DEBUG_MSG(1, "Image::sizeAllocateImpl new buffer size: w=%d h=%d\n", + newBufWidth, newBufHeight); + core::Imgbuf *oldBuffer = buffer; buffer = oldBuffer->getScaledBuf (newBufWidth, newBufHeight); oldBuffer->unref (); @@ -286,6 +299,10 @@ void Image::sizeAllocateImpl (core::Allocation *allocation) DBG_OBJ_SET_NUM ("bufHeight", bufHeight); } + DEBUG_MSG(1, "Image::sizeAllocateImpl x=%d y=%d w=%d h=(%d + %d)\n", + allocation->x, allocation->y, allocation->width, + allocation->ascent, allocation->descent); + DBG_OBJ_LEAVE (); } |