本文整理汇总了C++中Graphic31::effect方法的典型用法代码示例。如果您正苦于以下问题:C++ Graphic31::effect方法的具体用法?C++ Graphic31::effect怎么用?C++ Graphic31::effect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Graphic31
的用法示例。
在下文中一共展示了Graphic31::effect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: effect
boolean GraphicMaster::effect (const Event& e, Tool31& tool) {
boolean flag = true;
Window* w = e.window();
if (w != nil) {
w->cursor(window_cursor);
Canvas* c = w->canvas();
long count = _gr_list->count();
Coord l, b, r, t;
for (long i = 0; i < count && flag; i++) {
Graphic31* target = _gr_list->item(i);
target->getbounds(l, b, r, t);
c->damage(l, b, r, t);
flag = target->effect(e, tool);
if (flag) {
target->getbounds(l, b, r, t);
c->damage(l, b, r, t);
}
target->flush();
CanvasRep& rep = *c->rep();
CanvasDamage& cd = rep.damage_;
rep.start_repair();
drawclipped(c, cd.left, cd.bottom, cd.right, cd.top);
rep.finish_repair();
}
_gr_list->remove_all();
}
return flag;
}
示例2: event
boolean GlyphGrabber::event (Event& e) {
Graphic31* root = _gviewer->root();
Tool31& tool = _gviewer->tool();
Canvas* c = e.window()->canvas();
c->push_clipping();
c->clip_rect(_a->left(), _a->bottom(), _a->right(), _a->top());
boolean ok = root->grasp(e, tool);
Event ev;
Session* s = Session::instance();
while(ok) {
s->read(ev);
ok = root->manipulating(ev, tool);
}
ok = root->effect(ev, tool);
c->pop_clipping();
return ok;
}