OK, I think maybe you are right. I'll do more tests in the previous tests patch.
Ignore this patch set for now.
On 4/7/22 4:24 PM, Nikolay Sivov wrote:
On 4/7/22 11:09, Ziqing Hui wrote:
static void STDMETHODCALLTYPE d2d_device_context_GetImageLocalBounds(ID2D1DeviceContext *iface, ID2D1Image *image, D2D1_RECT_F *local_bounds) { - FIXME("iface %p, image %p, local_bounds %p stub!\n", iface, image, local_bounds); + ID2D1Bitmap *bitmap; + D2D_SIZE_F size;
+ TRACE("iface %p, image %p, local_bounds %p.\n", iface, image, local_bounds);
+ if (SUCCEEDED(ID2D1Image_QueryInterface(image, &IID_ID2D1Bitmap, (void **)&bitmap))) + { + size = ID2D1Bitmap_GetSize(bitmap); + local_bounds->left = 0.0f; + local_bounds->top = 0.0f; + local_bounds->right = size.width; + local_bounds->bottom = size.height; + ID2D1Bitmap_Release(bitmap); + } + else + { + FIXME("Unable to get local bounds of image %p.\n", image); + } }
According to docs, bounds are affected by context properties. Is this not the case?