本文整理汇总了C++中BitmapData::getPixelPriv方法的典型用法代码示例。如果您正苦于以下问题:C++ BitmapData::getPixelPriv方法的具体用法?C++ BitmapData::getPixelPriv怎么用?C++ BitmapData::getPixelPriv使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitmapData
的用法示例。
在下文中一共展示了BitmapData::getPixelPriv方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: abstract_b
ASFUNCTIONBODY(BitmapData,hitTest)
{
BitmapData* th = obj->as<BitmapData>();
if(th->disposed)
throw Class<ArgumentError>::getInstanceS("Disposed BitmapData");
_NR<Point> firstPoint;
uint32_t firstAlphaThreshold;
_NR<ASObject> secondObject;
_NR<Point> secondBitmapDataPoint;
uint32_t secondAlphaThreshold;
ARG_UNPACK (firstPoint) (firstAlphaThreshold) (secondObject) (secondBitmapDataPoint, NullRef)
(secondAlphaThreshold,1);
if(!secondObject->getClass() || !secondObject->getClass()->isSubClass(Class<Point>::getClass()))
throw Class<TypeError>::getInstanceS("Error #1034: Wrong type");
if(!secondBitmapDataPoint.isNull() || secondAlphaThreshold!=1)
LOG(LOG_NOT_IMPLEMENTED,"BitmapData.hitTest does not expect some parameters");
Point* secondPoint = secondObject->as<Point>();
uint32_t pix=th->getPixelPriv(secondPoint->getX()-firstPoint->getX(), secondPoint->getY()-firstPoint->getY());
if((pix>>24)>=firstAlphaThreshold)
return abstract_b(true);
else
return abstract_b(false);
示例2: abstract_ui
ASFUNCTIONBODY(BitmapData,getPixel32)
{
BitmapData* th = obj->as<BitmapData>();
if(th->disposed)
throw Class<ArgumentError>::getInstanceS("Disposed BitmapData");
int32_t x;
int32_t y;
ARG_UNPACK(x)(y);
uint32_t pix=th->getPixelPriv(x, y);
return abstract_ui(pix);
}