本文整理汇总了C++中Pixel::GetBlue方法的典型用法代码示例。如果您正苦于以下问题:C++ Pixel::GetBlue方法的具体用法?C++ Pixel::GetBlue怎么用?C++ Pixel::GetBlue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pixel
的用法示例。
在下文中一共展示了Pixel::GetBlue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void Pixel::operator = (Pixel &pxArg)
{
this->iR = pxArg.GetRed();
this->iG = pxArg.GetGreen();
this->iB = pxArg.GetBlue();
this->iBW = pxArg.GetBW();
this->iX = pxArg.GetPixelX();
this->iY = pxArg.GetPixelY();
}
示例2: SetPixel
void Image::SetPixel(int X,int Y, Pixel pxP)
{
if(this->GetImageColorFormat() == 3)
{
this->pImageDate[X][Y*3] = pxP.GetRed();
this->pImageDate[X][Y*3+1] = pxP.GetGreen();
this->pImageDate[X][Y*3+2] = pxP.GetBlue();
}
else if(this->GetImageColorFormat() == 1)
{
this->pImageDate[X][Y] = pxP.GetBW();
}
}
示例3: pxTemp
Pixel Pixel::operator + (Pixel &pxArg)
{
Pixel pxTemp(this->GetRed() + pxArg.GetRed(),this->GetGreen() + pxArg.GetGreen(),this->GetBlue() + pxArg.GetBlue());
return pxTemp;
}
示例4: GetPixel
Pixel* Image::GetPixel(double dX, double dY)
{
int X1,Y1;
double diffA, diffB;
Pixel *pxP;
Pixel *pxPout;
int cRx = 0,cGx = 0,cBx = 0,cBWx = 0;
X1 = dX;
Y1 = dY;
diffA = dX - X1;
diffB = dY - Y1;
if(diffA == 0.000 && diffB == 0.000)
{
return this->GetPixel(X1,Y1);
}
if(diffA < 0 || diffB < 0)
{
return this->GetPixel(X1,Y1);
}
pxP = this->GetPixel(X1,Y1);
cBWx = (1.00 - diffA)*(1.00 - diffB)*pxP->GetBW();
cRx = (1.00 - diffA)*(1.00 - diffB)*pxP->GetRed();
cGx = (1.00 - diffA)*(1.00 - diffB)*pxP->GetGreen();
cBx = (1.00 - diffA)*(1.00 - diffB)*pxP->GetBlue();
//RGB
delete pxP;
pxP = this->GetPixel(X1,Y1+1);
cBWx += (1.00 - diffA)*(diffB)*pxP->GetBW();
cRx += (1.00 - diffA)*(diffB)*pxP->GetRed();
cGx += (1.00 - diffA)*(diffB)*pxP->GetGreen();
cBx += (1.00 - diffA)*(diffB)*pxP->GetBlue();
//RGB
delete pxP;
pxP = this->GetPixel(X1+1,Y1);
cBWx += (diffA)*(1.00 - diffB)*pxP->GetBW();
cRx += (diffA)*(1.00 - diffB)*pxP->GetRed();
cGx += (diffA)*(1.00 - diffB)*pxP->GetGreen();
cBx += (diffA)*(1.00 - diffB)*pxP->GetBlue();
//RGB
delete pxP;
pxP = this->GetPixel(X1+1,Y1+1);
cBWx += (diffA)*(diffB)*pxP->GetBW();
cRx += (diffA)*(diffB)*pxP->GetRed();
cGx += (diffA)*(diffB)*pxP->GetGreen();
cBx += (diffA)*(diffB)*pxP->GetBlue();
//RGB
delete pxP;
if(this->iColorFormat == 1)
{
pxPout = new Pixel(cBWx);
}
else if(this->iColorFormat == 3)
{
pxPout = new Pixel(cRx,cGx,cBx);
}
return pxPout;
}