ReactOS  0.4.14-dev-995-g774a425
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 ()
 
virtual ~Image ()
 
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 ()
 
UINT GetFrameCount (const GUID *dimensionID)
 
UINT GetFrameDimensionsCount ()
 
Status GetFrameDimensionsList (GUID *dimensionIDs, UINT count)
 
UINT GetHeight ()
 
REAL GetHorizontalResolution ()
 
Status GetLastStatus ()
 
Status GetPalette (ColorPalette *palette, INT size)
 
INT GetPaletteSize ()
 
Status GetPhysicalDimension (SizeF *size)
 
PixelFormat GetPixelFormat ()
 
UINT GetPropertyCount ()
 
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 ()
 
REAL GetVerticalResolution ()
 
UINT GetWidth ()
 
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 ()
 
 Bitmap (GpBitmap *nativeBitmap)
 
GpBitmapGetNativeBitmap () const
 
- Protected Member Functions inherited from Image
 Image ()
 
 Image (GpImage *image, Status status)
 
Status SetStatus (Status status) const
 
void SetNativeImage (GpImage *image)
 

Friends

class CachedBitmap
 

Additional Inherited Members

- Protected Attributes inherited from Image
GpImagenativeImage
 
Status lastStatus
 

Detailed Description

Definition at line 378 of file gdiplusheaders.h.

Constructor & Destructor Documentation

◆ Bitmap() [1/11]

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

Definition at line 388 of file gdiplusheaders.h.

389  {
390  GpBitmap *bitmap = NULL;
393  }
GLint GLint GLsizei width
Definition: gl.h:1546
friend GpImage *& getNat(const Image *image)
smooth NULL
Definition: ftsmooth.c:416
Status lastStatus
void SetNativeImage(GpImage *image)
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

◆ Bitmap() [2/11]

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

Definition at line 395 of file gdiplusheaders.h.

396  {
397  GpBitmap *bitmap = NULL;
398  lastStatus = DllExports::GdipCreateBitmapFromGdiDib(gdiBitmapInfo, gdiBitmapData, &bitmap);
400  }
GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO *info, VOID *bits, GpBitmap **bitmap)
Definition: image.c:1385
smooth NULL
Definition: ftsmooth.c:416
Status lastStatus
void SetNativeImage(GpImage *image)
Definition: uimain.c:88

◆ Bitmap() [3/11]

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

Definition at line 402 of file gdiplusheaders.h.

403  {
404  GpBitmap *bitmap = NULL;
407  }
GLint GLint GLsizei width
Definition: gl.h:1546
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
smooth NULL
Definition: ftsmooth.c:416
Status lastStatus
void SetNativeImage(GpImage *image)
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0, GpBitmap **bitmap)
Definition: image.c:1760
Definition: uimain.c:88
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546

◆ Bitmap() [4/11]

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

Definition at line 409 of file gdiplusheaders.h.

410  {
411  GpBitmap *bitmap = NULL;
414  }
GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBitmap **bitmap)
Definition: image.c:5104
smooth NULL
Definition: ftsmooth.c:416
Status lastStatus
void SetNativeImage(GpImage *image)
Definition: uimain.c:88
_In_ HBITMAP hbm
Definition: ntgdi.h:2776

◆ Bitmap() [5/11]

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

Definition at line 416 of file gdiplusheaders.h.

417  {
418  GpBitmap *bitmap = NULL;
421  }
GLint GLint GLsizei width
Definition: gl.h:1546
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
smooth NULL
Definition: ftsmooth.c:416
Status lastStatus
void SetNativeImage(GpImage *image)
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

◆ Bitmap() [6/11]

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

Definition at line 423 of file gdiplusheaders.h.

424  {
425  GpBitmap *bitmap = NULL;
426 
427  if (useIcm)
429  else
431 
433  }
const char * filename
Definition: ioapi.h:135
GpStatus WINGDIPAPI GdipCreateBitmapFromFileICM(GDIPCONST WCHAR *filename, GpBitmap **bitmap)
Definition: image.c:1436
smooth NULL
Definition: ftsmooth.c:416
Status lastStatus
void SetNativeImage(GpImage *image)
Definition: uimain.c:88
GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR *filename, GpBitmap **bitmap)
Definition: image.c:1360

◆ Bitmap() [7/11]

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

Definition at line 435 of file gdiplusheaders.h.

436  {
437  GpBitmap *bitmap = NULL;
440  }
HINSTANCE hInstance
Definition: charmap.c:20
smooth NULL
Definition: ftsmooth.c:416
Status lastStatus
void SetNativeImage(GpImage *image)
GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE hInstance, GDIPCONST WCHAR *lpBitmapName, GpBitmap **bitmap)
Definition: image.c:1444
Definition: uimain.c:88

◆ Bitmap() [8/11]

Bitmap::Bitmap ( HICON  hicon)
inline

Definition at line 442 of file gdiplusheaders.h.

443  {
444  GpBitmap *bitmap = NULL;
447  }
smooth NULL
Definition: ftsmooth.c:416
Status lastStatus
void SetNativeImage(GpImage *image)
GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap **bitmap)
Definition: image.c:1564
Definition: uimain.c:88

◆ Bitmap() [9/11]

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

Definition at line 449 of file gdiplusheaders.h.

450  {
451  GpBitmap *bitmap = NULL;
452  if (useIcm)
454  else
457  }
GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream *stream, GpBitmap **bitmap)
Definition: image.c:1922
GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream *stream, GpBitmap **bitmap)
Definition: image.c:1900
smooth NULL
Definition: ftsmooth.c:416
Status lastStatus
void SetNativeImage(GpImage *image)
Definition: uimain.c:88
Definition: parse.h:22

◆ Bitmap() [10/11]

Bitmap::Bitmap ( )
inlineprotected

Definition at line 596 of file gdiplusheaders.h.

597  {
598  }

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

◆ Bitmap() [11/11]

Bitmap::Bitmap ( GpBitmap nativeBitmap)
inlineprotected

Definition at line 600 of file gdiplusheaders.h.

601  {
602  lastStatus = Ok;
603  SetNativeImage(nativeBitmap);
604  }
Status lastStatus
void SetNativeImage(GpImage *image)

Member Function Documentation

◆ Clone() [1/4]

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

Definition at line 460 of file gdiplusheaders.h.

461  {
462  return Clone(rect.X, rect.Y, rect.Width, rect.Height, format);
463  }
Image * Clone()
& rect
Definition: startmenu.cpp:1413
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546

◆ Clone() [2/4]

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

Definition at line 466 of file gdiplusheaders.h.

467  {
468  return Clone(rect.X, rect.Y, rect.Width, rect.Height, format);
469  }
Image * Clone()
& rect
Definition: startmenu.cpp:1413
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546

◆ Clone() [3/4]

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

Definition at line 472 of file gdiplusheaders.h.

473  {
474  GpBitmap *bitmap = NULL;
476 
477  if (lastStatus != Ok)
478  return NULL;
479 
480  Bitmap *newBitmap = new Bitmap(bitmap);
481  if (newBitmap == NULL)
482  {
484  }
485 
486  return newBitmap;
487  }
GpBitmap * GetNativeBitmap() const
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
Status lastStatus
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
GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
Definition: image.c:2107
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
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 490 of file gdiplusheaders.h.

491  {
492  GpBitmap *bitmap = NULL;
494 
495  if (lastStatus != Ok)
496  return NULL;
497 
498  Bitmap *newBitmap = new Bitmap(bitmap);
499  if (newBitmap == NULL)
500  {
502  }
503 
504  return newBitmap;
505  }
GpBitmap * GetNativeBitmap() const
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
Status lastStatus
Definition: uimain.c:88
GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
Definition: image.c:2107
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
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 508 of file gdiplusheaders.h.

509  {
510  return new Bitmap(gdiBitmapInfo, gdiBitmapData);
511  }

◆ FromFile()

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

Definition at line 519 of file gdiplusheaders.h.

520  {
521  return new Bitmap(filename, useEmbeddedColorManagement);
522  }
const char * filename
Definition: ioapi.h:135

◆ FromHBITMAP()

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

Definition at line 525 of file gdiplusheaders.h.

526  {
527  return new Bitmap(hbm, hpal);
528  }
_In_ HBITMAP hbm
Definition: ntgdi.h:2776

◆ FromHICON()

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

Definition at line 531 of file gdiplusheaders.h.

532  {
533  return new Bitmap(hicon);
534  }

◆ FromResource()

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

Definition at line 537 of file gdiplusheaders.h.

538  {
539  return new Bitmap(hInstance, bitmapName);
540  }
HINSTANCE hInstance
Definition: charmap.c:20

◆ FromStream()

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

Definition at line 543 of file gdiplusheaders.h.

544  {
545  return new Bitmap(stream, useEmbeddedColorManagement);
546  }
Definition: parse.h:22

◆ GetHBITMAP()

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

Definition at line 549 of file gdiplusheaders.h.

550  {
551  return SetStatus(
552  DllExports::GdipCreateHBITMAPFromBitmap(GetNativeBitmap(), hbmReturn, colorBackground.GetValue()));
553  }
GpBitmap * GetNativeBitmap() const
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 556 of file gdiplusheaders.h.

557  {
559  }
GpBitmap * GetNativeBitmap() const
GpStatus WINGDIPAPI GdipCreateHICONFromBitmap(GpBitmap *bitmap, HICON *hicon)
Definition: image.c:1953
Status SetStatus(Status status) const

◆ GetNativeBitmap()

GpBitmap* Bitmap::GetNativeBitmap ( ) const
inlineprotected

Definition at line 607 of file gdiplusheaders.h.

608  {
609  return static_cast<GpBitmap *>(nativeImage);
610  }
GpImage * nativeImage

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

◆ GetPixel()

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

Definition at line 562 of file gdiplusheaders.h.

563  {
564  ARGB argb;
566  if (color)
567  color->SetValue(argb);
568  return s;
569  }
GpBitmap * GetNativeBitmap() const
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
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 572 of file gdiplusheaders.h.

573  {
575  }
GpBitmap * GetNativeBitmap() const
& 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
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 578 of file gdiplusheaders.h.

579  {
581  }
GpBitmap * GetNativeBitmap() const
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
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 584 of file gdiplusheaders.h.

585  {
587  }
GpBitmap * GetNativeBitmap() const
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipBitmapSetResolution(GpBitmap *bitmap, REAL xdpi, REAL ydpi)
Definition: image.c:1163

◆ UnlockBits()

Status Bitmap::UnlockBits ( BitmapData lockedBitmapData)
inline

Definition at line 590 of file gdiplusheaders.h.

591  {
592  return SetStatus(DllExports::GdipBitmapUnlockBits(GetNativeBitmap(), lockedBitmapData));
593  }
GpBitmap * GetNativeBitmap() const
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 380 of file gdiplusheaders.h.


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