static status initialiseArc(Arc a, Int radius, Real start_angle, Real size_angle) { initialiseJoint((Joint) a, ZERO, ZERO, ZERO, ZERO, DEFAULT); if ( isDefault(radius) ) radius = getClassVariableValueObject(a, NAME_radius); if ( isDefault(start_angle) ) start_angle = CtoReal(0.0); if ( isDefault(size_angle) ) size_angle = CtoReal(90.0); assign(a, size, newObject(ClassSize, radius, radius, EAV)); assign(a, position, newObject(ClassPoint, EAV)); assign(a, start_angle, start_angle); assign(a, size_angle, size_angle); assign(a, close, NAME_none); return requestComputeGraphical(a, DEFAULT); }
static int tryDragScrollGesture(Gesture g, EventObj ev) { status doscroll = scrollMessage(g, ev, NULL, NULL, NULL); if ( doscroll ) { if ( isNil(g->drag_scroll_event) ) { assign(g, drag_scroll_timer, newObject(ClassTimer, CtoReal(0.06), /* TBD */ newObject(ClassMessage, g, NAME_scroll, EAV), EAV)); startTimer(g->drag_scroll_timer, NAME_repeat); assign(g, drag_scroll_event, getCloneObject(ev)); } } else { cancelDragScrollGesture(g); } return doscroll; }
Any cToPceReal(double f) { return CtoReal(f); }
static Real getPosixValueDate(Date d) { answer(CtoReal((double)d->unix_date)); }