You.i Engine
YiImageAssetLoadParams.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_IMAGE_ASSET_LOAD_PARAMS_H_
3 #define _YI_IMAGE_ASSET_LOAD_PARAMS_H_
4 
5 #include "YiAssetLoadParams.h"
6 
7 class CYIBitmap;
8 
23 {
24 public:
29  {
36  };
37 
39  virtual ~CYIImageAssetLoadParams();
40 
44  void SetScaling(int32_t nWidth, int32_t nHeight);
45 
49  void SetScalingWidth(int32_t nWidth);
50 
54  void SetScalingHeight(int32_t nHeight);
55 
56  int32_t GetScalingWidth() const;
57  int32_t GetScalingHeight() const;
58 
64  void SetTargetBitmap(CYIBitmap *pBitmap);
65 
66  CYIBitmap *GetTargetBitmap() const;
67 
71  void SetLoadColorMode(LOAD_COLOR_MODE eLoadColorMode);
73 
77  static LOAD_COLOR_MODE GetEffectiveColorMode(LOAD_COLOR_MODE eLoadColorMode, int32_t nWidth, int32_t nHeight);
78 
79 private:
80  int32_t m_nWidth;
81  int32_t m_nHeight;
82  CYIBitmap *m_pTargetBitmap;
83  LOAD_COLOR_MODE m_eLoadColorMode;
84 
86 };
87 
92 #endif // _YI_IMAGE_ASSET_LOAD_PARAMS_H_
virtual ~CYIImageAssetLoadParams()
void SetLoadColorMode(LOAD_COLOR_MODE eLoadColorMode)
LOAD_COLOR_MODE
Definition: YiImageAssetLoadParams.h:28
CYIBitmap * GetTargetBitmap() const
Uses color mode CYIBitmap::COLOR_MODE_RGBA8888 with no dithering.
Definition: YiImageAssetLoadParams.h:31
The core bitmap container class used by You.i Engine.
Definition: YiBitmap.h:20
#define YI_TYPE_BASES(...)
Definition: YiRtti.h:350
Asset loading parameters which are specific to image asset decoding.
Definition: YiImageAssetLoadParams.h:22
Uses color mode CYIBitmap::COLOR_MODE_RGBA4444 with dithering CYIBitmap::DITHERING_FLOYD_STEINBERG.
Definition: YiImageAssetLoadParams.h:33
void SetTargetBitmap(CYIBitmap *pBitmap)
Base class for decoders which can accept specialized parameter objects.
Definition: YiAssetLoadParams.h:16
Uses color mode CYIBitmap::COLOR_MODE_RGBA4444 with no dithering.
Definition: YiImageAssetLoadParams.h:32
Uses color mode CYIBitmap::COLOR_MODE_RGB565 with dithering CYIBitmap::DITHERING_FLOYD_STEINBERG.
Definition: YiImageAssetLoadParams.h:35
static LOAD_COLOR_MODE GetEffectiveColorMode(LOAD_COLOR_MODE eLoadColorMode, int32_t nWidth, int32_t nHeight)
int32_t GetScalingHeight() const
Uses the default load color mode for the current build configuration. This is usually CYIBitmap::COLO...
Definition: YiImageAssetLoadParams.h:30
int32_t GetScalingWidth() const
Uses color mode CYIBitmap::COLOR_MODE_RGB565 with no dithering.
Definition: YiImageAssetLoadParams.h:34
LOAD_COLOR_MODE GetLoadColorMode() const
void SetScalingHeight(int32_t nHeight)
void SetScaling(int32_t nWidth, int32_t nHeight)
void SetScalingWidth(int32_t nWidth)