Commit 2156e68a authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d2d1: Add the ID2D1Bitmap interface.

parent 61a90906
......@@ -17,9 +17,11 @@
*/
import "unknwn.idl";
import "dcommon.h";
import "d2dbasetypes.h";
interface ID2D1Factory;
interface ID2D1RenderTarget;
interface IDWriteRenderingParams;
typedef D2D_POINT_2F D2D1_POINT_2F;
......@@ -27,6 +29,9 @@ typedef D2D_MATRIX_3X2_F D2D1_MATRIX_3X2_F;
typedef D2D_RECT_F D2D1_RECT_F;
typedef D2D_SIZE_F D2D1_SIZE_F;
typedef UINT64 D2D1_TAG;
typedef D2D_SIZE_U D2D1_SIZE_U;
typedef D2D_POINT_2U D2D1_POINT_2U;
typedef D2D_RECT_U D2D1_RECT_U;
typedef enum D2D1_DEBUG_LEVEL
{
......@@ -507,5 +512,36 @@ interface ID2D1Image : ID2D1Resource
{
}
[
local,
object,
uuid(a2296057-ea42-4099-983b-539fb6505426)
]
interface ID2D1Bitmap : ID2D1Image
{
D2D1_SIZE_F GetSize();
D2D1_SIZE_U GetPixelSize();
D2D1_PIXEL_FORMAT GetPixelFormat();
void GetDpi(
[out] float *dpi_x,
[out] float *dpi_y
);
HRESULT CopyFromBitmap(
[in] const D2D1_POINT_2U *dst_point,
[in] ID2D1Bitmap *bitmap,
[in] const D2D1_RECT_U *src_rect
);
HRESULT CopyFromRenderTarget(
[in] const D2D1_POINT_2U *dst_point,
[in] ID2D1RenderTarget *render_target,
[in] const D2D1_RECT_U *src_rect
);
HRESULT CopyFromMemory(
[in] const D2D1_RECT_U *dst_rect,
[in] const void *src_data,
[in] UINT32 pitch
);
}
[local] HRESULT __stdcall D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
const D2D1_FACTORY_OPTIONS *factory_options, void **factory);
......@@ -45,3 +45,23 @@ typedef struct D2D_SIZE_F
float width;
float height;
} D2D_SIZE_F;
typedef struct D2D_SIZE_U
{
UINT32 width;
UINT32 height;
} D2D_SIZE_U;
typedef struct D2D_POINT_2U
{
UINT32 x;
UINT32 y;
} D2D_POINT_2U;
typedef struct D2D_RECT_U
{
UINT32 left;
UINT32 top;
UINT32 right;
UINT32 bottom;
} D2D_RECT_U;
......@@ -19,6 +19,8 @@
#ifndef __WINE_DCOMMON_H
#define __WINE_DCOMMON_H
#include "dxgiformat.h"
typedef enum DWRITE_MEASURING_MODE
{
DWRITE_MEASURING_MODE_NATURAL,
......@@ -26,4 +28,19 @@ typedef enum DWRITE_MEASURING_MODE
DWRITE_MEASURING_MODE_GDI_NATURAL
} DWRITE_MEASURING_MODE;
typedef enum D2D1_ALPHA_MODE
{
D2D1_ALPHA_MODE_UNKNOWN = 0,
D2D1_ALPHA_MODE_PREMULTIPLIED = 1,
D2D1_ALPHA_MODE_STRAIGHT = 2,
D2D1_ALPHA_MODE_IGNORE = 3,
D2D1_ALPHA_MODE_FORCE_DWORD = 0xffffffff,
} D2D1_ALPHA_MODE;
typedef struct D2D1_PIXEL_FORMAT
{
DXGI_FORMAT format;
D2D1_ALPHA_MODE alphaMode;
} D2D1_PIXEL_FORMAT;
#endif /* __WINE_DCOMMON_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment