ReactOS  0.4.14-dev-583-g2a1ba2c
Bitmap Class Reference

#include <gdiplusheaders.h>

Inheritance diagram for Bitmap:
Collaboration diagram for Bitmap:

Public Member Functions

 Bitmap (INT width, INT height, Graphics *target)
 
 Bitmap (const BITMAPINFO *gdiBitmapInfo, VOID *gdiBitmapData)
 
 Bitmap (INT width, INT height, PixelFormat format)
 
 Bitmap (HBITMAP hbm, HPALETTE hpal)
 
 Bitmap (INT width, INT height, INT stride, PixelFormat format, BYTE *scan0)
 
 Bitmap (const WCHAR *filename, BOOL useIcm)
 
 Bitmap (HINSTANCE hInstance, const WCHAR *bitmapName)
 
 Bitmap (HICON hicon)
 
 Bitmap (IStream *stream, BOOL useIcm)
 
BitmapClone (const Rect &rect, PixelFormat format)
 
BitmapClone (const RectF &rect, PixelFormat format)
 
BitmapClone (REAL x, REAL y, REAL width, REAL height, PixelFormat format)
 
BitmapClone (INT x, INT y, INT width, INT height, PixelFormat format)
 
Status GetHBITMAP (const Color &colorBackground, HBITMAP *hbmReturn)
 
Status GetHICON (HICON *hicon)
 
Status GetPixel (INT x, INT y, Color *color)
 
Status LockBits (const Rect *rect, UINT flags, PixelFormat format, BitmapData *lockedBitmapData)
 
Status SetPixel (INT x, INT y, const Color &color)
 
Status SetResolution (REAL xdpi, REAL ydpi)
 
Status UnlockBits (BitmapData *lockedBitmapData)
 
- Public Member Functions inherited from Image
 Image (IStream *stream, BOOL useEmbeddedColorManagement=FALSE)
 
 Image (const WCHAR *filename, BOOL useEmbeddedColorManagement=FALSE)
 
ImageClone (VOID)
 
Status GetAllPropertyItems (UINT totalBufferSize, UINT numProperties, PropertyItem *allItems)
 
Status GetBounds (RectF *srcRect, Unit *srcUnit)
 
Status GetEncoderParameterList (const CLSID *clsidEncoder, UINT size, EncoderParameters *buffer)
 
UINT GetEncoderParameterListSize (const CLSID *clsidEncoder)
 
UINT GetFlags (VOID)
 
UINT GetFrameCount (const GUID *dimensionID)
 
UINT GetFrameDimensionsCount (VOID)
 
Status GetFrameDimensionsList (GUID *dimensionIDs, UINT count)
 
UINT GetHeight (VOID)
 
REAL GetHorizontalResolution (VOID)
 
Status GetLastStatus (VOID)
 
Status GetPalette (ColorPalette *palette, INT size)
 
INT GetPaletteSize (VOID)
 
Status GetPhysicalDimension (SizeF *size)
 
PixelFormat GetPixelFormat (VOID)
 
UINT GetPropertyCount (VOID)
 
Status GetPropertyIdList (UINT numOfProperty, PROPID *list)
 
Status GetPropertyItem (PROPID propId, UINT propSize, PropertyItem *buffer)
 
UINT GetPropertyItemSize (PROPID propId)
 
Status GetPropertySize (UINT *totalBufferSize, UINT *numProperties)
 
Status GetRawFormat (GUID *format)
 
ImageGetThumbnailImage (UINT thumbWidth, UINT thumbHeight, GetThumbnailImageAbort callback, VOID *callbackData)
 
ImageType GetType (VOID)
 
REAL GetVerticalResolution (VOID)
 
UINT GetWidth (VOID)
 
Status RemovePropertyItem (PROPID propId)
 
Status RotateFlip (RotateFlipType rotateFlipType)
 
Status Save (IStream *stream, const CLSID *clsidEncoder, const EncoderParameters *encoderParams)
 
Status Save (const WCHAR *filename, const CLSID *clsidEncoder, const EncoderParameters *encoderParams)
 
Status SaveAdd (const EncoderParameters *encoderParams)
 
