?? gem.c
字號:
///////////////////////////////////////////////////////////////////////////////
//
// gem.c
//
// DESCRIPTION
// Define color match function.
//
///////////////////////////////////////////////////////////////////////////////
/*
Include declarations.
*/
#include "gifcommon.h"
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
+ C o l o r M a t c h %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ColorMatch() returns true if two pixels are identical in color.
%
% The format of the ColorMatch method is:
%
% void ColorMatch(const PixelPacket *p,const PixelPacket *q,
% const double fuzz)
%
% A description of each parameter follows:
%
% o p: Pixel p.
%
% o q: Pixel q.
%
% o distance: Define how much tolerance is acceptable to consider
% two colors as the same.
%
%
*/
unsigned int ColorMatch
(
const PixelPacket *p,
const PixelPacket *q
)
{
if ((p->red == q->red) && (p->green == q->green) && (p->blue == q->blue))
{
return(OP_TRUE);
}
else
{
return(OP_FALSE);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -