MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
MGImage クラス

MGImage defines bit map image data. [詳解]

公開メンバ関数

 MGImage ()
 
 MGImage (int wdth, int hght)
 Garbage image data constructor. [詳解]
 
 MGImage (const MGImage &image2)
 Copy constructor. image2.m_image's ownership is transfered to this. [詳解]
 
 MGImage (const MGImage &image2, int x, int y, int width, int height)
 Extract a part of image2. [詳解]
 
 MGImage (Gdiplus::Bitmap &bitmap)
 Conversion constructor from Gdiplus::Bitmap. [詳解]
 
 MGImage (Gdiplus::Bitmap &bitmap, int x, int y, int width, int height)
 Extract a part of bitmap. [詳解]
 
 MGImage (Gdiplus::Bitmap &bitmap, int x, int y, int width, int height, double alpha)
 Extract a part of bitmap with transparent. [詳解]
 
 MGImage (Gdiplus::Bitmap &bitmap, const Gdiplus::BrightnessContrast &bc, double alpha)
 imageのcontrast変換 [詳解]
 
virtual ~MGImage ()
 
MGImageoperator= (const MGImage &image2)
 image2.m_image's ownership is transfered to this. [詳解]
 
MGImageclone () const
 
int width () const
 
int height () const
 
MGPixelimage ()
 
const MGPixelimage () const
 
MGPixeloperator() (int i, int j)
 
const MGPixeloperator() (int i, int j) const
 
bool is_zero_alpha (int i, int j) const
 
void fill_color (const MGPixel &pdata)
 Fill all the pixel of this with the input color pdata. [詳解]
 
void fill_color (const MGPixel &pdata, int j, int i1, int i2)
 Fill all the pixels of the range (j, i1,i2) with the input color pdata. [詳解]
 
void fill_color (const MGPixel &pdata, const std::vector< int > &ranges)
 Fill all the pixels of ranges with the input color pdata. [詳解]
 
void fill_color_NoChangeAlpha (const MGPixel &pdata)
 
void fill_color_NoChangeAlpha (const MGPixel &pdata, int j, int i1, int i2)
 (j, i1,i2) で指定された全てのピクセルについて、 [詳解]
 
void copy_color (const MGImage &image2)
 
bool includeNonZeroAlpha (int i, int j) const
 
void copy_color (const MGImage &image2, const std::vector< int > &ranges)
 
void resize (int width, int height)
 
void resize_with_fill_color (int width, int height, const MGPixel &pdata)
 
void resize_and_add_zero_border (int nwidth2, int nheight2)
 Add border color(0,0,0,0)=(alfa=0) of pixel size2 for each perimeter. [詳解]
 

詳解

MGImage defines bit map image data.

MGImage defines the attributes of Image. MGImage's behavior is just like std::auto_ptr<>. That is , newed area of m_image is transfered if copied, of assined.

構築子と解体子

MGImage::MGImage ( )
inline
MGImage::MGImage ( int  wdth,
int  hght 
)

Garbage image data constructor.

MGImage::MGImage ( const MGImage image2)

Copy constructor. image2.m_image's ownership is transfered to this.

MGImage::MGImage ( const MGImage image2,
int  x,
int  y,
int  width,
int  height 
)

Extract a part of image2.

引数
image2The target image.
xleft bottom address of image2, x.
yy.
widthWidth.
heightHeight.
MGImage::MGImage ( Gdiplus::Bitmap &  bitmap)

Conversion constructor from Gdiplus::Bitmap.

MGImage::MGImage ( Gdiplus::Bitmap &  bitmap,
int  x,
int  y,
int  width,
int  height 
)

Extract a part of bitmap.

引数
bitmapThe target bitmap image.
xleft bottom address of image2, x.
yy.
widthWidth.
heightHeight.
MGImage::MGImage ( Gdiplus::Bitmap &  bitmap,
int  x,
int  y,
int  width,
int  height,
double  alpha 
)

Extract a part of bitmap with transparent.

引数
bitmapThe target bitmap image.
xleft bottom address of image2, x.
yy.
widthWidth.
heightHeight.
alpha0. <= alpha <= 1.
MGImage::MGImage ( Gdiplus::Bitmap &  bitmap,
const Gdiplus::BrightnessContrast &  bc,
double  alpha 
)

imageのcontrast変換

virtual MGImage::~MGImage ( )
virtual

関数詳解

MGImage* MGImage::clone ( ) const

Generate a cloned MGImage. Returned is newed one, must be deleted. clone() does not affect this image data.

void MGImage::copy_color ( const MGImage image2)
void MGImage::copy_color ( const MGImage image2,
const std::vector< int > &  ranges 
)
引数
image2Source image data.
rangesRanges(j,i1,i2) are input. ranges indicate the places of both this and image2.
void MGImage::fill_color ( const MGPixel pdata)

Fill all the pixel of this with the input color pdata.

void MGImage::fill_color ( const MGPixel pdata,
int  j,
int  i1,
int  i2 
)

Fill all the pixels of the range (j, i1,i2) with the input color pdata.

void MGImage::fill_color ( const MGPixel pdata,
const std::vector< int > &  ranges 
)

Fill all the pixels of ranges with the input color pdata.

void MGImage::fill_color_NoChangeAlpha ( const MGPixel pdata)
void MGImage::fill_color_NoChangeAlpha ( const MGPixel pdata,
int  j,
int  i1,
int  i2 
)

(j, i1,i2) で指定された全てのピクセルについて、

int MGImage::height ( ) const
inline
MGPixel* MGImage::image ( )
inline
const MGPixel* MGImage::image ( ) const
inline
bool MGImage::includeNonZeroAlpha ( int  i,
int  j 
) const
bool MGImage::is_zero_alpha ( int  i,
int  j 
) const

Test if pixel at (i,j) has zero_alpha value. Returns true if alpha value is zero.

MGPixel& MGImage::operator() ( int  i,
int  j 
)
const MGPixel& MGImage::operator() ( int  i,
int  j 
) const
MGImage& MGImage::operator= ( const MGImage image2)

image2.m_image's ownership is transfered to this.

void MGImage::resize ( int  width,
int  height 
)

resize the image size to (width,height). Scaling the whole image to the size (width, height).

void MGImage::resize_and_add_zero_border ( int  nwidth2,
int  nheight2 
)

Add border color(0,0,0,0)=(alfa=0) of pixel size2 for each perimeter.

void MGImage::resize_with_fill_color ( int  width,
int  height,
const MGPixel pdata 
)

resize the image size to (width,height) filling the color to the extra part for the size(width,height). resize_with_fill_color() does not perform scaling to the image. width and height can be less than the original length. In this case, image trimming will be done.

int MGImage::width ( ) const
inline

このクラス詳解は次のファイルから抽出されました: