共用方式為


CImage::SetPixel

Sets the color of a pixel at a given location in the bitmap.

void SetPixel(
   int x,
   int y,
   COLORREF color 
) throw( );

Parameters

  • x
    The horizontal location of the pixel to set.

  • y
    The vertical location of the pixel to set.

  • color
    The color to which you set the pixel.

Remarks

This method fails if the pixel coordinates lie outside of the selected clipping region.

Requirements

Header: atlimage.h

See Also

Concepts

CImage Class

CImage Members

CImage::GetPixel

CImage::SetPixelIndexed

CImage::SetPixelRGB