void HookSvc::ProcessBigLabel(RefPtr<Pango::Layout> lay, const Point& pos) { DPoint user_pos(CR::DeviceToUser(cont, PhisPos())); DPoint sz(CalcTextSize(lay)); DRect user_rct(RectASz(DPoint(pos), sz)); if( user_rct.Contains(user_pos) ) { pAction->AtBigLabel(); } }
/* init_node_edge: * initialize node and edge attributes */ static void init_node_edge(Agraph_t * g) { node_t *n; edge_t *e; int nG = agnnodes(g); attrsym_t *N_pos = agfindattr(g->proto->n, "pos"); attrsym_t *N_pin = agfindattr(g->proto->n, "pin"); for (n = agfstnode(g); n; n = agnxtnode(g, n)) { neato_init_node(n); user_pos(N_pos, N_pin, n, nG); /* set user position if given */ } for (n = agfstnode(g); n; n = agnxtnode(g, n)) { for (e = agfstout(g, n); e; e = agnxtout(g, e)) common_init_edge(e); } }
static void sfdp_init_node_edge(graph_t * g) { node_t *n; edge_t *e; #if 0 int nnodes = agnnodes(g); attrsym_t *N_pos = agfindnodeattr(g, "pos"); #endif for (n = agfstnode(g); n; n = agnxtnode(g, n)) { neato_init_node(n); #if 0 FIX so that user positions works with multiscale user_pos(N_pos, NULL, n, nnodes); #endif } for (n = agfstnode(g); n; n = agnxtnode(g, n)) { for (e = agfstout(g, n); e; e = agnxtout(g, e)) sfdp_init_edge(e); } }
static DRect GetDVDLabelLocation(int /*idx*/, const Point& pos) { CR::RefPtr<CR::ImageSurface> sur = GetDVDMark(false); DPoint user_pos(pos); return RectASz(user_pos, DPoint(sur->get_width(), sur->get_height())); }