ReactOS 0.4.15-dev-7693-gd0e2924
dib.h
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Some DIB related functions
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 */
7
8#pragma once
9
12HBITMAP CreateMonoBitmap(int width, int height, BOOL bWhite);
14HBITMAP CachedBufferDIB(HBITMAP hbm, int minimalWidth, int minimalHeight);
16
18
19static inline HBITMAP CopyDIBImage(HBITMAP hbm, INT cx = 0, INT cy = 0)
20{
22}
23
26
28
30
31void SetFileInfo(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isAFile);
32
35
36HBITMAP Rotate90DegreeBlt(HDC hDC1, INT cx, INT cy, BOOL bRight, BOOL bMono);
37
38HBITMAP SkewDIB(HDC hDC1, HBITMAP hbm, INT nDegree, BOOL bVertical, BOOL bMono = FALSE);
39
40float PpcmFromDpi(float dpi);
41
42#define ROUND(x) (INT)((x) + 0.5)
43
46HBITMAP BitmapFromHEMF(HENHMETAFILE hEMF);
47HBITMAP getSubImage(HBITMAP hbmWhole, const RECT& rcPartial);
48void putSubImage(HBITMAP hbmWhole, const RECT& rcPartial, HBITMAP hbmPart);
void putSubImage(HBITMAP hbmWhole, const RECT &rcPartial, HBITMAP hbmPart)
Definition: dib.cpp:428
HBITMAP CreateDIBWithProperties(int width, int height)
Definition: dib.cpp:32
void SetFileInfo(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isAFile)
Definition: dib.cpp:183
HBITMAP SkewDIB(HDC hDC1, HBITMAP hbm, INT nDegree, BOOL bVertical, BOOL bMono=FALSE)
Definition: dib.cpp:351
HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
Definition: dib.cpp:226
HGLOBAL BitmapToClipboardDIB(HBITMAP hBitmap)
Definition: dib.cpp:447
HBITMAP BitmapFromHEMF(HENHMETAFILE hEMF)
Definition: dib.cpp:557
HBITMAP getSubImage(HBITMAP hbmWhole, const RECT &rcPartial)
Definition: dib.cpp:409
HBITMAP CachedBufferDIB(HBITMAP hbm, int minimalWidth, int minimalHeight)
Definition: dib.cpp:115
int GetDIBWidth(HBITMAP hbm)
Definition: dib.cpp:136
HBITMAP BitmapFromClipboardDIB(HGLOBAL hGlobal)
Definition: dib.cpp:510
HBITMAP Rotate90DegreeBlt(HDC hDC1, INT cx, INT cy, BOOL bRight, BOOL bMono)
Definition: dib.cpp:312
HBITMAP ConvertToBlackAndWhite(HBITMAP hbm)
Definition: dib.cpp:631
HBITMAP CopyMonoImage(HBITMAP hbm, INT cx=0, INT cy=0)
Definition: dib.cpp:87
int GetDIBHeight(HBITMAP hbm)
Definition: dib.cpp:144
static HBITMAP CopyDIBImage(HBITMAP hbm, INT cx=0, INT cy=0)
Definition: dib.h:19
HBITMAP DoLoadImageFile(HWND hwnd, LPCWSTR name, BOOL fIsMainFile)
Definition: dib.cpp:256
float PpcmFromDpi(float dpi)
Definition: dib.cpp:25
BOOL SaveDIBToFile(HBITMAP hBitmap, LPCWSTR FileName, BOOL fIsMainFile, REFGUID guidFileType=GUID_NULL)
Definition: dib.cpp:151
HBITMAP CreateMonoBitmap(int width, int height, BOOL bWhite)
Definition: dib.cpp:45
HBITMAP SetBitmapAndInfo(HBITMAP hBitmap, LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
Definition: dib.cpp:244
BOOL IsBitmapBlackAndWhite(HBITMAP hbm)
Definition: dib.cpp:580
HBITMAP CreateColorDIB(int width, int height, COLORREF rgb)
Definition: dib.cpp:65
#define FALSE
Definition: types.h:117
static HBITMAP hBitmap
Definition: timezone.c:26
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
#define GUID_NULL
Definition: ks.h:106
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
Definition: scsiwmi.h:51
Definition: name.c:39
int32_t INT
Definition: typedefs.h:58
#define dpi
Definition: sysparams.c:23
_In_ ULONG _In_ ULONG rgb
Definition: winddi.h:3521
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
DWORD COLORREF
Definition: windef.h:300
#define IMAGE_BITMAP
Definition: winuser.h:211
#define LR_CREATEDIBSECTION
Definition: winuser.h:1097
#define LR_COPYRETURNORG
Definition: winuser.h:1089
HANDLE WINAPI CopyImage(_In_ HANDLE, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:1970
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185