Status SaveAdd (Image *newImage, const EncoderParameters *encoderParams)
 
Status SelectActiveFrame (const GUID *dimensionID, UINT frameIndex)
 
Status SetPalette (const ColorPalette *palette)
 
Status SetPropertyItem (const PropertyItem *item)
 
- Public Member Functions inherited from GdiplusBase
void operator delete (void *in_pVoid)
 
void operator delete[] (void *in_pVoid)
 
voidoperator new (size_t in_size)
 
voidoperator new[] (size_t in_size)
 

Static Public Member Functions

static BitmapFromBITMAPINFO (const BITMAPINFO *gdiBitmapInfo, VOID *gdiBitmapData)
 
static BitmapFromFile (const WCHAR *filename, BOOL useEmbeddedColorManagement)
 
static BitmapFromHBITMAP (HBITMAP hbm, HPALETTE hpal)
 
static BitmapFromHICON (HICON hicon)
 
static BitmapFromResource (HINSTANCE hInstance, const WCHAR *bitmapName)
 
static BitmapFromStream (IStream *stream, BOOL useEmbeddedColorManagement)
 
- Static Public Member Functions inherited from Image
static ImageFromFile (const WCHAR *filename, BOOL useEmbeddedColorManagement=FALSE)
 
static ImageFromStream (IStream *stream, BOOL useEmbeddedColorManagement=FALSE)
 

Protected Member Functions

 Bitmap ()
 
- Protected Member Functions inherited from Image
 Image ()
 

Private Member Functions

Status SetStatus (Status status) const
 

Private Attributes

Status status
 
GpBitmapbitmap
 

Friends

class CachedBitmap
 

Detailed Description

Definition at line 278 of file gdiplusheaders.h.

Constructor & Destructor Documentation

◆ Bitmap() [1/10]

Bitmap::Bitmap ( INT  width,
INT  height,
Graphics target 
)
inline

Definition at line 288 of file gdiplusheaders.h.

289  {
291  }
GLint GLint GLsizei width
Definition: gl.h:1546
smooth NULL
Definition: ftsmooth.c:416
Definition: uimain.c:88
GpStatus WINGDIPAPI GdipCreateBitmapFromGraphics(INT width, INT height, GpGraphics *target, GpBitmap **bitmap)
Definition: image.c:1542
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLenum target
Definition: glext.h:7315
Definition: ps.c:97

◆ Bitmap() [2/10]

Bitmap::Bitmap ( const BITMAPINFO gdiBitmapInfo,
VOID gdiBitmapData 
)
inline

Definition at line 293 of file gdiplusheaders.h.

294  {
295  status = DllExports::GdipCreateBitmapFromGdiDib(gdiBitmapInfo, gdiBitmapData, &bitmap);
296  }
GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO *info, VOID *bits, GpBitmap **bitmap)
Definition: image.c:1385
Definition: uimain.c:88
Definition: ps.c:97

◆ Bitmap() [3/10]

Bitmap::Bitmap ( INT  width,
INT  height,
PixelFormat  format 
)
inline

Definition at line 298 of file gdiplusheaders.h.

299  {
300  }

◆ Bitmap() [4/10]

Bitmap::Bitmap ( HBITMAP  hbm,
HPALETTE  hpal 
)
inline

Definition at line 302 of file gdiplusheaders.h.

303  {
305  }
GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBitmap **bitmap)
Definition: image.c:5104
Definition: uimain.c:88
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
Definition: ps.c:97

◆ Bitmap() [5/10]

Bitmap::Bitmap ( INT  width,
INT  height,
INT  stride,
PixelFormat  format,
BYTE scan0 
)
inline

Definition at line 307 of file gdiplusheaders.h.

308  {
310  }
GLint GLint GLsizei width
Definition: gl.h:1546
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0, GpBitmap **bitmap)
Definition: image.c:1760
Definition: uimain.c:88
GLsizei stride
Definition: glext.h:5848
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
Definition: ps.c:97

◆ Bitmap() [6/10]

Bitmap::Bitmap ( const WCHAR filename,
BOOL  useIcm 
)
inline

Definition at line 312 of file gdiplusheaders.h.

