476
社区成员
发帖
与我相关
我的任务
分享原文:
void setPixel ( const QPoint & position, uint index_or_rgb )Sets the pixel index or color at the given position to index_or_rgb.If the image's format is either monochrome or 8-bit, the given index_or_rgb value must be an index in the image's color table, otherwise the parameter must be a QRgb value.If position is not a valid coordinate pair in the image, or if index_or_rgb >= numColors() in the case of monochrome and 8-bit images, the result is undefined.See also pixel() and Pixel Manipulation.
翻译(DeepL提供):
void setPixel ( const QPoint & position, uint index_or_rgb ) 如果图像的格式是单色或8位,给定的index_or_rgb值必须是图像颜色表中的一个索引,否则参数必须是一个QRgb值。如果位置不是图像中的有效坐标对,或者在单色和8位图像中index_or_rgb>=numColors(),结果是未定义的。另见pixel()和Pixel Manipulation。