本文整理汇总了C++中TImage::Base方法的典型用法代码示例。如果您正苦于以下问题:C++ TImage::Base方法的具体用法?C++ TImage::Base怎么用?C++ TImage::Base使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TImage
的用法示例。
在下文中一共展示了TImage::Base方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckPosition
void TTransRemain::CheckPosition( TImage<unsigned char> &srcImage,
TImage<unsigned char > &dstImage,
vector<RECT> &rectSet,
const size_t radius)
{
TBmpInfo info;
info.Width (srcImage.Width());
info.Height (srcImage.Height());
info.AccordMem();
TBmpBoard bmpBoard;
bmpBoard.SetBmpInfo(info);
PixelMem *pPixel = bmpBoard.GetPixelBase();
memcpy(pPixel, dstImage.Base(), dstImage.Width() * dstImage.Height());
HDC memHDC = bmpBoard.GetMemDC();
ArcTemple uptemp = ArcCreator::CreateArc(radius, ArcTemple::eUpArc);
ArcTemple downTemp = ArcCreator::CreateArc(radius, ArcTemple::eDownArc);
TPoint2D<int> upCentre;
TPoint2D<int> downCentre;
for(size_t i = 0; i < rectSet.size(); ++i)
{
long upSpeciSide = rectSet[i].top + (rectSet[i].bottom - rectSet[i].top)/3;
long downSpeciSide = rectSet[i].top + (rectSet[i].bottom - rectSet[i].top)*2/3;
TRect2D<int> selectUpArea(rectSet[i].left, rectSet[i].top, rectSet[i].right-1, upSpeciSide);
TRect2D<int> selectDownArea(rectSet[i].left, downSpeciSide, rectSet[i].right, rectSet[i].bottom);
GetTopPos(srcImage, selectUpArea, upCentre, uptemp);
if (!selectUpArea.Within(upCentre.x(), upCentre.y()))
{
upCentre = selectUpArea.Center();
}
GetTopPos(srcImage, selectDownArea, downCentre, downTemp);
if (!selectDownArea.Within(downCentre.x(), downCentre.y()))
{
downCentre = selectDownArea.Center();
}
FillDest(dstImage, upCentre, downCentre, memHDC, radius);
}
memcpy(dstImage.Base(), pPixel, dstImage.Width()* dstImage.Height());
}