本文整理汇总了C++中Rect::Deflated方法的典型用法代码示例。如果您正苦于以下问题:C++ Rect::Deflated方法的具体用法?C++ Rect::Deflated怎么用?C++ Rect::Deflated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rect
的用法示例。
在下文中一共展示了Rect::Deflated方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FramePaint
void RightTabs::FramePaint(Draw& w, const Rect& rr)
{
Rect r = rr;
r.right -= cx;
DrawFrame(w, r, FieldFrameColor());
DrawFrame(w, r.Deflated(1), SColorPaper);
if(cursor >= 0) {
Tab& t = tab[cursor];
w.DrawRect(r.right - 1, t.y + 1, 1, t.GetHeight() + 1, SColorFace);
}
}
示例2: iw
void IconDes::RectTool0(Point p, dword flags, bool empty)
{
Size isz = GetImageSize();
IconDraw iw(isz);
iw.DrawRect(isz, GrayColor(0));
Rect r = Rect(startpoint, p + 1).Normalized();
if(empty)
iw.DrawRect(r.Deflated(pen, pen), GrayColor(128));
DrawFatFrame(iw, r, GrayColor(255), pen);
ApplyDraw(iw, flags);
}
示例3: Paint
void HeaderCtrl::Paint(Draw& w) {
RefreshDistribution();
Size sz = GetSize();
w.DrawRect(sz, SColorFace());
bool ds = !IsShowEnabled();
double rs = Denominator();
double rr = 0;
int x = -sb;
light = -1;
bool first = true;
int dx = Null;
for(int i = 0; i < col.GetCount(); i++) {
if(col[i].visible) {
Rect r;
if(mode == SCROLL) {
int cx = (int)col[i].ratio;
r = RectC(x, 0, cx, sz.cy);
x += cx;
}
else {
rr += rs ? col[i].ratio : 1;
int xx = int(rr * sz.cx / (rs ? rs : col.GetCount()));
r = RectC(x, 0, i == col.GetCount() - 1 ? sz.cx - x : xx - x, sz.cy);
x = xx;
}
bool mousein = HasMouseIn(r.Deflated(1, 0)) && col[i].WhenAction && pushi < 0 &&
!isdrag;
if(mousein)
light = i;
col[i].Paint(first, w,
r.left, r.top, r.Width(), r.Height(), ds, push && i == pushi, mousein);
if(isdrag && ti == i)
dx = r.left;
}
if(x >= sz.cx) break;
}
Column h;
h.header = this;
h.Paint(first, w, x, 0, 999, sz.cy, false, false, false);
if(isdrag) {
w.DrawImage(dragx + dragd, 0, dragtab);
DrawVertDrop(w, IsNull(dx) ? sz.cx - 2 : dx - (dx > 0), 0, sz.cy);
}
}
示例4: GetPointAlign
int DockWindow::GetPointAlign(const Point p, Rect r, bool center, bool allow_lr, bool allow_tb)
{
Size border = r.GetSize();
border.cx = allow_lr ? border.cx/4 : 0;
border.cy = allow_tb ? border.cy/4 : 0;
if (center && r.Deflated(border).Contains(p))
return DOCK_NONE;
int q = GetQuad(p, r);
int al = DOCK_NONE;
if (q == 0 || q == 1)
al = DOCK_TOP;
else if (q == 2 || q == 3)
al = DOCK_RIGHT;
else if (q == 4 || q == 5)
al = DOCK_BOTTOM;
else if (q == 6 || q == 7)
al = DOCK_LEFT;
if (!allow_lr && (al == DOCK_LEFT || al == DOCK_RIGHT))
al = (q == 7 || q == 2) ? DOCK_TOP : DOCK_BOTTOM;
else if (!allow_tb && (al == DOCK_TOP || al == DOCK_BOTTOM))
al = (q == 0 || q == 5) ? DOCK_LEFT : DOCK_RIGHT;
return al;
}
示例5: FramePaint
virtual void FramePaint(Draw& w, const Rect& r) {
DrawFrame(w, r, FieldFrameColor());
DrawFrame(w, r.Deflated(1), SColorPaper);
}