313  {
314  if (useIcm)
316  else
318  }
const char * filename
Definition: ioapi.h:135
GpStatus WINGDIPAPI GdipCreateBitmapFromFileICM(GDIPCONST WCHAR *filename, GpBitmap **bitmap)
Definition: image.c:1436
Definition: uimain.c:88
GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR *filename, GpBitmap **bitmap)
Definition: image.c:1360
Definition: ps.c:97

◆ Bitmap() [7/10]

Bitmap::Bitmap ( HINSTANCE  hInstance,
const WCHAR bitmapName 
)
inline

Definition at line 320 of file gdiplusheaders.h.

321  {
323  }
HINSTANCE hInstance
Definition: charmap.c:20
GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE hInstance, GDIPCONST WCHAR *lpBitmapName, GpBitmap **bitmap)
Definition: image.c:1444
Definition: uimain.c:88
Definition: ps.c:97

◆ Bitmap() [8/10]

Bitmap::Bitmap ( HICON  hicon)
inline

Definition at line 325 of file gdiplusheaders.h.

326  {
328  }
GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap **bitmap)
Definition: image.c:1564
Definition: uimain.c:88
Definition: ps.c:97

◆ Bitmap() [9/10]

Bitmap::Bitmap ( IStream stream,
BOOL  useIcm 
)
inline

Definition at line 330 of file gdiplusheaders.h.

331  {
332  if (useIcm)
334  else
336  }
GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream *stream, GpBitmap **bitmap)
Definition: image.c:1922
GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream *stream, GpBitmap **bitmap)
Definition: image.c:1900
Definition: uimain.c:88
Definition: parse.h:22
Definition: ps.c:97

◆ Bitmap() [10/10]

Bitmap::Bitmap ( )
inlineprotected

Definition at line 441 of file gdiplusheaders.h.

442  {
443  }

Referenced by Clone(), FromBITMAPINFO(), FromFile(), FromHBITMAP(), FromHICON(), FromResource(), and FromStream().

Member Function Documentation

◆ Clone() [1/4]

Bitmap* Bitmap::Clone ( const Rect rect,
PixelFormat  format 
)
inline

Definition at line 338 of file gdiplusheaders.h.

339  {
340  Bitmap *dstBitmap = new Bitmap();
341  SetStatus(DllExports::GdipCloneBitmapAreaI(rect.X, rect.Y, rect.Width, rect.Height, format, bitmap, dstBitmap ? &dstBitmap->bitmap : NULL));
342  return dstBitmap;
343  }
GpBitmap * bitmap
& rect
Definition: startmenu.cpp:1413
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GpStatus WINGDIPAPI GdipCloneBitmapAreaI(INT x, INT y, INT width, INT height, PixelFormat format, GpBitmap *srcBitmap, GpBitmap **dstBitmap)
Definition: image.c:1300
smooth NULL
Definition: ftsmooth.c:416
Definition: uimain.c:88
Status SetStatus(Status status) const

◆ Clone() [2/4]

Bitmap* Bitmap::Clone ( const RectF rect,
PixelFormat  format 
)
inline

Definition at line 345 of file gdiplusheaders.h.

346  {
347  Bitmap *dstBitmap = new Bitmap();
348  SetStatus(DllExports::GdipCloneBitmapArea(rect.X, rect.Y, rect.Width, rect.Height, format, bitmap, dstBitmap ? &dstBitmap->bitmap : NULL));
349  return dstBitmap;
350  }
GpBitmap * bitmap
& rect
Definition: startmenu.cpp:1413
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
smooth NULL
Definition: ftsmooth.c:416
Definition: uimain.c:88
GpStatus WINGDIPAPI GdipCloneBitmapArea(REAL x, REAL y, REAL width, REAL height, PixelFormat format, GpBitmap *srcBitmap, GpBitmap **dstBitmap)
Definition: image.c:1237
Status SetStatus(Status status) const

◆ Clone() [3/4]

Bitmap* Bitmap::Clone ( REAL  x,
REAL  y,
REAL  width,
REAL  height,
PixelFormat  format 
)
inline

Definition at line 352 of file gdiplusheaders.h.

