[PATCH 2/2] d2d1: Implement GetImageLocalBounds() for bitmap.
Nikolay Sivov
nsivov at codeweavers.com
Thu Apr 7 03:24:02 CDT 2022
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?
More information about the wine-devel
mailing list