[PATCH] d2d1: Implement ID2D1DeviceContext::CreateImageBrush().

Nikolay Sivov nsivov at codeweavers.com
Fri May 6 04:40:06 CDT 2022



On 5/6/22 12:32, Dmitry Timoshkov wrote:
> +
> +    hr = ID2D1Image_QueryInterface(image, &IID_ID2D1Bitmap, (void **)&bitmap);
> +    if (FAILED(hr))
> +    {
> +        FIXME("ID2D1Image doesn't support ID2D1Bitmap interface.\n");
> +        return hr;
> +    }
> +
> +    bitmap_brush_desc.extendModeX = image_brush_desc->extendModeX;
> +    bitmap_brush_desc.extendModeY = image_brush_desc->extendModeY;
> +    bitmap_brush_desc.interpolationMode = image_brush_desc->interpolationMode;
> +
> +    if (SUCCEEDED(hr = d2d_bitmap_brush_create(context->factory, bitmap, &bitmap_brush_desc,
> +            brush_desc, &object)))
> +        *brush = (ID2D1ImageBrush *)&object->ID2D1Brush_iface;
> +
> +    ID2D1Bitmap_Release(bitmap);
> +
> +    return hr;
>   }
>   
>   static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBitmapBrush(ID2D1DeviceContext *iface,
I don't think this can work, ID2D1ImageBrush is not compatible with what 
d2d_bitmap_brush_create() returns.



More information about the wine-devel mailing list