353  {
354  Bitmap *dstBitmap = new Bitmap();
355  SetStatus(DllExports::GdipCloneBitmapArea(x, y, width, height, format, bitmap, dstBitmap ? &dstBitmap->bitmap : NULL));
356  return dstBitmap;
357  }
GpBitmap * bitmap
GLint GLint GLsizei width
Definition: gl.h:1546
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
smooth NULL
Definition: ftsmooth.c:416
Definition: uimain.c:88
GpStatus WINGDIPAPI GdipCloneBitmapArea(REAL x, REAL y, REAL width, REAL height, PixelFormat format, GpBitmap *srcBitmap, GpBitmap **dstBitmap)
Definition: image.c:1237
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
Status SetStatus(Status status) const
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ Clone() [4/4]

Bitmap* Bitmap::Clone ( INT  x,
INT  y,
INT  width,
INT  height,
PixelFormat  format 
)
inline

Definition at line 359 of file gdiplusheaders.h.

360  {
361  Bitmap *dstBitmap = new Bitmap();
362  SetStatus(DllExports::GdipCloneBitmapAreaI(x, y, width, height, format, bitmap, dstBitmap ? &dstBitmap->bitmap : NULL));
363  return dstBitmap;
364  }
GpBitmap * bitmap
GLint GLint GLsizei width
Definition: gl.h:1546
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GpStatus WINGDIPAPI GdipCloneBitmapAreaI(INT x, INT y, INT width, INT height, PixelFormat format, GpBitmap *srcBitmap, GpBitmap **dstBitmap)
Definition: image.c:1300
smooth NULL
Definition: ftsmooth.c:416
Definition: uimain.c:88
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
Status SetStatus(Status status) const
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ FromBITMAPINFO()

static Bitmap* Bitmap::FromBITMAPINFO ( const BITMAPINFO gdiBitmapInfo,
VOID gdiBitmapData 
)
inlinestatic

Definition at line 366 of file gdiplusheaders.h.

367  {
368  return new Bitmap(gdiBitmapInfo, gdiBitmapData);
369  }

◆ FromFile()

static Bitmap* Bitmap::FromFile ( const WCHAR filename,
BOOL  useEmbeddedColorManagement 
)
inlinestatic

Definition at line 376 of file gdiplusheaders.h.

377  {
378  return new Bitmap(filename, useEmbeddedColorManagement);
379  }
const char * filename
Definition: ioapi.h:135

◆ FromHBITMAP()

static Bitmap* Bitmap::FromHBITMAP ( HBITMAP  hbm,
HPALETTE  hpal 
)
inlinestatic

Definition at line 381 of file gdiplusheaders.h.

382  {
383  return new Bitmap(hbm, hpal);
384  }
_In_ HBITMAP hbm
Definition: ntgdi.h:2776

◆ FromHICON()

static Bitmap* Bitmap::FromHICON ( HICON  hicon)
inlinestatic

Definition at line 386 of file gdiplusheaders.h.

387  {
388  return new Bitmap(hicon);
389  }

◆ FromResource()

static Bitmap* Bitmap::FromResource ( HINSTANCE  hInstance,
const WCHAR bitmapName 
)
inlinestatic

Definition at line 391 of file gdiplusheaders.h.

392  {
393  return new Bitmap(hInstance, bitmapName);
394  }
HINSTANCE hInstance
Definition: charmap.c:20

◆ FromStream()

static Bitmap* Bitmap::FromStream ( IStream stream,
BOOL  useEmbeddedColorManagement 
)
inlinestatic

Definition at line 396 of file gdiplusheaders.h.

397  {
398  return new Bitmap(stream, useEmbeddedColorManagement);
399  }
Definition: parse.h:22

◆ GetHBITMAP()

Status Bitmap::GetHBITMAP ( const Color colorBackground,
HBITMAP hbmReturn 
)
inline

Definition at line 401 of file gdiplusheaders.h.

402  {
403  return SetStatus(DllExports::GdipCreateHBITMAPFromBitmap(bitmap, hbmReturn, colorBackground.GetValue()));
404  }
Definition: uimain.c:88
GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap *bitmap, HBITMAP *hbmReturn, ARGB background)
Definition: image.c:1479
Status SetStatus(Status status) const

