本文整理汇总了C++中ZRect::IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ ZRect::IsEmpty方法的具体用法?C++ ZRect::IsEmpty怎么用?C++ ZRect::IsEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZRect
的用法示例。
在下文中一共展示了ZRect::IsEmpty方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FrameRect
void ZDCCanvas_X::FrameRect(ZDCState& ioState, const ZRect& inRect)
{
if (!fDrawable)
return;
if (!ioState.fInk)
return;
if (ioState.fPenWidth <= 0)
return;
if (inRect.IsEmpty())
return;
if (ioState.fPenWidth == 1)
{
SetupLock theSetupLock(this);
SetupClip theSetupClip(this, ioState);
if (theSetupClip.IsEmpty())
return;
SetupInk theSetupInk(this, ioState);
ZRect realRect = inRect + ioState.fOrigin;
fXServer->DrawRectangle(fDrawable, fGC, inRect.left + ioState.fOrigin.h, inRect.top + ioState.fOrigin.v, inRect.Width() - 1, inRect.Height() - 1);
}
else
{
this->Line(ioState, inRect.left, inRect.top, inRect.right - ioState.fPenWidth, inRect.top);
this->Line(ioState, inRect.right - ioState.fPenWidth, inRect.top, inRect.right - ioState.fPenWidth, inRect.bottom - ioState.fPenWidth);
this->Line(ioState, inRect.right - ioState.fPenWidth, inRect.bottom - ioState.fPenWidth, inRect.left, inRect.bottom - ioState.fPenWidth);
this->Line(ioState, inRect.left, inRect.bottom - ioState.fPenWidth, inRect.left, inRect.top);
}
}
示例2: InvertRoundRect
void ZDCCanvas_X::InvertRoundRect(ZDCState& ioState, const ZRect& inRect, const ZPoint& inCornerSize)
{
if (!fDrawable)
return;
if (inRect.IsEmpty())
return;
this->InvertRegion(ioState, ZDCRgn::sRoundRect(inRect, inCornerSize));
}
示例3: FrameRoundRect
void ZDCCanvas_X::FrameRoundRect(ZDCState& ioState, const ZRect& inRect, const ZPoint& inCornerSize)
{
if (!fDrawable)
return;
if (!ioState.fInk)
return;
if (ioState.fPenWidth <= 0)
return;
if (inRect.IsEmpty())
return;
this->FrameRegion(ioState, ZDCRgn::sRoundRect(inRect, inCornerSize));
}
示例4: InvertEllipse
void ZDCCanvas_X::InvertEllipse(ZDCState& ioState, const ZRect& inBounds)
{
if (!fDrawable)
return;
if (inBounds.IsEmpty())
return;
SetupLock theSetupLock(this);
SetupClip theSetupClip(this, ioState);
if (theSetupClip.IsEmpty())
return;
fXServer->SetFunction(fGC, GXinvert);
++fChangeCount_Mode;
fXServer->FillArc(fDrawable, fGC, inBounds.left + ioState.fOrigin.h, inBounds.top + ioState.fOrigin.v, inBounds.Width(), inBounds.Height(), 0, 360*64);
}
示例5: InvertRect
void ZDCCanvas_X::InvertRect(ZDCState& ioState, const ZRect& inRect)
{
if (!fDrawable)
return;
if (inRect.IsEmpty())
return;
SetupLock theSetupLock(this);
SetupClip theSetupClip(this, ioState);
if (theSetupClip.IsEmpty())
return;
fXServer->SetFunction(fGC, GXinvert);
++fChangeCount_Mode;
fXServer->FillRectangle(fDrawable, fGC, inRect.left + ioState.fOrigin.h, inRect.top + ioState.fOrigin.v, inRect.Width(), inRect.Height());
}
示例6: FillEllipse
void ZDCCanvas_X::FillEllipse(ZDCState& ioState, const ZRect& inBounds)
{
if (!fDrawable)
return;
if (!ioState.fInk)
return;
if (inBounds.IsEmpty())
return;
SetupLock theSetupLock(this);
SetupClip theSetupClip(this, ioState);
if (theSetupClip.IsEmpty())
return;
SetupInk theSetupInk(this, ioState);
fXServer->FillArc(fDrawable, fGC, inBounds.left + ioState.fOrigin.h, inBounds.top + ioState.fOrigin.v, inBounds.Width(), inBounds.Height(), 0, 360*64);
}
示例7: FillRect
void ZDCCanvas_X::FillRect(ZDCState& ioState, const ZRect& inRect)
{
if (!fDrawable)
return;
if (!ioState.fInk)
return;
if (inRect.IsEmpty())
return;
SetupLock theSetupLock(this);
SetupClip theSetupClip(this, ioState);
if (theSetupClip.IsEmpty())
return;
SetupInk theSetupInk(this, ioState);
fXServer->FillRectangle(fDrawable, fGC, inRect.left + ioState.fOrigin.h, inRect.top + ioState.fOrigin.v, inRect.Width(), inRect.Height());
}
示例8: FrameEllipse
void ZDCCanvas_X::FrameEllipse(ZDCState& ioState, const ZRect& inBounds)
{
if (!fDrawable)
return;
if (!ioState.fInk)
return;
if (ioState.fPenWidth <= 0)
return;
if (inBounds.IsEmpty())
return;
SetupLock theSetupLock(this);
SetupClip theSetupClip(this, ioState);
if (theSetupClip.IsEmpty())
return;
SetupInk theSetupInk(this, ioState);
ZPoint ellipseSize = inBounds.Size();
ZCoord twicePenWidth = ioState.fPenWidth * 2;
if (twicePenWidth >= ellipseSize.h || twicePenWidth >= ellipseSize.v)
{
fXServer->FillArc(fDrawable, fGC,
inBounds.left + ioState.fOrigin.h,
inBounds.top + ioState.fOrigin.v,
ellipseSize.h,
ellipseSize.v,
0, 360*64);
}
else
{
ZCoord halfPenWidth = ioState.fPenWidth / 2;
fXServer->DrawArc(fDrawable, fGC,
inBounds.left + ioState.fOrigin.h + halfPenWidth,
inBounds.top + ioState.fOrigin.v + halfPenWidth,
ellipseSize.h - 2 * halfPenWidth,
ellipseSize.v - 2 * halfPenWidth,
0, 360 * 64);
}
}