#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "wincodecs_private.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (wincodecs) |
|
static FlipRotator * | impl_from_IWICBitmapFlipRotator (IWICBitmapFlipRotator *iface) |
|
static HRESULT WINAPI | FlipRotator_QueryInterface (IWICBitmapFlipRotator *iface, REFIID iid, void **ppv) |
|
static ULONG WINAPI | FlipRotator_AddRef (IWICBitmapFlipRotator *iface) |
|
static ULONG WINAPI | FlipRotator_Release (IWICBitmapFlipRotator *iface) |
|
static HRESULT WINAPI | FlipRotator_GetSize (IWICBitmapFlipRotator *iface, UINT *puiWidth, UINT *puiHeight) |
|
static HRESULT WINAPI | FlipRotator_GetPixelFormat (IWICBitmapFlipRotator *iface, WICPixelFormatGUID *pPixelFormat) |
|
static HRESULT WINAPI | FlipRotator_GetResolution (IWICBitmapFlipRotator *iface, double *pDpiX, double *pDpiY) |
|
static HRESULT WINAPI | FlipRotator_CopyPalette (IWICBitmapFlipRotator *iface, IWICPalette *pIPalette) |
|
static HRESULT WINAPI | FlipRotator_CopyPixels (IWICBitmapFlipRotator *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer) |
|
static HRESULT WINAPI | FlipRotator_Initialize (IWICBitmapFlipRotator *iface, IWICBitmapSource *pISource, WICBitmapTransformOptions options) |
|
HRESULT | FlipRotator_Create (IWICBitmapFlipRotator **fliprotator) |
|
◆ COBJMACROS
◆ FlipRotator
◆ FlipRotator_AddRef()
Definition at line 74 of file fliprotate.c.
75{
78
79 TRACE(
"(%p) refcount=%u\n", iface,
ref);
80
82}
#define InterlockedIncrement
static FlipRotator * impl_from_IWICBitmapFlipRotator(IWICBitmapFlipRotator *iface)
◆ FlipRotator_CopyPalette()
Definition at line 142 of file fliprotate.c.
144{
146 TRACE(
"(%p,%p)\n", iface, pIPalette);
147
150 else
151 return IWICBitmapSource_CopyPalette(
This->source, pIPalette);
152}
#define WINCODEC_ERR_WRONGSTATE
◆ FlipRotator_CopyPixels()
Definition at line 154 of file fliprotate.c.
156{
160 UINT srcy, srcwidth, srcheight;
163
165
167
169 {
170
171 FIXME(
"flipping x and rotating are not implemented\n");
173 }
174
175 hr = IWICBitmapSource_GetSize(
This->source, &srcwidth, &srcheight);
177
179 {
188 }
189
191 {
193 srcy = srcheight - 1 -
y;
194 else
196
201
202 hr = IWICBitmapSource_CopyPixels(
This->source, &rc, cbStride, cbStride,
203 pbBuffer);
204
206
207 pbBuffer += cbStride;
208 }
209
211}
GLint GLint GLint GLint GLint GLint y
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
static const char * debug_wic_rect(const WICRect *rect)
◆ FlipRotator_Create()
Definition at line 268 of file fliprotate.c.
269{
271
274
282 This->lock.DebugInfo->Spare[0] = (
DWORD_PTR)(__FILE__
": FlipRotator.lock");
283
284 *fliprotator = &
This->IWICBitmapFlipRotator_iface;
285
287}
static const IWICBitmapFlipRotatorVtbl FlipRotator_Vtbl
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Referenced by ImagingFactory_CreateBitmapFlipRotator().
◆ FlipRotator_GetPixelFormat()
Definition at line 116 of file fliprotate.c.
118{
120 TRACE(
"(%p,%p)\n", iface, pPixelFormat);
121
124 else
125 return IWICBitmapSource_GetPixelFormat(
This->source, pPixelFormat);
126}
◆ FlipRotator_GetResolution()
Definition at line 128 of file fliprotate.c.
130{
132 TRACE(
"(%p,%p,%p)\n", iface, pDpiX, pDpiY);
133
136 else if (
This->swap_xy)
137 return IWICBitmapSource_GetResolution(
This->source, pDpiY, pDpiX);
138 else
139 return IWICBitmapSource_GetResolution(
This->source, pDpiX, pDpiY);
140}
◆ FlipRotator_GetSize()
Definition at line 102 of file fliprotate.c.
104{
106 TRACE(
"(%p,%p,%p)\n", iface, puiWidth, puiHeight);
107
110 else if (
This->swap_xy)
111 return IWICBitmapSource_GetSize(
This->source, puiHeight, puiWidth);
112 else
113 return IWICBitmapSource_GetSize(
This->source, puiWidth, puiHeight);
114}
◆ FlipRotator_Initialize()
Definition at line 213 of file fliprotate.c.
215{
218
220
222
224 {
227 }
228
230 {
233 }
234
236 {
239 }
240
243
246
247 IWICBitmapSource_AddRef(pISource);
248 This->source = pISource;
249
252
254}
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
@ WICBitmapTransformRotate180
@ WICBitmapTransformFlipVertical
@ WICBitmapTransformRotate90
@ WICBitmapTransformFlipHorizontal
◆ FlipRotator_QueryInterface()
Definition at line 50 of file fliprotate.c.
52{
55
57
61 {
62 *
ppv = &
This->IWICBitmapFlipRotator_iface;
63 }
64 else
65 {
68 }
69
72}
#define IsEqualIID(riid1, riid2)
◆ FlipRotator_Release()
Definition at line 84 of file fliprotate.c.
85{
88
89 TRACE(
"(%p) refcount=%u\n", iface,
ref);
90
92 {
93 This->lock.DebugInfo->Spare[0] = 0;
95 if (
This->source) IWICBitmapSource_Release(
This->source);
97 }
98
100}
#define InterlockedDecrement
#define HeapFree(x, y, z)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
◆ impl_from_IWICBitmapFlipRotator()
Definition at line 45 of file fliprotate.c.
46{
48}
#define CONTAINING_RECORD(address, type, field)
Referenced by FlipRotator_AddRef(), FlipRotator_CopyPalette(), FlipRotator_CopyPixels(), FlipRotator_GetPixelFormat(), FlipRotator_GetResolution(), FlipRotator_GetSize(), FlipRotator_Initialize(), FlipRotator_QueryInterface(), and FlipRotator_Release().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
wincodecs |
| ) |
|
◆ FlipRotator_Vtbl
const IWICBitmapFlipRotatorVtbl FlipRotator_Vtbl |
|
static |
Initial value:= {
}
static HRESULT WINAPI FlipRotator_GetPixelFormat(IWICBitmapFlipRotator *iface, WICPixelFormatGUID *pPixelFormat)
static HRESULT WINAPI FlipRotator_CopyPixels(IWICBitmapFlipRotator *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
static HRESULT WINAPI FlipRotator_GetSize(IWICBitmapFlipRotator *iface, UINT *puiWidth, UINT *puiHeight)
static HRESULT WINAPI FlipRotator_CopyPalette(IWICBitmapFlipRotator *iface, IWICPalette *pIPalette)
static HRESULT WINAPI FlipRotator_GetResolution(IWICBitmapFlipRotator *iface, double *pDpiX, double *pDpiY)
static ULONG WINAPI FlipRotator_AddRef(IWICBitmapFlipRotator *iface)
static HRESULT WINAPI FlipRotator_QueryInterface(IWICBitmapFlipRotator *iface, REFIID iid, void **ppv)
static HRESULT WINAPI FlipRotator_Initialize(IWICBitmapFlipRotator *iface, IWICBitmapSource *pISource, WICBitmapTransformOptions options)
static ULONG WINAPI FlipRotator_Release(IWICBitmapFlipRotator *iface)
Definition at line 256 of file fliprotate.c.
Referenced by FlipRotator_Create().