◆ GetHICON()

Status Bitmap::GetHICON ( HICON hicon)
inline

Definition at line 406 of file gdiplusheaders.h.

407  {
409  }
GpStatus WINGDIPAPI GdipCreateHICONFromBitmap(GpBitmap *bitmap, HICON *hicon)
Definition: image.c:1953
Definition: uimain.c:88
Status SetStatus(Status status) const

◆ GetPixel()

Status Bitmap::GetPixel ( INT  x,
INT  y,
Color color 
)
inline

Definition at line 411 of file gdiplusheaders.h.

412  {
413  ARGB argb;
415  if (color != NULL)
416  color->SetValue(argb);
417  return s;
418  }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap *bitmap, INT x, INT y, ARGB *color)
Definition: image.c:288
GLuint color
Definition: glext.h:6243
smooth NULL
Definition: ftsmooth.c:416
Definition: uimain.c:88
GLdouble s
Definition: gl.h:2039
Status
Definition: gdiplustypes.h:24
Status SetStatus(Status status) const
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
DWORD ARGB

◆ LockBits()

Status Bitmap::LockBits ( const Rect rect,
UINT  flags,
PixelFormat  format,
BitmapData lockedBitmapData 
)
inline

Definition at line 420 of file gdiplusheaders.h.

421  {
422  return SetStatus(DllExports::GdipBitmapLockBits(bitmap, rect, flags, format, lockedBitmapData));
423  }
& rect
Definition: startmenu.cpp:1413
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap *bitmap, GDIPCONST GpRect *rect, UINT flags, PixelFormat format, BitmapData *lockeddata)
Definition: image.c:1030
Definition: uimain.c:88
GLbitfield flags
Definition: glext.h:7161
Status SetStatus(Status status) const

◆ SetPixel()

Status Bitmap::SetPixel ( INT  x,
INT  y,
const Color color 
)
inline

Definition at line 425 of file gdiplusheaders.h.

426  {
427  return SetStatus(DllExports::GdipBitmapSetPixel(bitmap, x, y, color.GetValue()));
428  }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap *bitmap, INT x, INT y, ARGB color)
Definition: image.c:494
GLuint color
Definition: glext.h:6243
Definition: uimain.c:88
Status SetStatus(Status status) const
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

◆ SetResolution()

Status Bitmap::SetResolution ( REAL  xdpi,
REAL  ydpi 
)
inline

Definition at line 430 of file gdiplusheaders.h.

431  {
433  }
Definition: uimain.c:88
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipBitmapSetResolution(GpBitmap *bitmap, REAL xdpi, REAL ydpi)
Definition: image.c:1163

◆ SetStatus()

Status Bitmap::SetStatus ( Status  status) const
inlineprivate

Definition at line 449 of file gdiplusheaders.h.

450  {
451  if (status == Ok)
452  return status;
453  this->status = status;
454  return status;
455  }
Status status
Definition: ps.c:97

Referenced by Clone(), GetHBITMAP(), GetHICON(), GetPixel(), LockBits(), SetPixel(), SetResolution(), and UnlockBits().

◆ UnlockBits()

Status Bitmap::UnlockBits ( BitmapData lockedBitmapData)
inline

Definition at line 435 of file gdiplusheaders.h.

436  {
437  return SetStatus(DllExports::GdipBitmapUnlockBits(bitmap, lockedBitmapData));
438  }
Definition: uimain.c:88
GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap *bitmap, BitmapData *lockeddata)
Definition: image.c:1176
Status SetStatus(Status status) const

Friends And Related Function Documentation

◆ CachedBitmap

friend class CachedBitmap
friend

Definition at line 280 of file gdiplusheaders.h.

Member Data Documentation

◆ bitmap

GpBitmap* Bitmap::bitmap
private

Definition at line 447 of file gdiplusheaders.h.

Referenced by Clone().

◆ status

Status Bitmap::status
mutableprivate

Definition at line 446 of file gdiplusheaders.h.

Referenced by SetStatus().


The documentation for this class was generated from the following file: